/*
 * AverionHair Pages - VIP Rewards, Hair Care Academy, Track Your Order.
 *
 * Scoped to .avh-pg throughout, because these render inside whatever the theme calls a page: the
 * styling must be complete enough to look right on any theme and contained enough to change
 * nothing outside itself.
 *
 * Every colour is a custom property falling back to the AverionHair child theme's --avh-* token,
 * so a site running the theme stays in step automatically.
 */

:root {
	--avh-pg-ink: var(--avh-black, #191410);
	--avh-pg-accent: var(--avh-gold, #c29a4f);
	--avh-pg-surface: var(--avh-nude, #ece0cf);
	--avh-pg-cream: var(--avh-cream, #f7f1e6);
	--avh-pg-max: 1080px;

	--avh-pg-font-heading: var(--avh-font-heading, "Fraunces", Georgia, "Times New Roman", serif);
	--avh-pg-font-body: var(--avh-font-body, "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, sans-serif);
	--avh-pg-ease: cubic-bezier(0.16, 1, 0.3, 1);
	--avh-pg-line: color-mix(in srgb, var(--avh-pg-ink) 12%, transparent);
}

.avh-pg {
	box-sizing: border-box;
	max-width: var(--avh-pg-max);
	margin-inline: auto;
	color: var(--avh-pg-ink);
	font-family: var(--avh-pg-font-body);
	font-size: 16px;
	line-height: 1.65;
}

.avh-pg *,
.avh-pg *::before,
.avh-pg *::after {
	box-sizing: border-box;
}

/* --- Shared type ---------------------------------------------------------------------------- */

.avh-pg__eyebrow {
	display: block;
	margin: 0;
	color: var(--avh-pg-accent);
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.28em;
	line-height: 1.4;
	text-transform: uppercase;
}

.avh-pg__head {
	max-width: 46rem;
	margin-bottom: 2.5rem;
}

/*
 * HEADINGS STATE THEIR OWN COLOUR. THEY MUST NOT INHERIT ONE.
 *
 * An inherited colour loses to ANY rule that matches the element itself, at any specificity - that
 * is what inheritance means, and it is not a specificity contest we can win by adding classes to
 * the parent. Every theme styles `h1, h2, h3...` directly, so a heading given no colour of its own
 * takes the THEME's, wherever it happens to sit.
 *
 * On a light panel that is merely off-brand. On a panel whose background we have inverted it is a
 * heading in near-black on near-black - which is exactly how "Welcome back" disappeared off the
 * members card while the gold eyebrow above it and the light paragraph below it, both of which do
 * state a colour, rendered perfectly.
 */
.avh-pg .avh-pg__title {
	margin: 0.6rem 0 0;
	color: var(--avh-pg-ink);
	font-family: var(--avh-pg-font-heading);
	font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.8rem);
	font-weight: 400;
	letter-spacing: -0.015em;
	line-height: 1.12;
}

.avh-pg .avh-pg__h3 {
	margin: 0 0 0.4rem;
	color: var(--avh-pg-ink);
	font-family: var(--avh-pg-font-heading);
	font-size: 1.4rem;
	font-weight: 400;
	line-height: 1.25;
}

.avh-pg__lede {
	margin: 0.9rem 0 0;
	color: color-mix(in srgb, var(--avh-pg-ink) 68%, transparent);
	font-size: 1.05rem;
	line-height: 1.7;
}

.avh-pg__muted {
	color: color-mix(in srgb, var(--avh-pg-ink) 60%, transparent);
	font-size: 0.9rem;
}

.avh-pg__note {
	margin: 1rem 0 0;
	padding: 0.75rem 1rem;
	border-radius: 12px;
	font-size: 0.9rem;
}

.avh-pg__note.is-error {
	background: color-mix(in srgb, #b3261e 8%, transparent);
	color: #8c1d18;
}

/* Wide content scrolls inside its own box rather than pushing the page sideways. */
.avh-pg__scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.avh-pg .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* --- Buttons, fields, pills ----------------------------------------------------------------- */

.avh-pg .avh-pg__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.85rem 1.6rem;
	border: 1px solid var(--avh-pg-ink);
	border-radius: 999px;
	background: var(--avh-pg-ink);
	color: var(--avh-pg-cream);
	font-family: inherit;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	line-height: 1;
	text-decoration: none;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 200ms var(--avh-pg-ease), color 200ms var(--avh-pg-ease);
}

.avh-pg .avh-pg__button:hover {
	background: var(--avh-pg-accent);
	border-color: var(--avh-pg-accent);
	color: #fff;
}

.avh-pg .avh-pg__button--ghost {
	background: transparent;
	color: var(--avh-pg-ink);
}

.avh-pg .avh-pg__button--ghost:hover {
	background: var(--avh-pg-ink);
	color: var(--avh-pg-cream);
}

.avh-pg__field {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	margin: 0;
}

.avh-pg__field label {
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: color-mix(in srgb, var(--avh-pg-ink) 60%, transparent);
}

.avh-pg__field input {
	width: 100%;
	padding: 0.8rem 1rem;
	border: 1px solid var(--avh-pg-line);
	border-radius: 12px;
	background: #fff;
	color: var(--avh-pg-ink);
	font-family: inherit;
	font-size: 0.95rem;
	line-height: 1.4;
}

.avh-pg__field input:focus {
	border-color: var(--avh-pg-accent);
	outline: none;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--avh-pg-accent) 25%, transparent);
}

.avh-pg__pill {
	display: inline-flex;
	align-items: center;
	padding: 0.4rem 0.95rem;
	border: 1px solid var(--avh-pg-line);
	border-radius: 999px;
	color: color-mix(in srgb, var(--avh-pg-ink) 72%, transparent);
	font-size: 0.82rem;
	text-decoration: none;
	transition: border-color 200ms var(--avh-pg-ease), color 200ms var(--avh-pg-ease);
}

.avh-pg__pill:hover {
	border-color: var(--avh-pg-accent);
	color: var(--avh-pg-accent);
}

.avh-pg a:focus-visible,
.avh-pg button:focus-visible,
.avh-pg summary:focus-visible {
	outline: 2px solid var(--avh-pg-accent);
	outline-offset: 3px;
}

/* --- Care --------------------------------------------------------------------------------- */

.avh-pg-care__nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	padding-block: 1.25rem;
	border-top: 1px solid var(--avh-pg-line);
	border-bottom: 1px solid var(--avh-pg-line);
}

.avh-pg-care__guides {
	margin-top: 2rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.avh-pg-care__guide {
	border: 1px solid var(--avh-pg-line);
	border-radius: 18px;
	background: var(--avh-pg-cream);
	overflow: hidden;
	/* Cleared so the browser's find-in-page can scroll a closed guide into view when it opens it. */
	scroll-margin-top: 6rem;
}

.avh-pg-care__summary {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
	padding: 1.25rem 1.4rem;
	cursor: pointer;
	list-style: none;
}

/* Safari draws its own triangle unless this is removed. */
.avh-pg-care__summary::-webkit-details-marker {
	display: none;
}

.avh-pg-care__summary-mark {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 999px;
	background: var(--avh-pg-surface);
	color: var(--avh-pg-ink);
}

.avh-pg-care__summary-text {
	flex: 1 1 auto;
	min-width: 0;
}

.avh-pg-care__guide-title {
	display: block;
	font-family: var(--avh-pg-font-heading);
	font-size: 1.2rem;
	line-height: 1.3;
}

.avh-pg-care__guide-sub {
	display: block;
	margin-top: 0.3rem;
	color: color-mix(in srgb, var(--avh-pg-ink) 62%, transparent);
	font-size: 0.88rem;
	line-height: 1.6;
}

.avh-pg-care__chevron {
	flex: 0 0 auto;
	margin-top: 0.6rem;
	color: color-mix(in srgb, var(--avh-pg-ink) 45%, transparent);
	transition: transform 250ms var(--avh-pg-ease);
}

.avh-pg-care__guide[open] .avh-pg-care__chevron {
	transform: rotate(180deg);
}

.avh-pg-care__body {
	padding: 0 1.4rem 1.5rem;
}

.avh-pg-care__frequency {
	margin: 0 0 1.25rem;
	padding: 0.7rem 1rem;
	border-left: 3px solid var(--avh-pg-accent);
	background: color-mix(in srgb, var(--avh-pg-surface) 45%, transparent);
	font-size: 0.88rem;
}

.avh-pg-care__frequency strong {
	display: block;
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: color-mix(in srgb, var(--avh-pg-ink) 55%, transparent);
}

.avh-pg .avh-pg-care__h {
	margin: 0 0 0.6rem;
	font-family: var(--avh-pg-font-body);
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: color-mix(in srgb, var(--avh-pg-ink) 55%, transparent);
}

.avh-pg-care__steps {
	margin: 0 0 1.5rem;
	padding-left: 1.3rem;
}

.avh-pg-care__steps li {
	margin-bottom: 0.55rem;
	padding-left: 0.3rem;
}

.avh-pg-care__split {
	display: grid;
	gap: 1.5rem;
	margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
	.avh-pg-care__split {
		grid-template-columns: 1fr 1fr;
	}
}

.avh-pg-care__split ul,
.avh-pg-care__tips ul {
	margin: 0;
	padding-left: 1.1rem;
	font-size: 0.92rem;
}

.avh-pg-care__split li,
.avh-pg-care__tips li {
	margin-bottom: 0.45rem;
}

.avh-pg-care__do li::marker {
	color: #2f7d54;
}

.avh-pg-care__avoid li::marker {
	color: #b3261e;
}

.avh-pg-care__tips {
	padding: 1rem 1.2rem;
	border-radius: 12px;
	background: color-mix(in srgb, var(--avh-pg-surface) 40%, transparent);
}

/* --- Care: rhythm table + FAQ --------------------------------------------------------------- */

.avh-pg-care__rhythm,
.avh-pg-care__faqs {
	margin-top: 3rem;
}

.avh-pg-care__table {
	width: 100%;
	min-width: 26rem;
	margin-top: 1rem;
	border-collapse: collapse;
	font-size: 0.92rem;
}

.avh-pg-care__table th,
.avh-pg-care__table td {
	padding: 0.75rem 1rem;
	border-bottom: 1px solid var(--avh-pg-line);
	text-align: left;
	vertical-align: top;
}

.avh-pg-care__table thead th {
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: color-mix(in srgb, var(--avh-pg-ink) 55%, transparent);
}

.avh-pg-care__table tbody th {
	font-weight: 600;
}

/* --- Care: the Melt Grip System™ guide - a product table + phase list, not a routine ------------ */

.avh-pg-care__system-table {
	min-width: 40rem;
}

.avh-pg-care__phases {
	display: grid;
	gap: 1.25rem;
	margin: 1.5rem 0 0;
	padding: 0;
	list-style: none;
	grid-template-columns: 1fr;
}

@media (min-width: 640px) {
	.avh-pg-care__phases {
		grid-template-columns: 1fr 1fr;
	}
}

.avh-pg-care__phases li {
	padding: 1rem 1.2rem;
	border-radius: 12px;
	background: color-mix(in srgb, var(--avh-pg-surface) 40%, transparent);
}

.avh-pg-care__phases li strong {
	display: block;
	margin-bottom: 0.4rem;
	font-family: var(--avh-pg-font-heading);
	font-size: 1rem;
	font-weight: 400;
	color: var(--avh-pg-ink);
}

.avh-pg-care__phases p {
	margin: 0 0 0.5rem;
	font-size: 0.9rem;
	color: color-mix(in srgb, var(--avh-pg-ink) 72%, transparent);
}

.avh-pg-care__phase-result {
	margin: 0 !important;
	color: var(--avh-pg-ink) !important;
}

.avh-pg-care__phase-result em {
	color: var(--avh-pg-accent);
	font-style: normal;
	font-weight: 600;
}

.avh-pg-care__faq {
	padding: 1rem 0;
	border-bottom: 1px solid var(--avh-pg-line);
}

.avh-pg-care__faq summary {
	cursor: pointer;
	font-family: var(--avh-pg-font-heading);
	font-size: 1.05rem;
	line-height: 1.4;
}

.avh-pg-care__faq p {
	margin: 0.7rem 0 0;
	color: color-mix(in srgb, var(--avh-pg-ink) 72%, transparent);
	font-size: 0.94rem;
}

/* --- Track ---------------------------------------------------------------------------------- */

.avh-pg-track__form {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: flex-end;
	padding: 1.5rem;
	border: 1px solid var(--avh-pg-line);
	border-radius: 18px;
	background: var(--avh-pg-cream);
}

.avh-pg-track__fields {
	display: grid;
	flex: 1 1 22rem;
	gap: 1rem;
	min-width: 0;
}

@media (min-width: 560px) {
	.avh-pg-track__fields {
		grid-template-columns: 1fr 1.3fr;
	}
}

.avh-pg-track__result {
	margin-top: 2rem;
	padding: 1.75rem;
	border: 1px solid var(--avh-pg-line);
	border-radius: 18px;
}

.avh-pg-track__summary {
	display: grid;
	gap: 1.25rem;
	grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
	padding-bottom: 1.5rem;
	border-bottom: 1px solid var(--avh-pg-line);
}

.avh-pg-track__summary p {
	margin: 0.3rem 0 0;
	font-size: 0.98rem;
}

.avh-pg-track__number {
	font-family: var(--avh-pg-font-heading);
	font-size: 1.3rem;
	font-variant-numeric: tabular-nums;
}

.avh-pg-track__status {
	font-weight: 600;
}

/*
 * One rule per WooCommerce default order status - all seven, so the badge always says something
 * rather than falling back to plain ink for whichever one nobody got round to. `is-<status>` is
 * printed straight from get_status() in the template, so a status this shop adds later (a plugin
 * registering its own) simply keeps the unstyled default rather than breaking.
 */
.avh-pg-track__status.is-pending,
.avh-pg-track__status.is-on-hold {
	color: #9a6a12;
}

.avh-pg-track__status.is-processing {
	color: var(--avh-pg-accent);
}

.avh-pg-track__status.is-completed {
	color: #2f7d54;
}

.avh-pg-track__status.is-cancelled,
.avh-pg-track__status.is-failed {
	color: #b3261e;
}

.avh-pg-track__status.is-refunded {
	color: color-mix(in srgb, var(--avh-pg-ink) 55%, transparent);
}

/* The timeline: a rail with a dot per stage. */
.avh-pg-track__timeline {
	margin: 1.75rem 0 0;
	padding: 0;
	list-style: none;
}

.avh-pg-track__timeline li {
	position: relative;
	padding: 0 0 1.5rem 2rem;
	color: color-mix(in srgb, var(--avh-pg-ink) 45%, transparent);
	font-size: 0.95rem;
}

.avh-pg-track__timeline li:last-child {
	padding-bottom: 0;
}

/* The rail, drawn between consecutive dots rather than behind all of them, so it stops cleanly
   at the last stage instead of trailing off the end of the list. */
.avh-pg-track__timeline li:not(:last-child)::before {
	content: "";
	position: absolute;
	left: 0.53rem;
	top: 1.1rem;
	bottom: -0.2rem;
	width: 1px;
	background: var(--avh-pg-line);
}

.avh-pg-track__dot {
	position: absolute;
	left: 0;
	top: 0.35rem;
	width: 1.1rem;
	height: 1.1rem;
	border: 2px solid var(--avh-pg-line);
	border-radius: 999px;
	background: #fff;
}

.avh-pg-track__timeline li.is-done {
	color: color-mix(in srgb, var(--avh-pg-ink) 70%, transparent);
}

.avh-pg-track__timeline li.is-done .avh-pg-track__dot {
	border-color: var(--avh-pg-accent);
	background: var(--avh-pg-accent);
}

.avh-pg-track__timeline li.is-current {
	color: var(--avh-pg-ink);
	font-weight: 600;
}

.avh-pg-track__timeline li.is-current .avh-pg-track__dot {
	border-color: var(--avh-pg-accent);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--avh-pg-accent) 22%, transparent);
}

.avh-pg-track__timeline li.is-stopped .avh-pg-track__dot {
	border-color: #b3261e;
	background: #b3261e;
}

.avh-pg-track__shipment {
	margin-top: 1.75rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--avh-pg-line);
}

.avh-pg-track__shipment dl {
	display: grid;
	gap: 0.35rem 1.5rem;
	grid-template-columns: auto 1fr;
	margin: 0.75rem 0 1.25rem;
	font-size: 0.92rem;
}

.avh-pg-track__shipment dt {
	color: color-mix(in srgb, var(--avh-pg-ink) 55%, transparent);
}

.avh-pg-track__shipment dd {
	margin: 0;
}

/*
 * More than one parcel is now an ordinary order, not an edge case: the Delivery & Origins plugin
 * splits a cart holding stock from two countries into two shipments on purpose. Each parcel needs
 * its own box, or two tracking numbers run together into one unreadable list.
 */
.avh-pg-track__parcel + .avh-pg-track__parcel {
	margin-top: 1.25rem;
	padding-top: 1.25rem;
	border-top: 1px dashed var(--avh-pg-line);
}

.avh-pg-track__parcel .avh-pg__eyebrow {
	margin: 0;
}

/* Colour stated, never inherited - an inherited colour loses to any theme rule that matches the
 * element itself, which is how the account plugin ended up with a black heading on a black card. */
.avh-pg-track__origins {
	margin: 1.25rem 0 0;
	font-size: 0.92rem;
	color: color-mix(in srgb, var(--avh-pg-ink) 70%, transparent);
}

/* --- Rewards -------------------------------------------------------------------------------- */

.avh-pg-rewards__standing,
.avh-pg-rewards__join {
	padding: 1.75rem;
	border: 1px solid var(--avh-pg-line);
	border-radius: 18px;
	background: var(--avh-pg-cream);
}

.avh-pg-rewards__standing-head {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: center;
	justify-content: space-between;
}

.avh-pg-rewards__points {
	margin: 0;
	font-size: 0.9rem;
	color: color-mix(in srgb, var(--avh-pg-ink) 60%, transparent);
}

.avh-pg-rewards__points strong {
	display: block;
	font-family: var(--avh-pg-font-heading);
	font-size: 2rem;
	font-variant-numeric: tabular-nums;
	color: var(--avh-pg-ink);
	line-height: 1.1;
}

.avh-pg-rewards__badge {
	display: inline-flex;
	align-items: center;
	padding: 0.4rem 1rem;
	border-radius: 999px;
	background: var(--avh-pg-ink);
	color: var(--avh-pg-cream);
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

/*
 * The named tiers get their metal. Anything a shop adds of its own falls back to the ink badge
 * above, which is deliberate - a tier called "Platinum" in a gold badge would be worse than a
 * neutral one.
 */
.avh-pg-rewards__badge--bronze { background: #8a5a2b; color: #fff; }
.avh-pg-rewards__badge--silver { background: #8d9296; color: #fff; }
.avh-pg-rewards__badge--gold   { background: var(--avh-pg-accent); color: #fff; }

.avh-pg-rewards__progress {
	margin-top: 1.5rem;
}

.avh-pg-rewards__bar {
	height: 0.5rem;
	margin-bottom: 0.6rem;
	border-radius: 999px;
	background: color-mix(in srgb, var(--avh-pg-ink) 10%, transparent);
	overflow: hidden;
}

.avh-pg-rewards__bar span {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: var(--avh-pg-accent);
	transition: width 600ms var(--avh-pg-ease);
}

.avh-pg-rewards__perks {
	margin: 1.25rem 0 0;
	padding-left: 1.1rem;
	font-size: 0.94rem;
}

.avh-pg-rewards__perks li {
	margin-bottom: 0.35rem;
}

.avh-pg-rewards__ladder {
	margin-top: 3rem;
}

.avh-pg-rewards__tiers {
	display: grid;
	gap: 1rem;
	margin-top: 1.25rem;
	grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.avh-pg-rewards__tier {
	padding: 1.4rem;
	border: 1px solid var(--avh-pg-line);
	border-radius: 18px;
}

.avh-pg-rewards__tier.is-current {
	border-color: var(--avh-pg-accent);
	box-shadow: 0 0 0 1px var(--avh-pg-accent);
}

.avh-pg-rewards__tier header {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
	justify-content: space-between;
}

.avh-pg-rewards__you {
	color: var(--avh-pg-accent);
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.avh-pg-rewards__threshold {
	margin: 0.8rem 0 0.6rem;
	color: color-mix(in srgb, var(--avh-pg-ink) 60%, transparent);
	font-size: 0.85rem;
}

.avh-pg-rewards__tier ul {
	margin: 0;
	padding-left: 1.1rem;
	font-size: 0.9rem;
}

.avh-pg-rewards__tier li {
	margin-bottom: 0.3rem;
}

.avh-pg-rewards__rate {
	margin-top: 1.25rem;
}

/* --- Referral ------------------------------------------------------------------------------- */

.avh-pg-referral {
	margin-top: 3rem;
	padding: 1.75rem;
	border: 1px solid var(--avh-pg-line);
	border-radius: 18px;
	background: color-mix(in srgb, var(--avh-pg-surface) 35%, transparent);
}

.avh-pg-referral__link {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin-top: 1rem;
}

.avh-pg-referral__link input {
	flex: 1 1 18rem;
	min-width: 0;
	padding: 0.8rem 1rem;
	border: 1px solid var(--avh-pg-line);
	border-radius: 12px;
	background: #fff;
	color: var(--avh-pg-ink);
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 0.85rem;
}

.avh-pg-referral__code {
	margin: 1rem 0 0;
	color: color-mix(in srgb, var(--avh-pg-ink) 60%, transparent);
	font-size: 0.85rem;
}

.avh-pg-referral__code code {
	margin-left: 0.4rem;
	padding: 0.2rem 0.6rem;
	border-radius: 6px;
	background: var(--avh-pg-surface);
	color: var(--avh-pg-ink);
	font-size: 0.95em;
	letter-spacing: 0.12em;
}

/* --- Keeping the theme out of it --------------------------------------------------------------- */

/*
 * These pages render inside the theme's post content, and inside the account area's Rewards tab.
 * Two collisions happen there, both seen on a live Blocksy site:
 *
 * 1. Themes decorate list items with an icon or bullet in a ::before. Our lists already have their
 *    own markers - numbered steps, coloured do/avoid bullets - so a theme's is a SECOND marker
 *    beside ours.
 * 2. Themes place the icon on a WooCommerce notice in an ABSOLUTELY positioned ::before, which
 *    lands on top of the first word. On this shop that turned "No saved methods found." into
 *    "[bell] saved methods found." - a decoration that inverted the meaning of a sentence.
 *
 * Listed one by one rather than as a blanket `li::before { content: none }`, because the timeline
 * on the tracking page draws its own rail in exactly that pseudo-element, and a blanket rule would
 * delete it.
 */
.avh-pg-care__steps li::before,
.avh-pg-care__split li::before,
.avh-pg-care__tips li::before,
.avh-pg-care__phases li::before,
.avh-pg-rewards__perks li::before,
.avh-pg-rewards__tier li::before,
.avh-pg-referral li::before {
	content: none;
}

.avh-pg .woocommerce-message,
.avh-pg .woocommerce-error,
.avh-pg .woocommerce-info {
	position: static;
	margin: 0 0 1.5rem;
	padding: 0.9rem 1.15rem;
	border: 0;
	border-left: 3px solid var(--avh-pg-accent);
	border-radius: 12px;
	background: color-mix(in srgb, var(--avh-pg-surface) 45%, transparent);
	color: var(--avh-pg-ink);
	font-size: 0.92rem;
	list-style: none;
}

.avh-pg .woocommerce-message::before,
.avh-pg .woocommerce-message::after,
.avh-pg .woocommerce-error::before,
.avh-pg .woocommerce-error::after,
.avh-pg .woocommerce-info::before,
.avh-pg .woocommerce-info::after {
	content: none !important;
	display: none !important;
}

/*
 * WooCommerce's own buttons, where they appear alongside ours - so a page is not half our design
 * and half the theme's. :not(.avh-pg__button) keeps the ones we already style out of it.
 */
.avh-pg .button:not(.avh-pg__button),
.avh-pg .woocommerce-Button:not(.avh-pg__button) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	padding: 0.85rem 1.6rem;
	border: 1px solid var(--avh-pg-ink);
	border-radius: 999px;
	background: var(--avh-pg-ink);
	color: var(--avh-pg-cream);
	font-family: inherit;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	line-height: 1;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color 200ms var(--avh-pg-ease);
}

.avh-pg .button:not(.avh-pg__button):hover,
.avh-pg .woocommerce-Button:not(.avh-pg__button):hover {
	background: var(--avh-pg-accent);
	border-color: var(--avh-pg-accent);
	color: #fff;
}

/* --- Motion --------------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.avh-pg-care__chevron,
	.avh-pg-rewards__bar span,
	.avh-pg__pill,
	.avh-pg .avh-pg__button {
		transition: none;
	}
}

/* --- Print ---------------------------------------------------------------------------------- */

/*
 * The care guide is the one page here somebody genuinely prints. Every guide is forced open,
 * because printing a page of collapsed summaries produces a contents list and no content.
 */
@media print {
	.avh-pg-care__guide,
	.avh-pg-care__faq {
		break-inside: avoid;
	}
	.avh-pg-care__body {
		display: block !important;
	}
	.avh-pg-care__nav,
	.avh-pg-care__chevron,
	.avh-pg-track__form {
		display: none;
	}
	.avh-pg-care__guide,
	.avh-pg-care__tips,
	.avh-pg-care__frequency {
		background: none;
		border-color: #999;
	}
}

/* --- Order tracking: what is in the box ----------------------------------------------------- */

.avh-pg-track__items {
	margin-top: 1.5rem;
}

.avh-pg-track__items ul {
	margin: 0.6rem 0 0;
	padding: 0;
	list-style: none;
}

.avh-pg-track__items li {
	display: flex;
	gap: 1rem;
	align-items: baseline;
	justify-content: space-between;
	padding: 0.6rem 0;
	border-bottom: 1px solid color-mix(in srgb, var(--avh-pg-ink) 10%, transparent);
}

.avh-pg-track__items li:last-child {
	border-bottom: 0;
}

/*
 * The timeline draws its own rail in ::before on its list items. This list is a sibling of it and
 * must not inherit that - the marker reset in this stylesheet is deliberately item by item for
 * exactly this reason, so nothing here adds a blanket rule.
 */
.avh-pg-track__item-name {
	min-width: 0;
}

.avh-pg-track__item-qty {
	flex: 0 0 auto;
	color: color-mix(in srgb, var(--avh-pg-ink) 60%, transparent);
	font-size: 0.85rem;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

/* --- Track, 1.5.1: the page around the form ------------------------------------------------- */

/* Form and "Where's my order number?" side by side on a wide screen; stacked on a phone. */
.avh-pg-track__top {
	display: grid;
	gap: 1.25rem;
	margin-top: 2rem;
}

@media (min-width: 900px) {
	.avh-pg-track__top.has-aside {
		grid-template-columns: minmax(0, 1.75fr) minmax(16rem, 1fr);
		align-items: start;
	}
}

.avh-pg-track__main {
	min-width: 0;
}

/* The form already sits in the row above's spacing. */
.avh-pg-track__top .avh-pg-track__form {
	margin-top: 0;
}

.avh-pg-track__aside {
	padding: 1.5rem;
	border: 1px solid var(--avh-pg-line);
	border-radius: 18px;
	background: color-mix(in srgb, var(--avh-pg-surface) 35%, var(--avh-pg-cream));
}

.avh-pg-track__aside .avh-pg__h3 {
	font-size: 1.15rem;
}

.avh-pg .avh-pg-track__hints {
	display: grid;
	gap: 0.6rem;
	margin: 0.85rem 0 0;
	padding: 0;
	list-style: none;
	color: color-mix(in srgb, var(--avh-pg-ink) 78%, var(--avh-pg-cream));
	font-size: 0.9rem;
	line-height: 1.55;
}

.avh-pg .avh-pg-track__hints li {
	position: relative;
	margin: 0;
	padding-left: 1.1rem;
}

.avh-pg .avh-pg-track__hints li::before {
	content: "";
	position: absolute;
	top: 0.6em;
	left: 0;
	width: 0.4rem;
	height: 0.4rem;
	border-radius: 50%;
	background: var(--avh-pg-accent);
}

.avh-pg .avh-pg-track__aside-link {
	display: inline-block;
	margin-top: 1rem;
	color: var(--avh-pg-ink);
	font-size: 0.88rem;
	font-weight: 500;
	text-decoration: underline;
	text-decoration-color: var(--avh-pg-accent);
	text-underline-offset: 4px;
}

.avh-pg .avh-pg-track__aside-link:hover {
	color: var(--avh-pg-accent);
}

/* A signed-in customer's own orders. */
.avh-pg .avh-pg-track__recent {
	display: grid;
	margin: 0.75rem 0 0;
	padding: 0;
	list-style: none;
}

.avh-pg .avh-pg-track__recent li {
	display: flex;
	gap: 1rem;
	align-items: center;
	justify-content: space-between;
	margin: 0;
	padding: 0.7rem 0;
	border-bottom: 1px solid var(--avh-pg-line);
}

.avh-pg .avh-pg-track__recent li::before {
	content: none;
}

.avh-pg-track__recent-main {
	display: grid;
	gap: 0.1rem;
	min-width: 0;
}

.avh-pg-track__recent-main strong {
	color: var(--avh-pg-ink);
	font-family: var(--avh-pg-font-heading);
	font-size: 1.05rem;
	font-weight: 400;
}

.avh-pg-track__recent-meta {
	color: color-mix(in srgb, var(--avh-pg-ink) 60%, var(--avh-pg-cream));
	font-size: 0.8rem;
}

.avh-pg .avh-pg-track__recent-link {
	flex: none;
	padding: 0.45rem 0.9rem;
	border: 1px solid var(--avh-pg-ink);
	border-radius: 999px;
	color: var(--avh-pg-ink);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-decoration: none;
	text-transform: uppercase;
}

.avh-pg .avh-pg-track__recent-link:hover,
.avh-pg .avh-pg-track__recent-link:focus-visible {
	background: var(--avh-pg-ink);
	color: var(--avh-pg-cream);
}

/* The sections below: one rhythm for all three. */
.avh-pg-track__next,
.avh-pg-track__delivery,
.avh-pg-track__help {
	margin-top: clamp(2.5rem, 2rem + 2vw, 3.75rem);
}

.avh-pg-track__next .avh-pg__eyebrow {
	margin-bottom: 0.35rem;
}

/* What happens next: a row of four on a wide screen, a vertical list on a phone. */
.avh-pg .avh-pg-track__steps {
	display: grid;
	gap: 1rem;
	margin: 1.25rem 0 0;
	padding: 0;
	list-style: none;
	counter-reset: none;
}

@media (min-width: 760px) {
	.avh-pg .avh-pg-track__steps {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.avh-pg .avh-pg-track__steps li {
	position: relative;
	display: grid;
	gap: 0.45rem;
	align-content: start;
	margin: 0;
	padding: 1.25rem 1.25rem 1.4rem;
	border: 1px solid var(--avh-pg-line);
	border-radius: 16px;
	background: var(--avh-pg-cream);
}

.avh-pg .avh-pg-track__steps li::before {
	content: none;
}

.avh-pg-track__step-num {
	display: inline-grid;
	place-items: center;
	width: 2.1rem;
	height: 2.1rem;
	border: 1px solid color-mix(in srgb, var(--avh-pg-accent) 60%, var(--avh-pg-cream));
	border-radius: 50%;
	background: #fffdf9;
	color: var(--avh-pg-accent);
	font-family: var(--avh-pg-font-heading);
	font-size: 0.95rem;
}

.avh-pg-track__step-label {
	color: var(--avh-pg-ink);
	font-family: var(--avh-pg-font-heading);
	font-size: 1.1rem;
	line-height: 1.25;
}

.avh-pg-track__step-text {
	color: color-mix(in srgb, var(--avh-pg-ink) 70%, var(--avh-pg-cream));
	font-size: 0.88rem;
	line-height: 1.55;
}

/* Delivery times reuse the care tables' look; the time column is the answer, so it leads. */
.avh-pg-track__table td:nth-child(2) {
	color: var(--avh-pg-ink);
	font-weight: 600;
	white-space: nowrap;
}

.avh-pg-track__delivery .avh-pg__muted {
	margin: 0.75rem 0 0;
}

/* Still need help? */
.avh-pg .avh-pg-track__help-grid {
	display: grid;
	gap: 1rem;
	margin: 1.1rem 0 0;
	padding: 0;
	list-style: none;
	grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

.avh-pg .avh-pg-track__help-grid li {
	margin: 0;
}

.avh-pg .avh-pg-track__help-grid li::before {
	content: none;
}

.avh-pg .avh-pg-track__help-card {
	display: grid;
	gap: 0.35rem;
	align-content: start;
	height: 100%;
	padding: 1.2rem 1.25rem;
	border: 1px solid var(--avh-pg-line);
	border-radius: 16px;
	background: #fffdf9;
	color: var(--avh-pg-ink);
	text-decoration: none;
	transition: border-color 200ms var(--avh-pg-ease), transform 300ms var(--avh-pg-ease);
}

.avh-pg .avh-pg-track__help-card:hover {
	border-color: var(--avh-pg-accent);
	transform: translateY(-2px);
}

.avh-pg .avh-pg-track__help-card:focus-visible {
	outline: 2px solid var(--avh-pg-accent);
	outline-offset: 2px;
}

.avh-pg-track__help-title {
	font-family: var(--avh-pg-font-heading);
	font-size: 1.1rem;
}

.avh-pg-track__help-text {
	overflow-wrap: anywhere;
	color: color-mix(in srgb, var(--avh-pg-ink) 65%, var(--avh-pg-cream));
	font-size: 0.86rem;
	line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
	.avh-pg .avh-pg-track__help-card {
		transition: none;
	}

	.avh-pg .avh-pg-track__help-card:hover {
		transform: none;
	}
}
