/*
 * AverionHair Account
 *
 * Scoped to .avh-ac. The templates are replaced outright rather than restyled, so this does not
 * fight a theme for specificity - the theme's account markup is never generated. The few
 * `.woocommerce-*` selectors below exist because WooCommerce prints its own notices and messages
 * into our markup, and those we do not own.
 */

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

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

/*
 * Our markup sits inside whatever wrapper the theme's WooCommerce page provides, and some themes
 * make that wrapper a grid or a flex row expecting their own two-part account layout. Left alone,
 * ours becomes a grid ITEM in someone else's grid and is squeezed into a column.
 */
body.woocommerce-account .woocommerce {
	display: block;
	width: 100%;
	max-width: none;
	float: none;
}

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

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

/* --- Header --------------------------------------------------------------------------------- */

.avh-ac__head {
	display: flex;
	gap: 1.25rem;
	align-items: center;
	padding-bottom: 1.75rem;
	border-bottom: 1px solid var(--avh-ac-line);
}

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

/*
 * 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-ac .avh-ac__title {
	margin: 0.4rem 0 0;
	color: var(--avh-ac-ink);
	font-family: var(--avh-ac-font-heading);
	font-size: clamp(1.7rem, 1.2rem + 2vw, 2.4rem);
	font-weight: 400;
	letter-spacing: -0.015em;
	line-height: 1.15;
}

.avh-ac .avh-ac__h2 {
	margin: 0;
	color: var(--avh-ac-ink);
	font-family: var(--avh-ac-font-heading);
	font-size: 1.25rem;
	font-weight: 400;
	line-height: 1.3;
}

/* --- Avatar --------------------------------------------------------------------------------- */

.avh-ac__avatar {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 4rem;
	height: 4rem;
	border-radius: 999px;
	overflow: hidden;
}

.avh-ac__avatar img,
.avh-ac__avatar-img {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 999px;
	object-fit: cover;
}

/*
 * The lettered disc. The hue is derived from the name in PHP and printed inline, so the same
 * person is the same colour everywhere; lightness and saturation are fixed here so no derived hue
 * can ever produce unreadable text on its own background.
 */
.avh-ac__avatar--initials {
	background: hsl(var(--avh-ac-hue, 30) 38% 88%);
	color: hsl(var(--avh-ac-hue, 30) 45% 26%);
	font-family: var(--avh-ac-font-heading);
	font-size: 1.35rem;
	letter-spacing: 0.02em;
}

/* --- Layout --------------------------------------------------------------------------------- */

.avh-ac__layout {
	display: grid;
	gap: 2.5rem;
	margin-top: 2.25rem;
}

@media (min-width: 860px) {
	.avh-ac__layout {
		grid-template-columns: 14rem minmax(0, 1fr);
	}
}

.avh-ac__aside,
.avh-ac__content {
	min-width: 0;
}

/*
 * Anything the theme adds around the navigation - Blocksy's user card, and its equivalents - is
 * hidden while the reset is on. It duplicates the greeting and avatar at the top of this page,
 * and it is the theme's design rather than ours, which is what this plugin exists to replace.
 * Switching the reset off brings it all back.
 */
body.avh-ac-reset-nav .avh-ac__aside > *:not(.avh-ac__nav) {
	display: none;
}

/* --- Navigation ----------------------------------------------------------------------------- */

.avh-ac__nav ul {
	display: flex;
	gap: 0.4rem;
	margin: 0;
	padding: 0;
	list-style: none;
	/* A horizontal, scrollable strip on a phone; a column from the layout breakpoint up. */
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

@media (min-width: 860px) {
	.avh-ac__nav ul {
		flex-direction: column;
		overflow: visible;
	}
}

.avh-ac__nav li {
	margin: 0;
	padding: 0;
	list-style: none;
	flex: 0 0 auto;
}

.avh-ac__nav li::before,
.avh-ac__nav li::marker {
	content: none;
}

/*
 * THEME DECORATION RESET.
 *
 * The navigation deliberately keeps WooCommerce's own class names, because snippets in the wild
 * target them - and that hands the theme a styling hook at the same time. Blocksy, Astra and most
 * commercial themes decorate `.woocommerce-MyAccount-navigation` heavily: an icon in a
 * pseudo-element on every link, their own active pill, their own dividers and borders. The result
 * is our markup wearing the theme's design, which is precisely what this plugin exists to replace.
 *
 * So the classes stay for compatibility and the decoration is removed. Scoped to a body class, so
 * a site that wants the theme's treatment can switch it off.
 */
body.avh-ac-reset-nav .avh-ac__nav li::before,
body.avh-ac-reset-nav .avh-ac__nav li::after,
body.avh-ac-reset-nav .avh-ac__nav a::before,
body.avh-ac-reset-nav .avh-ac__nav a::after {
	content: none !important;
	display: none !important;
}

body.avh-ac-reset-nav .avh-ac__nav,
body.avh-ac-reset-nav .avh-ac__nav ul,
body.avh-ac-reset-nav .avh-ac__nav li {
	border: 0 !important;
	background: none !important;
	box-shadow: none !important;
}

/*
 * Our own link styling, at a specificity that beats the theme's. `.avh-ac .avh-ac__nav ul li a` is
 * (0,3,3) - comfortably past the (0,2,2)-ish selectors themes use here - so the pill is ours
 * without reaching for !important on every property.
 */
.avh-ac .avh-ac__nav ul li a {
	display: block;
	padding: 0.7rem 1rem;
	border: 0;
	border-radius: 12px;
	background: none;
	color: color-mix(in srgb, var(--avh-ac-ink) 65%, transparent);
	font-size: 0.92rem;
	font-weight: 400;
	text-decoration: none;
	text-transform: none;
	letter-spacing: normal;
	white-space: nowrap;
	transition: background-color 200ms var(--avh-ac-ease), color 200ms var(--avh-ac-ease);
}

.avh-ac .avh-ac__nav ul li a:hover {
	background: var(--avh-ac-surface);
	color: var(--avh-ac-ink);
}

.avh-ac .avh-ac__nav ul li.is-active > a {
	background: var(--avh-ac-ink);
	color: var(--avh-ac-cream);
	font-weight: 500;
}

/* --- Stats ---------------------------------------------------------------------------------- */

.avh-ac__stats {
	display: grid;
	gap: 0.75rem;
	grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
	margin-bottom: 1.75rem;
}

.avh-ac__stat {
	display: block;
	padding: 1.1rem 1.25rem;
	border: 1px solid var(--avh-ac-line);
	border-radius: var(--avh-ac-radius);
	background: var(--avh-ac-cream);
	color: inherit;
	text-decoration: none;
	transition: border-color 200ms var(--avh-ac-ease);
}

.avh-ac__stat:hover {
	border-color: var(--avh-ac-accent);
}

.avh-ac__stat-value {
	display: block;
	font-family: var(--avh-ac-font-heading);
	font-size: 1.6rem;
	font-variant-numeric: tabular-nums;
	line-height: 1.1;
}

.avh-ac__stat-label {
	display: block;
	margin-top: 0.3rem;
	color: color-mix(in srgb, var(--avh-ac-ink) 55%, transparent);
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

/* --- Sections, panels, cards ---------------------------------------------------------------- */

.avh-ac__lede {
	margin: 0 0 1.75rem;
	color: color-mix(in srgb, var(--avh-ac-ink) 68%, transparent);
}

.avh-ac__muted {
	color: color-mix(in srgb, var(--avh-ac-ink) 58%, transparent);
	font-size: 0.9rem;
}

.avh-ac__section {
	margin-bottom: 2.5rem;
}

.avh-ac__section-head {
	display: flex;
	gap: 1rem;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 1rem;
}

.avh-ac__panel {
	margin-bottom: 1.5rem;
	padding: 1.5rem;
	border: 1px solid var(--avh-ac-line);
	border-radius: var(--avh-ac-radius);
	background: var(--avh-ac-cream);
}

.avh-ac__panel .avh-ac__h2 {
	margin-bottom: 1.1rem;
}

.avh-ac__link {
	color: var(--avh-ac-accent);
	font-size: 0.85rem;
	text-decoration: none;
}

.avh-ac__link:hover {
	text-decoration: underline;
}

.avh-ac__quick {
	display: grid;
	gap: 0.75rem;
	grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}

.avh-ac__card-link {
	display: block;
	padding: 1.1rem 1.25rem;
	border: 1px solid var(--avh-ac-line);
	border-radius: var(--avh-ac-radius);
	color: inherit;
	text-decoration: none;
	transition: border-color 200ms var(--avh-ac-ease);
}

.avh-ac__card-link:hover {
	border-color: var(--avh-ac-accent);
}

.avh-ac__card-link strong {
	display: block;
	font-family: var(--avh-ac-font-heading);
	font-size: 1.05rem;
	font-weight: 400;
}

.avh-ac__card-link span {
	display: block;
	margin-top: 0.2rem;
	color: color-mix(in srgb, var(--avh-ac-ink) 55%, transparent);
	font-size: 0.85rem;
}

/* --- Orders --------------------------------------------------------------------------------- */

.avh-ac__orders {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.avh-ac__orders li::before,
.avh-ac__orders li::marker {
	content: none;
}

.avh-ac__order {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.5rem;
	align-items: center;
	justify-content: space-between;
	margin: 0;
	padding: 1.1rem 1.25rem;
	border: 1px solid var(--avh-ac-line);
	border-radius: var(--avh-ac-radius);
	list-style: none;
}

.avh-ac__order-main {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem 1rem;
	align-items: baseline;
	min-width: 0;
}

.avh-ac__order-number {
	font-family: var(--avh-ac-font-heading);
	font-size: 1.1rem;
	font-variant-numeric: tabular-nums;
	color: var(--avh-ac-ink);
	text-decoration: none;
}

.avh-ac__order-number:hover {
	color: var(--avh-ac-accent);
}

.avh-ac__order-date,
.avh-ac__order-items {
	color: color-mix(in srgb, var(--avh-ac-ink) 55%, transparent);
	font-size: 0.85rem;
}

.avh-ac__order-meta {
	display: flex;
	gap: 1rem;
	align-items: center;
}

.avh-ac__order-total {
	font-variant-numeric: tabular-nums;
	font-weight: 600;
}

.avh-ac__order-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.avh-ac__status {
	display: inline-flex;
	align-items: center;
	padding: 0.3rem 0.7rem;
	border-radius: 999px;
	background: var(--avh-ac-surface);
	color: var(--avh-ac-ink);
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	white-space: nowrap;
}

.avh-ac__status--completed { background: #dcefe3; color: #1d5c3a; }
.avh-ac__status--processing { background: #e6eefb; color: #1d4b8c; }
.avh-ac__status--cancelled,
.avh-ac__status--failed { background: #f7e0de; color: #8c1d18; }
.avh-ac__status--refunded { background: #efeae2; color: #5c5348; }

/* --- Addresses ------------------------------------------------------------------------------ */

.avh-ac__addresses {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.avh-ac__address {
	padding: 1.4rem;
	border: 1px solid var(--avh-ac-line);
	border-radius: var(--avh-ac-radius);
}

.avh-ac__address header {
	display: flex;
	gap: 1rem;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 0.9rem;
}

.avh-ac__address address {
	margin: 0;
	color: color-mix(in srgb, var(--avh-ac-ink) 75%, transparent);
	font-size: 0.94rem;
	font-style: normal;
	line-height: 1.7;
}

/* --- Forms ---------------------------------------------------------------------------------- */

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

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

.avh-ac__field--inline {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 0.75rem 1.5rem;
	align-items: center;
	justify-content: space-between;
}

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

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

.avh-ac__grid-2 {
	display: grid;
	gap: 0 1rem;
}

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

.avh-ac__help {
	color: color-mix(in srgb, var(--avh-ac-ink) 52%, transparent);
	font-size: 0.78rem;
	letter-spacing: 0;
	text-transform: none;
	font-weight: 400;
}

.avh-ac__check {
	display: inline-flex;
	gap: 0.5rem;
	align-items: center;
	font-size: 0.9rem;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	color: var(--avh-ac-ink);
}

/* The show/hide password eye. */
.avh-ac__reveal {
	position: relative;
	display: block;
}

.avh-ac__reveal .avh-ac__input {
	padding-right: 3rem;
}

/*
 * WOOCOMMERCE'S OWN PASSWORD TOGGLE, SUPPRESSED - reported as a double eye icon on the sign-in card.
 *
 * Neither eye was a styling fault: there were genuinely two buttons. Woo's frontend script walks
 * every password input inside `form.woocommerce-form-login`, `-register` and `-EditAccountForm`,
 * wraps it in `<span class="password-input">` and appends its own `<span class="show-password-input">`.
 * It has no idea the template it is decorating already has a reveal button, because we replaced that
 * template - the same trade that let Blocksy decorate our account nav in v1.1.0.
 *
 * Ours is kept rather than Woo's: it is a real <button> with aria-pressed and a translated label,
 * it is inside our own frame, and every password field in this plugin has one. Two controls for one
 * choice is worse than either.
 */
.avh-ac__reveal .show-password-input,
.avh-ac .show-password-input {
	display: none !important;
}

/*
 * The wrapper Woo injects AROUND the input has to stay transparent to layout.
 *
 * Woo styles `.password-input` as an inline-block, which shrink-wraps - so an input set to 100%
 * width resolves against a box that is sizing itself from that input, and the field collapses. The
 * field would be present, focusable and submitting correctly while looking broken, which is the
 * silent-failure shape this suite keeps running into on form controls.
 */
.avh-ac__reveal .password-input {
	display: block;
	position: static;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
}

/*
 * Hidden until the script has painted it. The icon is drawn by JS, so a script-blocked visitor
 * would otherwise get a 2.25rem invisible button sitting on top of their password field - a target
 * that swallows a click and does nothing. Woo's injected toggle does not exist without script
 * either, so nobody loses a working control here.
 */
.avh-ac__eye[hidden] {
	display: none;
}

.avh-ac__eye {
	position: absolute;
	right: 0.5rem;
	top: 50%;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: color-mix(in srgb, var(--avh-ac-ink) 55%, transparent);
	cursor: pointer;
}

.avh-ac__eye:hover {
	color: var(--avh-ac-accent);
}

.avh-ac__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
	margin: 1.25rem 0 0;
}

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

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

.avh-ac .avh-ac__button--ghost {
	background: transparent;
	color: var(--avh-ac-ink);
}

.avh-ac .avh-ac__button--ghost:hover {
	background: var(--avh-ac-ink);
	border-color: var(--avh-ac-ink);
	color: var(--avh-ac-cream);
}

/* --- Sign in / register --------------------------------------------------------------------- */

.avh-ac--auth {
	padding-block: 1rem;
}

.avh-ac__auth {
	display: grid;
	gap: 2rem;
	align-items: start;
}

@media (min-width: 900px) {
	.avh-ac__auth {
		grid-template-columns: 20rem minmax(0, 1fr);
		gap: 3rem;
	}
}

.avh-ac__auth-brand {
	padding: 2rem;
	border-radius: var(--avh-ac-radius);
	background: var(--avh-ac-ink);
	color: #fff;
}

.avh-ac__auth-brand p:last-child {
	margin-bottom: 0;
	color: rgba(255, 255, 255, 0.65);
	font-size: 0.92rem;
}

/*
 * Three classes deep, so it also beats a theme rule like `.entry-content h2`. The panel behind it
 * is dark, so this is the one heading on the site where getting it wrong makes the text vanish
 * rather than merely look wrong.
 */
/*
 * And a catch-all for anything else that ends up in this panel. The named rule below covers our own
 * markup; this covers whatever a hook or a translation plugin prints into it, which we do not write
 * and cannot add a class to.
 */
.avh-ac .avh-ac__auth-brand h1,
.avh-ac .avh-ac__auth-brand h2,
.avh-ac .avh-ac__auth-brand h3,
.avh-ac .avh-ac__auth-brand h4,
.avh-ac .avh-ac__auth-brand h5,
.avh-ac .avh-ac__auth-brand h6 {
	color: #fff;
}

.avh-ac .avh-ac__auth-brand .avh-ac__auth-title {
	margin: 0.5rem 0 0.9rem;
	color: #fff;
	font-family: var(--avh-ac-font-heading);
	font-size: 1.9rem;
	font-weight: 400;
	line-height: 1.15;
}

.avh-ac__auth-forms {
	display: grid;
	gap: 1.5rem;
}

@media (min-width: 1100px) {
	.avh-ac__auth-forms.has-register {
		grid-template-columns: 1fr 1fr;
		align-items: start;
	}
}

/* --- Empty states --------------------------------------------------------------------------- */

.avh-ac__empty {
	padding: 3rem 2rem;
	border: 1px dashed var(--avh-ac-line);
	border-radius: var(--avh-ac-radius);
	text-align: center;
}

.avh-ac__empty p {
	max-width: 28rem;
	margin: 0.6rem auto 1.5rem;
	color: color-mix(in srgb, var(--avh-ac-ink) 60%, transparent);
}

/* --- Pagination ----------------------------------------------------------------------------- */

.avh-ac__pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: center;
	justify-content: center;
	margin-top: 1.5rem;
}

.avh-ac__page-of {
	color: color-mix(in srgb, var(--avh-ac-ink) 55%, transparent);
	font-size: 0.85rem;
	font-variant-numeric: tabular-nums;
}

/* --- WooCommerce's own notices --------------------------------------------------------------- */

/*
 * Printed into our markup by WooCommerce, so the styling is ours to provide even though the markup
 * is not. Without this they inherit whatever the theme happens to do and look like a different site.
 */
.avh-ac .woocommerce-message,
.avh-ac .woocommerce-error,
.avh-ac .woocommerce-info {
	/*
	 * position: static, deliberately. Themes place an icon in a ::before positioned ABSOLUTELY
	 * against the notice - Blocksy puts a bell there - and it lands squarely on top of the first
	 * word. "No saved methods found." rendered as an icon followed by "saved methods found.",
	 * which inverts the meaning of the sentence.
	 */
	position: static;
	display: block;
	margin: 0 0 1.5rem;
	padding: 0.9rem 1.15rem;
	border: 0;
	border-left: 3px solid var(--avh-ac-accent);
	border-radius: 12px;
	background: color-mix(in srgb, var(--avh-ac-surface) 50%, transparent);
	color: var(--avh-ac-ink);
	font-size: 0.92rem;
	line-height: 1.6;
	list-style: none;
}

/* The icon itself. We give these notices their own accent rule, so a second marker is noise. */
body.avh-ac-reset-nav .avh-ac .woocommerce-message::before,
body.avh-ac-reset-nav .avh-ac .woocommerce-message::after,
body.avh-ac-reset-nav .avh-ac .woocommerce-error::before,
body.avh-ac-reset-nav .avh-ac .woocommerce-error::after,
body.avh-ac-reset-nav .avh-ac .woocommerce-info::before,
body.avh-ac-reset-nav .avh-ac .woocommerce-info::after {
	content: none !important;
	display: none !important;
}

.avh-ac .woocommerce-error {
	border-left-color: #b3261e;
	background: color-mix(in srgb, #b3261e 8%, transparent);
}

.avh-ac .woocommerce-error li {
	margin: 0;
	list-style: none;
}

/* --- WooCommerce's own buttons --------------------------------------------------------------- */

/*
 * The templates we do NOT replace - payment methods, downloads, the single order view - render
 * WooCommerce's `.button`, which the theme then styles in its own colours. Left alone, half the
 * account area is ours and half is the theme's, on the same page. These are the same pill as
 * .avh-ac__button, so the whole section reads as one design.
 *
 * Scoped to the content area so nothing outside it is touched, and `:not(.avh-ac__button)` so the
 * buttons we already style are not fighting two rules.
 */
.avh-ac__content .button:not(.avh-ac__button),
.avh-ac__content .woocommerce-Button:not(.avh-ac__button),
.avh-ac__content button[type="submit"]:not(.avh-ac__button) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	padding: 0.8rem 1.5rem;
	border: 1px solid var(--avh-ac-ink);
	border-radius: 999px;
	background: var(--avh-ac-ink);
	color: var(--avh-ac-cream);
	font-family: inherit;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	line-height: 1;
	text-decoration: none;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 200ms var(--avh-ac-ease), border-color 200ms var(--avh-ac-ease);
}

.avh-ac__content .button:not(.avh-ac__button):hover,
.avh-ac__content .woocommerce-Button:not(.avh-ac__button):hover,
.avh-ac__content button[type="submit"]:not(.avh-ac__button):hover {
	background: var(--avh-ac-accent);
	border-color: var(--avh-ac-accent);
	color: #fff;
}

/* --- Focus ---------------------------------------------------------------------------------- */

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

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

@media (prefers-reduced-motion: reduce) {
	.avh-ac__nav a,
	.avh-ac__stat,
	.avh-ac__card-link,
	.avh-ac .avh-ac__button {
		transition: none;
	}
}
