/**
 * My Account — sp-slim native rebuild, matching the live design.
 * Logged in: sidebar (avatar + nav) + content card with a dashboard card grid.
 * Logged out: "Advanced research access" hero (dark brand panel + tabbed
 * Sign in / Create account forms). Loaded only on is_account_page().
 *
 * @package sp-slim
 */

body.woocommerce-account .sp-main { background: #f4f6f9; }
body.woocommerce-account .sp-page-title { display: none; } /* "My Account" H1 is redundant chrome */
body.woocommerce-account .sp-main .sp-container,
body.woocommerce-account .sp-page { max-width: 1080px; }

/* ==================================================================
   LOGGED IN — sidebar + content
   ================================================================== */
/* WC core floats the nav/content and caps their width — reset so grid (or the
   mobile stack) controls them. */
body.woocommerce-account .woocommerce-MyAccount-navigation,
body.woocommerce-account .woocommerce-MyAccount-content {
	float: none !important;
	width: auto !important;
	max-width: none !important;
	margin: 0;
}

@media ( min-width: 860px ) {
	body.woocommerce-account.logged-in .woocommerce {
		display: grid;
		grid-template-columns: 260px minmax( 0, 1fr );
		gap: 26px;
		align-items: start;
	}
	/* WC's clearfix ::before/::after are grid items too — they'd steal cells and
	   shove items into the wrong column. Remove them so only real children place. */
	body.woocommerce-account .woocommerce::before,
	body.woocommerce-account .woocommerce::after { content: none; display: none; }
	body.woocommerce-account .woocommerce > .woocommerce-notices-wrapper { grid-column: 1 / -1; }
}

/* Sidebar */
.sp-acct-nav {
	background: #fff;
	border: 1px solid #e7eaf1;
	border-radius: 14px;
	box-shadow: 0 1px 3px rgba( 20, 24, 48, .05 );
	overflow: hidden;
}
.sp-acct-nav__user {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding: 24px 20px 18px;
	border-bottom: 1px solid #eef0f5;
}
.sp-acct-nav__avatar-img {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: #f4f6f9;
}
.sp-acct-nav__name { font-size: 16px; font-weight: 700; color: #1a1a1a; }
.sp-acct-nav ul { list-style: none; margin: 0; padding: 8px; }
/* kill the blog-content decorative arrow markers on the nav + content lists
   (NOT the hero feature list, which has its own checkmarks) */
body.woocommerce-account .sp-acct-nav li::before,
body.woocommerce-account .woocommerce-MyAccount-content li::before { content: none !important; }
/* beat .entry-content ul li (padding-left:28px for the arrow marker +
   margin-bottom:10px) — both broke the centering and added stray gaps */
body.woocommerce-account .sp-acct-nav li { margin: 0; padding-left: 0; }
/* mobile-only "My Account" accordion toggle (hidden on desktop) */
.sp-acct-nav__toggle { display: none; }
.sp-acct-nav li a {
	display: block;
	padding: 11px 16px;
	border-radius: 8px;
	text-align: center;
	font-size: 14px;
	font-weight: 600;
	color: #455060;
	text-decoration: none;
	transition: background .15s ease, color .15s ease;
}
.sp-acct-nav li a:hover { background: #f4f6f9; color: #2d3265; }
.sp-acct-nav li.is-active a,
.sp-acct-nav li.woocommerce-MyAccount-navigation-link--dashboard.is-active a {
	background: linear-gradient( 135deg, #2d3265 0%, #1f264a 100% );
	color: #fff;
}
.sp-acct-nav li.woocommerce-MyAccount-navigation-link--customer-logout a { color: #9aa1ad; }
.sp-acct-nav li.woocommerce-MyAccount-navigation-link--customer-logout a:hover { color: #d23b3b; background: #fdf2f2; }

/* Content card */
.woocommerce-account .woocommerce-MyAccount-content {
	background: #fff;
	border: 1px solid #e7eaf1;
	border-radius: 14px;
	box-shadow: 0 1px 3px rgba( 20, 24, 48, .05 );
	padding: 28px 30px;
}
.woocommerce-account .woocommerce-MyAccount-content a { color: #2d3265; }
.sp-acct-hello { font-size: 15px; color: #1a1a1a; margin: 0 0 8px; }
.sp-acct-intro { font-size: 14px; color: #6c7480; line-height: 1.6; margin: 0 0 22px; }

/* Dashboard card grid */
.sp-acct-cards {
	display: grid;
	grid-template-columns: repeat( 3, 1fr );
	gap: 14px;
}
.sp-acct-card {
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-height: 84px;
	padding: 16px;
	background: #f8f9fc;
	border: 1px solid #e7eaf1;
	border-radius: 12px;
	text-decoration: none !important;
	transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.sp-acct-card:hover {
	transform: translateY( -2px );
	box-shadow: 0 6px 16px rgba( 45, 50, 101, .12 );
	border-color: #cdd5e6;
}
.sp-acct-card__label { font-size: 14.5px; font-weight: 700; color: #2d3265; }

/* Tables / forms inside content (orders, addresses, account details) */
/* Form CTAs (Save changes / Save address) stay solid navy — primary actions */
.woocommerce-account .woocommerce-MyAccount-content .button {
	background: linear-gradient( 135deg, #2d3265 0%, #1f264a 100% ) !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 8px !important;
	font-weight: 700 !important;
}
.woocommerce-account .woocommerce-MyAccount-content .input-text,
.woocommerce-account .woocommerce-MyAccount-content select {
	border: 1px solid #d0d5dd;
	border-radius: 8px;
	min-height: 44px;
	padding: 0 12px;
}
/* Account tables — subtle. Kill the theme's green (.entry-content th = sage) on
   BOTH the header row and the order-number column (WC renders that column as
   <th>, so the sage th rule colored the whole column). */
.woocommerce-account .woocommerce-MyAccount-content table { box-shadow: none !important; border: 1px solid #e7eaf1; }
.woocommerce-account .woocommerce-MyAccount-content table thead th,
.woocommerce-account .woocommerce-MyAccount-content table th.woocommerce-orders-table__header {
	background: #eef1f6 !important;
	color: #2d3265 !important;
}
.woocommerce-account .woocommerce-MyAccount-content table tbody th,
.woocommerce-account .woocommerce-MyAccount-content table tbody td { background: transparent !important; }
/* Table action pills (View / Print invoice / Download / Track) — light gradient
   + blue stroke instead of the heavy navy pill */
.woocommerce-account .woocommerce-MyAccount-content table .button {
	background: linear-gradient( 180deg, #ffffff 0%, #eef2f8 100% ) !important;
	color: #2d3265 !important;
	border: 1px solid #b9c4dd !important;
	box-shadow: none !important;
	font-weight: 600 !important;
	padding: 9px 16px !important;
	font-size: 13px !important;
	margin: 0 10px 10px 0 !important; /* spacing between pills, incl. when wrapped */
}
.woocommerce-account .woocommerce-MyAccount-content table .button:hover {
	background: linear-gradient( 180deg, #eef2f8 0%, #dfe6f3 100% ) !important;
	border-color: #2d3265 !important;
}
/* breathing room in the actions cell so the pills aren't tight to the row edges */
.woocommerce-account .woocommerce-MyAccount-content table td.woocommerce-orders-table__cell-order-actions {
	padding-top: 16px !important;
	padding-bottom: 6px !important; /* the pills' own 10px bottom margin completes the gap */
}

/* ==================================================================
   LOGGED OUT — "Advanced research access" hero + login/register
   The registration plugin owns the form; inc/myaccount.php injects
   .sp-acct-hero__left via tgwcfb_before_customer_login_form, then we grid it
   beside the form so the dark brand panel + the white form read as one card.
   ================================================================== */
@media ( min-width: 860px ) {
	body.woocommerce-account:not( .logged-in ) .woocommerce {
		display: grid;
		grid-template-columns: 0.82fr 1.18fr;
		align-items: stretch;
		max-width: 980px;
		margin: 0 auto;
		background: #fff;
		border: 1px solid #e7eaf1;
		border-radius: 16px;
		overflow: hidden;
		box-shadow: 0 2px 10px rgba( 20, 24, 48, .06 );
	}
	/* Explicit placement — an empty .woocommerce-notices-wrapper sits between the
	   injected hero and the form, so auto-placement would break the two columns.
	   Notices span row 1 (collapse to 0 when empty); hero + form share row 2. */
	body.woocommerce-account:not( .logged-in ) .woocommerce > .woocommerce-notices-wrapper { grid-column: 1 / -1; grid-row: 1; }
	body.woocommerce-account:not( .logged-in ) .woocommerce > .sp-acct-hero__left { grid-column: 1; grid-row: 2; }
	body.woocommerce-account:not( .logged-in ) .woocommerce > #customer_login,
	body.woocommerce-account:not( .logged-in ) .woocommerce > form.woocommerce-form-login { grid-column: 2; grid-row: 2; }
}
.sp-acct-hero__left {
	background: linear-gradient( 160deg, #2d3265 0%, #1a1d3a 100% );
	color: #fff;
	padding: 42px 38px;
}
.sp-acct-hero__logo { height: 30px; width: auto; max-width: none; margin-bottom: 26px; }
/* .woocommerce-account prefix beats the theme's .entry-content h2 (navy + green
   left-border) so the title is white with no decorative bar on the dark panel */
.woocommerce-account .sp-acct-hero__title { font-size: 26px; font-weight: 800; line-height: 1.2; color: #fff; margin: 0 0 14px; border-left: 0; padding-left: 0; }
.sp-acct-hero__lede { font-size: 14.5px; line-height: 1.6; color: rgba( 255, 255, 255, .82 ); margin: 0 0 22px; }
.sp-acct-hero__features { list-style: none; margin: 0 0 22px; padding: 0; }
.sp-acct-hero__features li {
	position: relative;
	padding-left: 26px;
	margin: 0 0 12px;
	font-size: 14px;
	color: rgba( 255, 255, 255, .92 );
}
/* .woocommerce-account prefix + !important beats the theme's .entry-content
   li::before "→" arrow so features get a green check */
.woocommerce-account .sp-acct-hero__features li::before {
	content: "" !important;
	position: absolute;
	left: 0;
	top: 2px;
	width: 17px;
	height: 17px;
	background: no-repeat center / 17px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2381a368' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") !important;
}
.sp-acct-hero__trust { display: flex; align-items: center; gap: 10px; font-size: 13px; color: rgba( 255, 255, 255, .82 ); }
.sp-acct-hero__stars { color: #f5b301; font-size: 15px; letter-spacing: 1px; }

/* The plugin's login + register forms (right side of the card) */
.woocommerce-account:not( .logged-in ) #customer_login,
.woocommerce-account:not( .logged-in ) .woocommerce > form.woocommerce-form-login { padding: 36px 34px; }
/* stack login above register instead of WC's 50/50 float columns */
#customer_login.u-columns,
#customer_login.col2-set { display: block; }
#customer_login .u-column1,
#customer_login .u-column2 { width: 100% !important; float: none !important; margin: 0; padding: 0; }
#customer_login .u-column2 { margin-top: 24px; padding-top: 22px; border-top: 1px solid #eef0f5; }
#customer_login h2 { font-size: 18px; font-weight: 800; color: #1a1a1a; margin: 0 0 16px; }
.woocommerce-account #customer_login .form-row { margin: 0 0 14px; }
.woocommerce-account #customer_login label { display: block; font-size: 12.5px; font-weight: 600; color: #5b6470; margin-bottom: 5px; }
.woocommerce-account #customer_login label.woocommerce-form__label-for-checkbox { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; }
.woocommerce-account #customer_login input.input-text,
.woocommerce-account #customer_login input[type="text"],
.woocommerce-account #customer_login input[type="email"],
.woocommerce-account #customer_login input[type="password"],
.woocommerce-account #customer_login input[type="tel"],
.woocommerce-account #customer_login select {
	width: 100%;
	height: 46px;
	padding: 0 13px;
	border: 1px solid #d0d5dd;
	border-radius: 8px;
	font-size: 15px;
	background: #fff;
}
.woocommerce-account #customer_login .select2-container { width: 100% !important; } /* select2 stale inline width */
.woocommerce-account #customer_login input:focus,
.woocommerce-account #customer_login select:focus { outline: none; border-color: #2d3265; box-shadow: 0 0 0 3px rgba( 45, 50, 101, .12 ); }
.woocommerce-account #customer_login .button {
	width: 100%;
	min-height: 48px;
	margin-top: 4px;
	background: linear-gradient( 135deg, #2d3265 0%, #1f264a 100% ) !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 9px !important;
	font-size: 15.5px !important;
	font-weight: 700 !important;
	cursor: pointer;
}
.woocommerce-account #customer_login .button:hover { background: linear-gradient( 135deg, #81a368 0%, #6b8d55 100% ) !important; }
.woocommerce-account #customer_login .woocommerce-form-login__rememberme { margin-bottom: 12px; }
.woocommerce-account #customer_login .lost_password { font-size: 13px; margin-top: 10px; }
.woocommerce-account #customer_login .lost_password a { color: #2d3265; }
/* two-up name/address rows where the plugin tags them */
@media ( min-width: 520px ) {
	#customer_login .form-row-first { float: left; width: 48%; }
	#customer_login .form-row-last { float: right; width: 48%; }
	#customer_login .form-row-wide,
	#customer_login .woocommerce-form-row--wide { clear: both; }
}

/* ==================================================================
   Mobile
   ================================================================== */
@media ( max-width: 859px ) {
	body.woocommerce-account .woocommerce-MyAccount-navigation { margin-bottom: 14px; }
	.sp-acct-cards { grid-template-columns: repeat( 2, 1fr ); }

	/* Collapse the nav into a compact "My Account ▾" accordion. Avatar/username
	   hidden to compress — identity still shows in the "Hello …" greeting. */
	.sp-acct-nav__user { display: none; }
	.sp-acct-nav__toggle {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 10px;
		width: 100%;
		padding: 15px 18px;
		background: #fff;
		border: 0;
		font-size: 15px;
		font-weight: 800;
		color: #2d3265;
		cursor: pointer;
	}
	.sp-acct-nav__chev { flex: 0 0 auto; transition: transform .2s ease; }
	.sp-acct-nav.is-open .sp-acct-nav__chev { transform: rotate( 180deg ); }
	.sp-acct-nav.is-open .sp-acct-nav__toggle { border-bottom: 1px solid #eef0f5; }
	.sp-acct-nav__list { display: none; padding: 8px; }
	.sp-acct-nav.is-open .sp-acct-nav__list { display: block; }
	/* guest: hero stacks above the form, both inside one rounded card */
	body.woocommerce-account:not( .logged-in ) .woocommerce {
		background: #fff;
		border: 1px solid #e7eaf1;
		border-radius: 14px;
		overflow: hidden;
		box-shadow: 0 2px 10px rgba( 20, 24, 48, .06 );
	}
	.sp-acct-hero__left { padding: 30px 24px; }
	.woocommerce-account:not( .logged-in ) #customer_login { padding: 26px 22px; }
}
@media ( max-width: 420px ) {
	.sp-acct-cards { grid-template-columns: 1fr; }
}

/* Orders table on mobile (WC stacks the table at ≤768px): put the "Actions"
   label on its own line so the pills get the full card width and stay on ONE
   line — slightly smaller, and the row scrolls horizontally if a 4th "Track"
   pill overflows. */
@media ( max-width: 768px ) {
	.woocommerce-account .woocommerce-MyAccount-content table.shop_table_responsive td.woocommerce-orders-table__cell-order-actions {
		display: block;
		text-align: left;
		white-space: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		padding: 12px 16px 14px !important;
	}
	/* drop the orphaned "Actions" label on mobile — the pills speak for themselves */
	.woocommerce-account .woocommerce-MyAccount-content table.shop_table_responsive td.woocommerce-orders-table__cell-order-actions::before {
		display: none !important;
	}
	.woocommerce-account .woocommerce-MyAccount-content table.shop_table_responsive td.woocommerce-orders-table__cell-order-actions .button {
		font-size: 12px !important;
		padding: 7px 11px !important;
		margin: 0 7px 0 0 !important;
	}
}


/* == SP MOBILE TYPE LAYER v2 (generated 2026-08-12) — desktop untouched; sub-15px rules +3 capped at 17, body 17px, on <=768px. Delete this block to revert. == */
@media (max-width: 768px) {
	.sp-acct-nav li a { font-size: 17px !important; }
	.sp-acct-intro { font-size: 17px !important; }
	.sp-acct-card__label { font-size: 17px !important; }
	.woocommerce-account .woocommerce-MyAccount-content table .button { font-size: 16px !important; }
	.sp-acct-hero__lede { font-size: 17px !important; }
	.sp-acct-hero__features li { font-size: 17px !important; }
	.sp-acct-hero__trust { font-size: 16px !important; }
	.woocommerce-account #customer_login label { font-size: 15.5px !important; }
	.woocommerce-account #customer_login .lost_password { font-size: 16px !important; }
	.woocommerce-account .woocommerce-MyAccount-content table.shop_table_responsive td.woocommerce-orders-table__cell-order-actions .button { font-size: 15px !important; }
}
