/* ==========================================================================
   Reli Academy — woo.css
   WooCommerce pages: checkout (classic shortcode) + thank-you, my account (login, lost password, orders,
   account details). The only stylesheet on these pages besides main.css — WooCommerce's own CSS is not
   loaded (inc/enqueue.php), so every Woo element used here is styled below.
   Mobile-first; breakpoints 640 / 960 / 1280. RTL: logical properties only.
   ========================================================================== */

/* 1. Page shell, generic Woo helpers
   ========================================================================== */
.c-plain-page__title {
	margin-block-end: var(--gap-md);
}

.woocommerce .clear {
	clear: both;
}

.woocommerce .screen-reader-text {
	position: absolute !important;
}

.woocommerce a:not(.c-btn, .button) {
	color: var(--c-primary);
	text-underline-offset: 3px;
}

/* 2. Notices (errors in text + icon colour, never colour alone)
   ========================================================================== */
.woocommerce-error,
.woocommerce-info,
.woocommerce-message,
.woocommerce-notice {
	margin: 0 0 20px;
	padding: 14px 18px;
	border-radius: var(--r-btn);
	background: var(--c-light);
	color: var(--c-ink);
	font-size: var(--fs-small);
	line-height: 1.6;
	list-style: none;
}

.woocommerce-error,
.woocommerce-notice--error {
	background: var(--c-error-bg);
	color: var(--c-error);
	font-weight: 500;
}

.woocommerce-error li + li {
	margin-block-start: 6px;
}

.woocommerce .woocommerce-error a:not(.button) {
	color: inherit;
}

.woocommerce-error:focus,
.woocommerce-message:focus {
	outline: var(--focus-ring);
	outline-offset: 2px;
}

/* 3. Forms
   ========================================================================== */
.woocommerce form .form-row {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0 0 16px;
	padding: 0;
}

.woocommerce form .form-row label {
	font-size: var(--fs-small);
	font-weight: 500;
	line-height: 1.4;
}

.woocommerce form .required {
	color: var(--c-error);
	text-decoration: none;
}

.woocommerce-input-wrapper,
.woocommerce form .password-input {
	position: relative;
	display: block;
	width: 100%;
}

.woocommerce form .input-text,
.woocommerce form select,
.woocommerce form textarea {
	width: 100%;
	height: 52px;
	padding-inline: 16px;
	border: 1.5px solid var(--c-field);
	border-radius: var(--r-btn);
	background: var(--c-white);
	color: var(--c-ink);
	font-size: 1rem;
}

.woocommerce form textarea {
	height: auto;
	min-height: 120px;
	padding-block: 12px;
}

.woocommerce form .input-text:focus-visible,
.woocommerce form select:focus-visible,
.woocommerce form textarea:focus-visible {
	outline: var(--focus-ring);
	outline-offset: 1px;
	border-color: var(--c-accent);
}

.woocommerce form .woocommerce-invalid .input-text,
.woocommerce form .input-text[aria-invalid="true"] {
	border-color: var(--c-error);
}

.checkout-inline-error-message,
.woocommerce form .woocommerce-invalid .checkout-inline-error-message {
	margin: 0;
	color: var(--c-error);
	font-size: var(--fs-caption);
	font-weight: 500;
}

.woocommerce form em,
.woocommerce form .description {
	color: var(--c-muted);
	font-size: var(--fs-caption);
	font-style: normal;
}

/* Checkboxes (remember me, terms) */
.woocommerce-form__label-for-checkbox {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 10px;
	color: var(--c-muted);
	font-size: var(--fs-small);
	font-weight: 400;
	line-height: 1.5;
	cursor: pointer;
}

.woocommerce-form__input-checkbox {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	margin: 2px 0 0;
	accent-color: var(--c-primary);
}

/* Show/hide password button */
.woocommerce form .show-password-input {
	position: absolute;
	inset-block: 4px;
	inset-inline-end: 4px;
	width: 44px;
	border: 0;
	border-radius: 8px;
	background: var(--c-light);
}

.woocommerce form .show-password-input::after {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	width: 20px;
	height: 20px;
	background: var(--c-primary);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
}

.woocommerce form .show-password-input.display-password {
	background: var(--c-light-hover);
}

/* Buttons: Woo's .button = our primary button */
.woocommerce .button,
.woocommerce button.button,
.woocommerce a.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding-inline: 24px;
	border: 0;
	border-radius: var(--r-btn);
	background: var(--c-primary);
	color: var(--c-white);
	font-family: var(--ff-head);
	font-size: var(--fs-btn);
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .2s ease;
}

.woocommerce .button:hover {
	background: var(--c-primary-hover);
}

.woocommerce .button:disabled,
.woocommerce .button.disabled {
	opacity: .6;
	cursor: not-allowed;
}

/* 4. Checkout: login + coupon toggles (small links), their forms
   ========================================================================== */
.woocommerce-form-login-toggle .woocommerce-info,
.woocommerce-form-coupon-toggle .woocommerce-info {
	margin: 0 0 8px;
	padding: 0;
	background: none;
	color: var(--c-muted);
}

.woocommerce-form-login-toggle a,
.woocommerce-form-coupon-toggle a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	font-weight: 500;
}

.woocommerce-form-coupon-toggle {
	margin-block-end: 16px;
}

.woocommerce form.login,
.woocommerce form.checkout_coupon,
.woocommerce form.register,
.woocommerce form.lost_reset_password {
	max-width: 560px;
	margin: 0 0 24px;
	padding: clamp(20px, 3vw, 28px);
	border-radius: var(--r-card);
	background: var(--c-cream);
}

/* Woo's generic "if you have shopped with us before…" line: the labels say enough */
.woocommerce-checkout form.login > p:first-child:not(.form-row) {
	display: none;
}

.woocommerce form.checkout_coupon {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 8px;
}

.woocommerce form.checkout_coupon .form-row {
	margin: 0;
}

.woocommerce form.checkout_coupon .clear {
	display: none;
}

.woocommerce .lost_password {
	margin: 0;
	font-size: var(--fs-small);
}

.woocommerce .lost_password a {
	display: inline-flex;
	align-items: center;
	min-height: 44px; /* touch target */
}

.woocommerce .woocommerce-form-login__submit {
	margin-block-start: 12px;
}

/* 5. Checkout layout: one column on mobile, form + summary card from 960px
   ========================================================================== */
.c-checkout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--gap-md);
	align-items: start;
}

/* Woo prepends the validation errors inside the form: full width, above both columns */
.c-checkout > .woocommerce-NoticeGroup,
.c-checkout > .woocommerce-notices-wrapper {
	grid-column: 1 / -1;
}

.c-checkout > .woocommerce-NoticeGroup .woocommerce-error {
	margin: 0;
}

.c-checkout__title {
	margin-block-end: 18px;
	font-size: var(--fs-h3);
	font-weight: 600;
}

/* Woo's own "Billing details" H3 — replaced by .c-checkout__title (keeps the heading order) */
.woocommerce-billing-fields > h3 {
	display: none;
}

.c-checkout__summary {
	gap: 0;
}

@media (min-width: 640px) {
	.woocommerce-billing-fields__field-wrapper {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: 16px;
	}

	.woocommerce-billing-fields__field-wrapper .form-row-wide {
		grid-column: 1 / -1;
	}
}

@media (min-width: 960px) {
	.c-checkout {
		grid-template-columns: minmax(0, 1fr) 420px;
		gap: 56px;
	}

	.c-checkout__summary {
		position: sticky;
		inset-block-start: calc(var(--header-h) + 24px);
	}
}

/* 6. Order summary card: review table, payment, terms, pay button, trust
   ========================================================================== */
.woocommerce table.shop_table {
	width: 100%;
	border-collapse: collapse;
	font-size: 1rem;
	line-height: 1.5;
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
	padding: 12px 0;
	text-align: start;
	vertical-align: top;
	font-weight: 400;
	box-shadow: inset 0 -1px 0 var(--c-line);
}

.woocommerce table.shop_table td:last-child,
.woocommerce table.shop_table th:last-child {
	text-align: end;
	white-space: nowrap;
}

.woocommerce table.shop_table thead th {
	color: var(--c-muted);
	font-size: var(--fs-caption);
	font-weight: 500;
}

.woocommerce-checkout-review-order-table .product-name {
	font-weight: 500;
}

/* One course per order: "× 1" adds nothing */
.woocommerce-checkout-review-order-table .product-quantity {
	display: none;
}

.woocommerce table.shop_table .order-total th,
.woocommerce table.shop_table .order-total td {
	padding-block: 16px;
	box-shadow: none;
	color: var(--c-ink);
	font-family: var(--ff-head);
	font-size: 1.375rem;
	font-weight: 600;
}

.woocommerce table.shop_table .woocommerce-remove-coupon {
	font-size: var(--fs-caption);
}

#payment {
	margin-block-start: 8px;
}

.wc_payment_methods {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0 0 18px;
	padding: 0;
	list-style: none;
}

.wc_payment_method {
	padding: 14px 16px;
	border-radius: var(--r-btn);
	background: var(--c-cream);
}

.wc_payment_method > label {
	font-weight: 500;
}

.wc_payment_method .input-radio {
	width: 20px;
	height: 20px;
	margin-inline-end: 8px;
	accent-color: var(--c-primary);
	vertical-align: middle;
}

.wc_payment_method img {
	display: inline-block;
	max-height: 24px;
	margin-inline-start: 8px;
	vertical-align: middle;
}

.payment_box {
	margin-block-start: 6px;
	color: var(--c-muted);
	font-size: var(--fs-small);
}

.payment_box p {
	margin: 0;
}

.woocommerce form .place-order {
	gap: 14px;
	margin: 0;
}

.woocommerce-privacy-policy-text,
.woocommerce-privacy-policy-text p {
	color: var(--c-muted);
	font-size: var(--fs-caption);
	line-height: 1.6;
}

.woocommerce form .c-checkout-terms {
	margin: 0;
}

.c-checkout-terms .woocommerce-form__label-for-checkbox {
	color: var(--c-ink);
}

#place_order {
	width: 100%;
	min-height: 54px;
}

.c-checkout-trust {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 4px 0 0;
	padding: 16px 0 0;
	box-shadow: 0 -1px 0 var(--c-line);
	color: var(--c-muted);
	font-size: var(--fs-small);
	list-style: none;
}

.c-checkout-trust li {
	display: flex;
	align-items: center;
	gap: 10px;
}

.c-checkout-trust .c-icon {
	color: var(--c-accent);
}

/* Woo's blockUI overlay while the order is being placed / totals refresh */
.woocommerce .blockUI.blockOverlay {
	border-radius: var(--r-card);
	background: var(--c-white) !important;
	opacity: .6 !important;
}

.woocommerce .processing {
	cursor: progress;
}

/* 7. Thank-you page
   ========================================================================== */
.c-thanks {
	display: flex;
	flex-direction: column;
	gap: var(--gap-lg);
	max-width: 860px;
	margin-inline: auto;
}

.c-thanks__hero {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 48px);
	border-radius: var(--r-block);
	background: var(--c-cream);
	text-align: center;
}

.c-thanks__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: var(--c-primary);
	color: var(--c-white);
}

.c-thanks__icon .c-icon {
	width: 36px;
	height: 36px;
	stroke-width: 2.25;
}

.c-thanks__next {
	display: flex;
	flex-direction: column;
	gap: var(--gap-md);
}

.c-thanks__steps {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.c-thanks__steps li {
	display: flex;
	gap: 14px;
	padding: 20px;
	border-radius: var(--r-card);
	background: var(--c-white);
	box-shadow: var(--sh-card);
}

.c-thanks__num {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--c-light);
	color: var(--c-primary);
	font-family: var(--ff-head);
	font-weight: 600;
}

.c-thanks__step-title {
	margin-block-end: 4px;
	font-size: var(--fs-h3-sm);
	font-weight: 600;
}

.c-thanks__steps p {
	color: var(--c-muted);
	font-size: var(--fs-small);
	line-height: 1.6;
}

.c-thanks__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 24px;
}

.c-thanks__support {
	color: var(--c-muted);
	font-size: var(--fs-small);
}

@media (min-width: 960px) {
	.c-thanks__steps {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.c-thanks__steps li {
		flex-direction: column;
	}
}

/* Order summary (Woo's order details + customer details) */
.c-thanks__order,
.woocommerce-MyAccount-content .woocommerce-order-details,
.woocommerce-MyAccount-content .woocommerce-customer-details {
	padding: clamp(20px, 3vw, 32px);
	border-radius: var(--r-card);
	background: var(--c-white);
	box-shadow: var(--sh-card);
}

.woocommerce-order-details__title,
.woocommerce-column__title {
	margin-block-end: 12px;
	font-size: var(--fs-h3);
	font-weight: 600;
}

.woocommerce-customer-details {
	margin-block-start: 24px;
}

.woocommerce-customer-details address {
	color: var(--c-muted);
	font-style: normal;
	line-height: 1.7;
}

.woocommerce-customer-details address p {
	margin: 0;
}

.woocommerce-customer-details--phone,
.woocommerce-customer-details--email {
	direction: ltr;
	text-align: end;
}

/* 8. My account
   ========================================================================== */
.woocommerce-account .woocommerce {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--gap-md);
	align-items: start;
}

.woocommerce-account .woocommerce > .woocommerce-notices-wrapper,
.woocommerce-account .woocommerce > h2,
.woocommerce-account .woocommerce > form,
.woocommerce-account .woocommerce > p,
.woocommerce-account .woocommerce > .u-columns {
	grid-column: 1 / -1;
}

.woocommerce-account .woocommerce > h2 {
	font-size: var(--fs-h3);
	font-weight: 600;
}

.woocommerce-MyAccount-navigation ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.woocommerce-MyAccount-navigation a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding-inline: 16px;
	border-radius: var(--r-pill);
	background: var(--c-light);
	font-size: var(--fs-small);
	font-weight: 500;
	text-decoration: none;
}

.woocommerce-MyAccount-navigation a:hover {
	background: var(--c-light-hover);
}

.woocommerce-MyAccount-navigation .is-active a {
	background: var(--c-primary);
	color: var(--c-white);
}

.woocommerce-MyAccount-content > * + * {
	margin-block-start: 20px;
}

.woocommerce-MyAccount-content > p {
	color: var(--c-muted);
}

/* Woo's default dashboard blurb talks about shipping addresses and returns — not relevant to courses */
.woocommerce-MyAccount-content > p:not(:first-of-type) {
	display: none;
}

.c-account-courses {
	align-items: flex-start;
}

.c-account-courses__title {
	font-size: var(--fs-h3);
	font-weight: 600;
}

.woocommerce-MyAccount-content fieldset {
	margin: 24px 0 0;
	padding: 20px;
	border: 1.5px solid var(--c-field);
	border-radius: var(--r-btn);
}

.woocommerce-MyAccount-content legend {
	padding-inline: 8px;
	font-family: var(--ff-head);
	font-weight: 600;
}

.woocommerce-orders-table .button {
	min-height: 44px;
	padding-inline: 16px;
	font-size: var(--fs-small);
}

.woocommerce-password-strength {
	margin-block-start: 6px;
	color: var(--c-muted);
	font-size: var(--fs-caption);
	font-weight: 500;
}

.woocommerce-password-strength.short,
.woocommerce-password-strength.bad {
	color: var(--c-error);
}

@media (min-width: 960px) {
	.woocommerce-account.logged-in .woocommerce {
		grid-template-columns: 240px minmax(0, 1fr);
		gap: 48px;
	}

	.woocommerce-account.logged-in .woocommerce-MyAccount-navigation ul {
		flex-direction: column;
	}

	.woocommerce-account.logged-in .woocommerce-MyAccount-navigation a {
		display: flex;
		border-radius: var(--r-btn);
	}
}

/* Orders table → stacked rows on small screens */
@media (max-width: 639.98px) {
	.woocommerce-orders-table thead {
		display: none;
	}

	.woocommerce-orders-table tr {
		display: block;
		padding-block: 12px;
		box-shadow: inset 0 -1px 0 var(--c-line);
	}

	.woocommerce-orders-table th,
	.woocommerce-orders-table td {
		display: flex;
		justify-content: space-between;
		gap: 12px;
		padding: 4px 0 !important;
		box-shadow: none !important;
	}

	.woocommerce-orders-table td::before {
		content: attr(data-title);
		color: var(--c-muted);
		font-size: var(--fs-caption);
	}
}
