/* Cart, checkout, thank-you, and My Account styles (split from quiz.css). */

.eval-history {
	margin: 1.25rem 0 0;
	overflow-x: auto;
}

.eval-history__title {
	margin: 0 0 0.6rem;
	font-size: 1rem;
}

.eval-history__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
}

.eval-history__table th,
.eval-history__table td {
	padding: 0.55rem 0.4rem;
	border-bottom: 1px solid var(--eval-border);
	text-align: left;
	vertical-align: top;
}

.eval-history__link {
	margin-left: 0.5rem;
}

.eval-history__pager,
.eval-history__more {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	margin: 0.75rem 0 0;
}

.eval-history__pager p,
.eval-history__more {
	margin: 0;
	color: #5b6573;
}

.eval-history--compact {
	position: relative;
	margin: 0.35rem 0 0.15rem;
}

.eval-history--compact .eval-history__title {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.woocommerce-eval-exams .eval-quiz__tag {
	display: inline-block;
	margin-left: 0.5em;
	padding: 0.12em 0.5em;
	border: 1px solid;
	border-radius: 0;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.3;
	text-transform: uppercase;
	vertical-align: middle;
	white-space: nowrap;
}

.woocommerce-eval-exams .eval-quiz__tag--trial {
	color: #c2410c;
	background: #fff7ed;
	border-color: #c2410c;
}

.woocommerce-eval-exams .eval-quiz__tag--full {
	color: #15803d;
	background: #f0fdf4;
	border-color: #16a34a;
}

.woocommerce-eval-exams th.eval-exams-actions,
.woocommerce-eval-exams td.eval-exams-actions {
	text-align: right;
}

.woocommerce-eval-exams td.eval-exams-actions {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: flex-end;
	gap: 0.4rem;
}

.woocommerce-eval-exams td.eval-exams-actions .button {
	flex-shrink: 0;
	white-space: nowrap;
}

.woocommerce-eval-exams a.button.eval-exams-upgrade {
	background: #16a34a;
	background-color: #16a34a;
	color: #fff;
	border: 1px solid #15803d;
	box-shadow: none;
}

.woocommerce-eval-exams a.button.eval-exams-upgrade:hover,
.woocommerce-eval-exams a.button.eval-exams-upgrade:focus-visible {
	background: #15803d;
	background-color: #15803d;
	color: #fff;
	border-color: #166534;
}

.woocommerce-eval-exams button.button.eval-history-toggle {
	background: #fff;
	background-color: #fff;
	color: #1e293b;
	border: 1px solid var(--eval-border, #d6dce4);
	box-shadow: none;
}

.woocommerce-eval-exams button.button.eval-history-toggle:hover,
.woocommerce-eval-exams button.button.eval-history-toggle:focus {
	background: #fff;
	background-color: #fff;
	color: #1e293b;
	border-color: #94a3b8;
}

.woocommerce-eval-exams .eval-history-toggle:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.woocommerce-eval-exams .eval-history-toggle::after {
	content: '';
	display: inline-block;
	width: 0.4rem;
	height: 0.4rem;
	margin: 0 0 0.2rem 0.55rem;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
}

.woocommerce-eval-exams .eval-history-toggle[aria-expanded="true"]::after {
	margin-bottom: -0.2rem;
	transform: rotate(-135deg);
}

.woocommerce-eval-exams tr.eval-history-row[hidden] {
	display: none !important;
}

.woocommerce-eval-exams .eval-history-row td {
	background: var(--eval-bg, #f8fafc);
}

@media (max-width: 768px) {
	.woocommerce table.shop_table_responsive .eval-exams-actions,
	.woocommerce-page table.shop_table_responsive .eval-exams-actions {
		display: flex !important;
		flex-wrap: nowrap;
		justify-content: flex-end;
		text-align: right !important;
	}

	.woocommerce table.shop_table_responsive .eval-exams-actions::before,
	.woocommerce-page table.shop_table_responsive .eval-exams-actions::before {
		display: none;
	}

	.woocommerce table.shop_table_responsive tr.eval-history-row td,
	.woocommerce-page table.shop_table_responsive tr.eval-history-row td {
		display: block;
		text-align: left !important;
	}

	.woocommerce table.shop_table_responsive tr.eval-history-row td::before,
	.woocommerce-page table.shop_table_responsive tr.eval-history-row td::before {
		display: none;
	}
}

.eval-payment-success {
	max-width: 48rem;
	margin: 0 auto;
	padding: 0 0 2.5rem;
}

.eval-payment-success .eval-marketing__hero {
	margin-bottom: 1.5rem;
}

.eval-payment-success .eval-marketing__hero p:last-child {
	margin-bottom: 0;
}

.eval-payment-success .eval-marketing__card .eval-marketing__actions {
	margin-top: 0.35rem;
}

.eval-payment-success .eval-marketing__btn {
	width: 100%;
}

body.eval-payment-success #masthead,
body.eval-payment-success #masthead .site-header-wrap,
body.eval-payment-success #masthead .site-header-row-container-inner {
	background: #fff;
}

body.eval-payment-success .entry-hero,
body.eval-payment-success .entry-header,
body.eval-payment-success .page-title-wrap,
body.eval-payment-success .woocommerce-breadcrumb,
body.eval-payment-success .wp-block-post-title,
body.eval-payment-success #colophon,
body.eval-payment-success footer.site-footer,
body.eval-payment-success .site-footer,
body.woocommerce-order-received #colophon,
body.woocommerce-order-received footer.site-footer,
body.woocommerce-order-received .site-footer {
	display: none !important;
}

body.eval-exam-checkout .wc-block-components-address-form__address_1,
body.eval-exam-checkout .wc-block-components-address-form__address_2,
body.eval-exam-checkout .wc-block-components-address-form__state,
body.eval-exam-checkout .wc-block-components-address-form__phone,
body.eval-exam-checkout .wc-block-components-address-form__company,
body.eval-exam-checkout .wc-block-checkout__add-note,
body.eval-exam-checkout .wp-block-woocommerce-checkout-shipping-address-block,
body.eval-exam-checkout .woocommerce-additional-fields,
body.eval-exam-checkout #billing_address_1_field,
body.eval-exam-checkout #billing_address_2_field,
body.eval-exam-checkout #billing_state_field,
body.eval-exam-checkout #billing_phone_field,
body.eval-exam-checkout #billing_company_field,
body.eval-exam-checkout .woocommerce-additional-fields__field-wrapper {
	display: none !important;
}

body.eval-exam-checkout .wc-block-components-sale-badge,
body.eval-exam-checkout .wc-block-components-product-badge--on-sale,
body.eval-exam-checkout .wc-block-components-order-summary-item__individual-price del {
	display: none !important;
}

.woocommerce td.product-name dl.variation:has(.eval-trial-paid-note),
.woocommerce-checkout-review-order-table dl.variation:has(.eval-trial-paid-note) {
	display: none !important;
}

.wp-block-woocommerce-cart-items-block > .eval-trial-paid-note,
.wp-block-woocommerce-cart-line-items-block > .eval-trial-paid-note {
	display: none !important;
}

.eval-trial-paid-note,
.woocommerce td.product-name p.eval-trial-paid-note,
.woocommerce-cart-form p.eval-trial-paid-note,
.wc-block-cart-item .eval-trial-paid-note,
.wc-block-cart-item__product .eval-trial-paid-note,
.wc-block-components-product-details .eval-trial-paid-note,
.woocommerce-checkout-review-order-table p.eval-trial-paid-note,
body.eval-exam-checkout .eval-trial-paid-note--checkout,
body.eval-exam-checkout .wc-block-components-product-details .eval-trial-paid-note {
	display: block !important;
	width: fit-content !important;
	max-width: 36rem !important;
	flex: 0 1 auto !important;
	margin: 0.5rem 0 0 !important;
	padding: 0.55rem 0.75rem !important;
	background: #e8f1fb !important;
	border: 1px solid #c5d4e8 !important;
	border-left: 3px solid var(--global-palette1, #215387) !important;
	border-radius: 0 !important;
	color: #163e66 !important;
	font-size: 0.88rem !important;
	line-height: 1.45 !important;
	box-shadow: none !important;
}

.eval-checkout-one-time,
body.eval-exam-checkout .eval-checkout-one-time,
.wc-block-checkout__actions .eval-checkout-one-time {
	display: block;
	margin: 0 0 0.75rem;
	color: #163e66;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.4;
}

.eval-checkout-consent {
	margin: 1rem 0 1.25rem;
}

/* ── Exam checkout: streamlined layout ── */

/* Hide "Save payment information to my account" checkbox */
body.eval-exam-checkout .wc-block-components-payment-methods__save-card-info,
body.eval-exam-checkout .woocommerce-SavedPaymentMethods-saveNew,
body.eval-exam-checkout #wc-stripe-new-payment-method,
body.eval-exam-checkout .wc-block-components-checkbox:has([id*="save"]) {
	display: none !important;
}

/* Hide "Additional order information" heading — consent stands alone */
body.eval-exam-checkout .wc-block-checkout__add-note,
body.eval-exam-checkout .wc-block-components-checkout-step:has(.wc-block-checkout__add-note),
body.eval-exam-checkout .woocommerce-additional-fields > h3,
body.eval-exam-checkout .woocommerce-additional-fields > p:not(.eval-checkout-consent),
body.eval-exam-checkout .wc-block-checkout__order-fields > .wc-block-components-checkout-step__heading-container,
body.eval-exam-checkout .wc-block-checkout__order-notes {
	display: none !important;
}

/* First name + last name on one row */
body.eval-exam-checkout .wc-block-components-address-form {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 1rem;
}

body.eval-exam-checkout .wc-block-components-address-form > * {
	grid-column: 1 / -1;
}

body.eval-exam-checkout .wc-block-components-address-form__first_name,
body.eval-exam-checkout .wc-block-components-address-form__postcode {
	grid-column: 1 / 2;
}

body.eval-exam-checkout .wc-block-components-address-form__last_name,
body.eval-exam-checkout .wc-block-components-address-form__city {
	grid-column: 2 / 3;
}

body.eval-exam-checkout .wc-block-components-address-form:not(:has(.wc-block-components-address-form__postcode)) .wc-block-components-address-form__city,
body.eval-exam-checkout .wc-block-components-address-form:not(:has(.wc-block-components-address-form__city)) .wc-block-components-address-form__postcode {
	grid-column: 1 / -1;
}

/* Classic checkout: name fields side by side */
body.eval-exam-checkout #billing_first_name_field,
body.eval-exam-checkout #billing_last_name_field,
body.eval-exam-checkout #billing_postcode_field,
body.eval-exam-checkout #billing_city_field {
	display: inline-block;
	width: 48%;
	vertical-align: top;
	float: none;
}

body.eval-exam-checkout #billing_first_name_field,
body.eval-exam-checkout #billing_postcode_field {
	margin-right: 4%;
}

/* Simplified header: hide nav, search, cart on checkout */
body.eval-exam-checkout #masthead .header-navigation,
body.eval-exam-checkout #masthead .navigation-link-container,
body.eval-exam-checkout #masthead .site-header-item[data-section="header_navigation"],
body.eval-exam-checkout #masthead .kadence-nav-identity-wrap .site-description,
body.eval-exam-checkout #masthead [class*="header_cart"],
body.eval-exam-checkout #masthead .header-cart-wrap,
body.eval-exam-checkout #masthead .eval-header-search,
body.eval-exam-checkout #masthead .header-search-wrap,
body.eval-exam-checkout #masthead .search-toggle-open,
body.eval-exam-checkout #masthead .eval-header-account,
body.eval-exam-checkout #masthead .kadence-header-search,
body.eval-exam-checkout #masthead .mobile-toggle-open,
body.eval-exam-checkout #masthead .mobile-navigation,
body.eval-exam-checkout #masthead .header-mobile-navigation-wrap {
	display: none !important;
}

/* "Billing address" label → hide on digital exam checkout */
body.eval-exam-checkout .wc-block-checkout__billing-fields > .wc-block-components-checkout-step__heading-container,
body.eval-exam-checkout .woocommerce-billing-fields > h3 {
	display: none !important;
}

@media (max-width: 640px) {
	/* Stack name fields on narrow screens */
	body.eval-exam-checkout .wc-block-components-address-form {
		grid-template-columns: 1fr;
	}

	body.eval-exam-checkout .wc-block-components-address-form__first_name,
	body.eval-exam-checkout .wc-block-components-address-form__last_name,
	body.eval-exam-checkout .wc-block-components-address-form__postcode,
	body.eval-exam-checkout .wc-block-components-address-form__city {
		grid-column: 1 / -1;
	}

	body.eval-exam-checkout #billing_first_name_field,
	body.eval-exam-checkout #billing_last_name_field,
	body.eval-exam-checkout #billing_postcode_field,
	body.eval-exam-checkout #billing_city_field {
		display: block;
		width: 100%;
		margin-right: 0;
	}
}

.woocommerce-account .woocommerce-orders-table__cell-order-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	justify-content: flex-end;
	align-items: center;
}

.eval-checkout-account-notice {
	margin: 0 0 1rem;
}

.eval-checkout-account-notice .wc-block-components-notice-banner {
	margin: 0;
}

.eval-checkout-account-notice p {
	margin: 0 0 0.35rem;
}

.eval-checkout-account-notice p:last-child {
	margin-bottom: 0;
}

.eval-checkout-account-notice a,
.wc-block-components-notice-banner__content[data-eval-account-notice] a {
	font-weight: 700;
}

.wc-block-components-notice-banner__content[data-eval-account-notice] p {
	margin: 0 0 0.35rem;
}

.wc-block-components-notice-banner__content[data-eval-account-notice] p:last-child {
	margin-bottom: 0;
}

.woocommerce-account .woocommerce-orders-table__cell-order-actions .button,
.woocommerce-account .woocommerce-orders-table__cell-order-actions .woocommerce-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	float: none;
	margin: 0 !important;
	width: auto;
	white-space: nowrap;
}

