/**
 * XM8 account, login, and password-recovery interface.
 */

:root {
	--xm8-blue: var(--e-global-color-primary, #123b63);
	--xm8-blue-deep: #082744;
	--xm8-orange: var(--e-global-color-secondary, #f39a32);
	--xm8-orange-dark: #d97716;
	--xm8-ink: #183247;
	--xm8-muted: #637789;
	--xm8-line: #d9e2ea;
	--xm8-pale: #f3f7fa;
	--xm8-white: #fff;
	--xm8-radius: 18px;
	--xm8-shadow: 0 20px 55px rgba(8, 39, 68, .14);
}

.xm8-account-page,
.xm8-account-shell,
.xm8-auth-wrap {
	font-family: "Noto Sans", Arial, sans-serif;
}

.xm8-auth-wrap {
	width: min(100%, 520px);
	margin: 32px auto;
}

.xm8-auth-card {
	position: relative;
	overflow: hidden;
	padding: clamp(26px, 5vw, 44px);
	background: var(--xm8-white);
	border: 1px solid rgba(18, 59, 99, .12);
	border-radius: var(--xm8-radius);
	box-shadow: var(--xm8-shadow);
}

.xm8-auth-card::before {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 6px;
	background: linear-gradient(90deg, var(--xm8-orange), #ffc05f);
	content: "";
}

.xm8-auth-brand {
	margin-bottom: 28px;
	text-align: center;
}

.xm8-auth-brand .custom-logo-link {
	display: inline-block;
	margin-bottom: 15px;
}

.xm8-auth-brand .custom-logo {
	width: auto;
	max-width: 210px;
	max-height: 78px;
}

.xm8-auth-eyebrow {
	margin: 0 0 6px;
	color: var(--xm8-orange-dark);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .14em;
	line-height: 1.4;
	text-transform: uppercase;
}

.xm8-auth-card h2,
.xm8-account-shell h2,
.xm8-account-shell h3 {
	color: var(--xm8-blue-deep);
}

.xm8-auth-card h2 {
	margin: 0 0 9px;
	font-size: clamp(27px, 4vw, 34px);
	font-weight: 750;
	line-height: 1.18;
}

.xm8-auth-intro {
	margin: 0;
	color: var(--xm8-muted);
	font-size: 15px;
	line-height: 1.65;
}

.xm8-auth-card form {
	margin: 0;
}

/*
 * WooCommerce, Elementor, and some theme styles apply their own layout and
 * spacing to password-recovery forms. Keep this form compact and predictable
 * without changing forms elsewhere on the site.
 */
.xm8-auth-card form.woocommerce-ResetPassword.lost_reset_password {
	display: block !important;
	margin: 0 !important;
	padding: 0 !important;
	row-gap: 0 !important;
}

.xm8-auth-card form.woocommerce-ResetPassword.lost_reset_password .form-row {
	display: block !important;
	float: none !important;
	width: 100% !important;
	height: auto !important;
	min-height: 0 !important;
	max-height: none !important;
	margin: 0 0 22px !important;
	padding: 0 !important;
	gap: 0 !important;
}

.xm8-auth-card form.woocommerce-ResetPassword.lost_reset_password .form-row label {
	display: block !important;
	float: none !important;
	position: static !important;
	width: auto !important;
	height: auto !important;
	min-height: 0 !important;
	max-height: none !important;
	margin: 0 0 8px !important;
	padding: 0 !important;
	line-height: 1.45 !important;
	transform: none !important;
}

.xm8-auth-card form.woocommerce-ResetPassword.lost_reset_password input.input-text {
	display: block !important;
	float: none !important;
	position: static !important;
	margin: 0 !important;
	transform: none !important;
}

.xm8-auth-card .form-row {
	margin: 0 0 20px;
	padding: 0;
}

.xm8-auth-card label:not(.woocommerce-form-login__rememberme) {
	display: block;
	margin: 0 0 7px;
	color: var(--xm8-ink);
	font-size: 14px;
	font-weight: 700;
}

.xm8-auth-card .required {
	color: var(--xm8-orange-dark);
}

.xm8-auth-card input.input-text {
	width: 100%;
	min-height: 50px;
	padding: 11px 14px;
	color: var(--xm8-ink);
	background: #fbfdff;
	border: 1px solid #b9c8d4;
	border-radius: 9px;
	box-shadow: none;
	font-size: 16px;
	transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.xm8-auth-card input.input-text:focus {
	background: var(--xm8-white);
	border-color: var(--xm8-blue);
	box-shadow: 0 0 0 3px rgba(18, 59, 99, .14);
	outline: 0;
}

.xm8-login-options {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin: -2px 0 22px;
}

.xm8-login-options .woocommerce-form-login__rememberme {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin: 0;
	color: var(--xm8-muted);
	font-size: 14px;
	font-weight: 600;
}

.xm8-login-options input[type="checkbox"] {
	width: 17px;
	height: 17px;
	margin: 0;
	accent-color: var(--xm8-blue);
}

.xm8-auth-card a {
	color: var(--xm8-blue);
	font-weight: 700;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.xm8-auth-card a:hover,
.xm8-auth-card a:focus {
	color: var(--xm8-orange-dark);
}

.xm8-auth-card .button,
.xm8-account-shell .button,
.xm8-dashboard-card__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 11px 22px;
	color: var(--xm8-white) !important;
	background: var(--xm8-blue) !important;
	border: 0 !important;
	border-radius: 9px !important;
	box-shadow: 0 7px 18px rgba(8, 39, 68, .16);
	font-size: 15px;
	font-weight: 750;
	line-height: 1.25;
	text-decoration: none !important;
	transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.xm8-auth-card .button {
	width: 100%;
}

.xm8-auth-card form.woocommerce-ResetPassword.lost_reset_password .button {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	box-sizing: border-box !important;
	height: 52px !important;
	min-height: 52px !important;
	margin: 0 !important;
	padding: 0 22px !important;
	font-family: inherit !important;
	line-height: 1.2 !important;
	text-align: center !important;
	vertical-align: middle !important;
}

/* Keep WooCommerce account-action links centered consistently in every browser. */
.xm8-account-shell a.button,
.xm8-account-shell button.button,
.xm8-account-shell input.button {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	box-sizing: border-box !important;
	min-height: 52px !important;
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	padding: 0 20px !important;
	font-family: inherit !important;
	line-height: 1.2 !important;
	text-align: center !important;
	vertical-align: middle !important;
}

.xm8-auth-card .button:hover,
.xm8-auth-card .button:focus,
.xm8-account-shell .button:hover,
.xm8-account-shell .button:focus,
.xm8-dashboard-card__link:hover,
.xm8-dashboard-card__link:focus {
	background: var(--xm8-orange-dark) !important;
	box-shadow: 0 9px 22px rgba(217, 119, 22, .2);
	transform: translateY(-1px);
}

.xm8-auth-footer {
	margin: 24px 0 0;
	padding-top: 20px;
	color: var(--xm8-muted);
	border-top: 1px solid var(--xm8-line);
	font-size: 14px;
	text-align: center;
}

.xm8-auth-note {
	margin: 0 0 24px;
	padding: 14px 16px;
	color: var(--xm8-ink);
	background: var(--xm8-pale);
	border-left: 4px solid var(--xm8-orange);
	border-radius: 7px;
	font-size: 14px;
	line-height: 1.55;
}

.xm8-registration-card {
	margin-top: 24px;
}

.woocommerce-notices-wrapper {
	width: min(100%, 1080px);
	margin-right: auto;
	margin-left: auto;
}

.woocommerce-error,
.woocommerce-info,
.woocommerce-message {
	padding: 16px 18px 16px 48px !important;
	background: var(--xm8-white);
	border: 1px solid var(--xm8-line);
	border-top: 4px solid var(--xm8-blue);
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba(8, 39, 68, .08);
}

.woocommerce-error {
	border-top-color: #b42318;
}

.woocommerce-message {
	border-top-color: #2f7d4b;
}

.xm8-account-shell {
	display: grid;
	grid-template-columns: minmax(205px, 250px) minmax(0, 1fr);
	gap: clamp(26px, 4vw, 54px);
	width: min(100%, 1120px);
	margin: 28px auto 54px;
}

.xm8-account-shell .woocommerce-MyAccount-navigation {
	float: none;
	width: auto;
}

.xm8-account-shell .woocommerce-MyAccount-navigation ul {
	overflow: hidden;
	margin: 0;
	padding: 8px;
	background: var(--xm8-white);
	border: 1px solid var(--xm8-line);
	border-radius: 14px;
	box-shadow: 0 10px 30px rgba(8, 39, 68, .09);
}

.xm8-account-shell .woocommerce-MyAccount-navigation li {
	margin: 0;
	padding: 0;
	border: 0;
	list-style: none;
}

.xm8-account-shell .woocommerce-MyAccount-navigation li + li {
	margin-top: 3px;
}

.xm8-account-shell .woocommerce-MyAccount-navigation a {
	display: block;
	padding: 12px 14px;
	color: var(--xm8-ink);
	border-radius: 8px;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.35;
	text-decoration: none;
}

.xm8-account-shell .woocommerce-MyAccount-navigation a:hover,
.xm8-account-shell .woocommerce-MyAccount-navigation a:focus {
	color: var(--xm8-blue);
	background: var(--xm8-pale);
}

.xm8-account-shell .woocommerce-MyAccount-navigation .is-active a {
	color: var(--xm8-white);
	background: var(--xm8-blue);
}

.xm8-account-shell .woocommerce-MyAccount-content {
	float: none;
	width: auto;
	min-width: 0;
}

.xm8-dashboard-primary {
	overflow: hidden;
	margin-bottom: 28px;
	background: var(--xm8-white);
	border: 1px solid var(--xm8-line);
	border-radius: var(--xm8-radius);
	box-shadow: var(--xm8-shadow);
}

.xm8-dashboard-hero {
	position: relative;
	overflow: hidden;
	padding: clamp(25px, 4vw, 36px);
	color: var(--xm8-white);
	background: linear-gradient(135deg, var(--xm8-blue-deep), var(--xm8-blue));
}

.xm8-dashboard-hero::after {
	position: absolute;
	right: -55px;
	bottom: -75px;
	width: 220px;
	height: 220px;
	background: rgba(255, 255, 255, .07);
	border-radius: 50%;
	content: "";
}

.xm8-dashboard-hero .xm8-auth-eyebrow {
	color: #ffc477;
}

.xm8-account-shell .xm8-dashboard-hero h2 {
	position: relative;
	z-index: 1;
	margin: 0 0 8px;
	color: #fff;
	font-size: clamp(27px, 4vw, 38px);
	line-height: 1.2;
}

.xm8-dashboard-hero p:last-child {
	position: relative;
	z-index: 1;
	max-width: 650px;
	margin: 0;
	color: rgba(255, 255, 255, .84);
	line-height: 1.6;
}

.xm8-dashboard-actions {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
	margin-bottom: 28px;
}

.xm8-dashboard-card {
	padding: 23px;
	background: var(--xm8-white);
	border: 1px solid var(--xm8-line);
	border-radius: 13px;
	box-shadow: 0 8px 25px rgba(8, 39, 68, .07);
}

.xm8-dashboard-card h3 {
	margin: 0 0 7px;
	font-size: 19px;
}

.xm8-dashboard-card p {
	margin: 0 0 16px;
	color: var(--xm8-muted);
	font-size: 14px;
	line-height: 1.55;
}

.xm8-dashboard-card__link {
	min-height: 40px;
	padding: 8px 15px;
	font-size: 13px;
}

.xm8-dashboard-learning {
	margin: 0;
	padding: clamp(23px, 4vw, 32px);
}

.xm8-dashboard-section-heading {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
	margin: 0 0 16px;
}

.xm8-dashboard-section-heading .xm8-auth-eyebrow {
	margin-bottom: 4px;
	color: #c66700;
}

.xm8-dashboard-section-heading h2 {
	margin: 0;
	font-size: clamp(23px, 3vw, 30px);
}

.xm8-dashboard-section-heading > p {
	margin: 0 0 3px;
	color: var(--xm8-muted);
	font-size: 13px;
	font-weight: 700;
}

.xm8-course-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0;
}

.xm8-course-card {
	overflow: hidden;
	background: #f7fafc;
	border-top: 1px solid var(--xm8-line);
}

.xm8-course-card:last-child {
	border-bottom: 1px solid var(--xm8-line);
}

.xm8-course-card__body {
	padding: clamp(21px, 4vw, 30px);
}

.xm8-course-card__heading {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 18px;
}

.xm8-course-card__eyebrow {
	margin: 0 0 4px;
	color: #a95400;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .13em;
	line-height: 1.4;
	text-transform: uppercase;
}

.xm8-course-card h3 {
	margin: 0;
	font-size: clamp(20px, 3vw, 26px);
	line-height: 1.25;
}

.xm8-course-card h3 a {
	color: var(--xm8-ink);
	text-decoration: none;
}

.xm8-course-card h3 a:hover,
.xm8-course-card h3 a:focus {
	color: var(--xm8-blue);
}

.xm8-course-status {
	flex: 0 0 auto;
	padding: 6px 10px;
	color: #4d6070;
	background: #edf2f6;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 800;
	line-height: 1.25;
	white-space: nowrap;
}

.xm8-course-card--in-progress .xm8-course-status {
	color: #774000;
	background: #fff0d8;
}

.xm8-course-card--complete .xm8-course-status {
	color: #23633b;
	background: #e5f5eb;
}

.xm8-course-progress {
	margin: 22px 0 21px;
}

.xm8-course-progress__heading {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 15px;
	margin-bottom: 8px;
	color: var(--xm8-muted);
	font-size: 13px;
	font-weight: 700;
}

.xm8-course-progress__heading strong {
	color: var(--xm8-ink);
	font-size: 17px;
}

.xm8-course-progress__track {
	overflow: hidden;
	height: 9px;
	background: #e5edf3;
	border-radius: 999px;
}

.xm8-course-progress__track span {
	display: block;
	height: 100%;
	background: linear-gradient(90deg, #e87600, #ffad42);
	border-radius: inherit;
	transition: width .3s ease;
}

.xm8-course-card--complete .xm8-course-progress__track span {
	background: #2f7d4b;
}

.xm8-course-progress > p {
	margin: 8px 0 0;
	color: var(--xm8-muted);
	font-size: 12px;
	line-height: 1.45;
}

body.woocommerce-account .xm8-account-shell .woocommerce-MyAccount-content a.xm8-course-card__button,
body.woocommerce-account .xm8-account-shell .woocommerce-MyAccount-content a.xm8-course-card__button:visited {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	min-height: 44px;
	padding: 10px 17px;
	color: var(--xm8-white);
	background: var(--xm8-blue);
	border-radius: 9px;
	font-size: 13px;
	font-weight: 800;
	line-height: 1.3;
	text-decoration: none;
	transition: background .2s ease, transform .2s ease;
}

body.woocommerce-account .xm8-account-shell .woocommerce-MyAccount-content a.xm8-course-card__button:hover,
body.woocommerce-account .xm8-account-shell .woocommerce-MyAccount-content a.xm8-course-card__button:focus {
	color: var(--xm8-white);
	background: var(--xm8-blue-deep);
	transform: translateY(-1px);
}

.xm8-course-card__button span {
	color: inherit;
	font-size: 17px;
	line-height: 1;
}

.xm8-course-empty {
	padding: clamp(22px, 4vw, 30px);
	background: #f6f9fb;
	border: 1px dashed #b9c8d4;
	border-radius: 13px;
}

.xm8-course-empty h3 {
	margin: 0 0 7px;
	font-size: 19px;
}

.xm8-course-empty p {
	margin: 0 0 13px;
	color: var(--xm8-muted);
	font-size: 14px;
	line-height: 1.55;
}

.xm8-course-empty a {
	color: var(--xm8-blue);
	font-weight: 750;
}

.xm8-account-shell .woocommerce-EditAccountForm,
.xm8-account-shell .woocommerce-address-fields,
.xm8-account-shell .woocommerce-Addresses,
.xm8-account-shell .woocommerce-orders-table,
.xm8-account-shell .woocommerce-table {
	padding: clamp(20px, 4vw, 30px);
	background: var(--xm8-white);
	border: 1px solid var(--xm8-line);
	border-radius: 13px;
	box-shadow: 0 8px 25px rgba(8, 39, 68, .07);
}

.xm8-account-shell input.input-text,
.xm8-account-shell select,
.xm8-account-shell textarea {
	min-height: 48px;
	padding: 10px 13px;
	background: #fbfdff;
	border: 1px solid #b9c8d4;
	border-radius: 8px;
}

.xm8-account-shell fieldset {
	margin: 28px 0;
	padding: 22px;
	border: 1px solid var(--xm8-line);
	border-radius: 10px;
}

.xm8-account-shell legend {
	padding: 0 8px;
	color: var(--xm8-blue-deep);
	font-weight: 750;
}

@media (max-width: 767px) {
	.xm8-auth-wrap {
		width: 92%;
		margin: 22px auto;
	}

	.xm8-login-options {
		align-items: flex-start;
		flex-direction: column;
		gap: 10px;
	}

	.xm8-account-shell {
		grid-template-columns: 1fr;
		width: 92%;
	}

	.xm8-account-shell .woocommerce-MyAccount-navigation ul {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 4px;
	}

	.xm8-account-shell .woocommerce-MyAccount-navigation li + li {
		margin-top: 0;
	}

	.xm8-dashboard-actions {
		grid-template-columns: 1fr;
	}

	.xm8-dashboard-section-heading,
	.xm8-course-card__heading {
		align-items: flex-start;
		flex-direction: column;
		gap: 10px;
	}

}

@media (max-width: 430px) {
	.xm8-account-shell .woocommerce-MyAccount-navigation ul {
		grid-template-columns: 1fr;
	}
}
