/**
 * Antivig Membership — front-end styles.
 *
 * Scoped under .av-* so the plugin can drop into any theme without a reset
 * war. Colours are tokens so a theme (or the child theme) can retint the whole
 * thing by redefining a handful of custom properties — the Antivig child
 * theme redefines exactly these.
 *
 * Palette from PLAN.md §4.3: scoreboard navy, chalk, steel, and the ember used
 * sparingly. Daylight analytics, not a neon casino.
 */

:root {
	--av-ink: #0e1a2b;
	--av-ink-soft: #3c4a5c;
	--av-ink-faint: #5a6b80;
	--av-surface: #ffffff;
	--av-surface-alt: #f4f6f3;
	--av-line: #dfe4e9;
	--av-accent: #f2a900;
	--av-accent-ink: #0e1a2b;
	--av-win: #1f9d5b;
	--av-loss: #d1453b;
	--av-radius: 12px;
	--av-radius-sm: 8px;
	--av-gap: 1.25rem;
	--av-shadow: 0 1px 2px rgba(14, 26, 43, 0.06), 0 8px 24px rgba(14, 26, 43, 0.06);
	--av-focus: 0 0 0 3px rgba(242, 169, 0, 0.45);
}

@media (prefers-color-scheme: dark) {
	:root {
		--av-ink: #e8edf2;
		--av-ink-soft: #b3bfcc;
		--av-ink-faint: #8b9aab;
		--av-surface: #101c2e;
		--av-surface-alt: #0b1422;
		--av-line: #22314a;
		--av-accent: #f2a900;
		--av-accent-ink: #0b1422;
		--av-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 12px 32px rgba(0, 0, 0, 0.35);
	}
}

/* ------------------------------------------------------------- typography */

.av-section__title {
	margin: 2.5rem 0 1rem;
	font-size: 1.4rem;
	letter-spacing: -0.01em;
}

.av-section__title:first-child {
	margin-top: 0;
}

.av-muted {
	color: var(--av-ink-faint);
	font-size: 0.9rem;
}

.av-empty {
	margin: 2rem 0;
	color: var(--av-ink-faint);
}

.av-list {
	margin: 0.5rem 0;
	padding-left: 1.1rem;
}

/* ---------------------------------------------------------------- buttons */

.av-button {
	display: inline-block;
	padding: 0.65rem 1.15rem;
	border: 1px solid transparent;
	border-radius: var(--av-radius-sm);
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
}

.av-button:focus-visible {
	outline: none;
	box-shadow: var(--av-focus);
}

.av-button[disabled] {
	opacity: 0.55;
	cursor: not-allowed;
}

.av-button--primary {
	background: var(--av-accent);
	color: var(--av-accent-ink);
}

.av-button--ghost {
	background: transparent;
	border-color: var(--av-line);
	color: var(--av-ink);
}

/* ---------------------------------------------------------------- notices */

.av-notice {
	margin: 1.25rem 0;
	padding: 0.9rem 1.1rem;
	border: 1px solid var(--av-line);
	border-left-width: 4px;
	border-radius: var(--av-radius-sm);
	background: var(--av-surface-alt);
	color: var(--av-ink);
}

.av-notice p {
	margin: 0 0 0.5rem;
}

.av-notice p:last-child {
	margin-bottom: 0;
}

.av-notice--success {
	border-left-color: var(--av-win);
}

.av-notice--warning {
	border-left-color: var(--av-accent);
}

/* ------------------------------------------------------------------ plans */

.av-membership__lede {
	max-width: 46rem;
	color: var(--av-ink-soft);
	font-size: 1.05rem;
	line-height: 1.6;
}

.av-plans {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
	gap: var(--av-gap);
	margin: 1.5rem 0;
}

.av-plan {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: 1.4rem;
	border: 1px solid var(--av-line);
	border-radius: var(--av-radius);
	background: var(--av-surface);
	box-shadow: var(--av-shadow);
}

.av-plan.is-current {
	border-color: var(--av-accent);
}

.av-plan__name {
	margin: 0;
	font-size: 1.15rem;
}

.av-plan__price {
	margin: 0;
	display: flex;
	align-items: baseline;
	gap: 0.4rem;
}

.av-plan__amount {
	font-size: 2rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.02em;
}

.av-plan__cadence {
	color: var(--av-ink-faint);
	font-size: 0.9rem;
}

.av-plan__description {
	margin: 0;
	color: var(--av-ink-soft);
	font-size: 0.95rem;
	line-height: 1.55;
}

.av-plan__benefits,
.av-plan__features {
	margin: 0;
	padding-left: 1.1rem;
	font-size: 0.93rem;
	line-height: 1.7;
}

.av-plan__features {
	color: var(--av-ink-soft);
}

.av-plan__alt {
	margin: 0;
	color: var(--av-ink-faint);
	font-size: 0.88rem;
}

.av-plan .av-button {
	margin-top: auto;
	text-align: center;
}

.av-checkout__status {
	min-height: 1.4rem;
	margin: 0.5rem 0 1.5rem;
	font-size: 0.92rem;
}

.av-membership__included ul {
	padding-left: 1.1rem;
	line-height: 1.8;
}

.av-membership__disclaimer,
.av-membership__payment-note {
	max-width: 46rem;
	color: var(--av-ink-faint);
	font-size: 0.85rem;
	line-height: 1.6;
}

/* ---------------------------------------------------------------- paywall */

.av-paywall {
	margin: 2rem 0;
	padding: 1.6rem;
	border: 1px solid var(--av-line);
	border-radius: var(--av-radius);
	background: var(--av-surface-alt);
}

.av-paywall__title {
	margin: 0 0 0.6rem;
	font-size: 1.3rem;
	letter-spacing: -0.01em;
}

.av-paywall__pitch {
	margin: 0 0 1.1rem;
	max-width: 40rem;
	color: var(--av-ink-soft);
	line-height: 1.6;
}

.av-paywall__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin: 0 0 1rem;
}

.av-paywall__note {
	margin: 0;
	color: var(--av-ink-faint);
	font-size: 0.82rem;
	line-height: 1.55;
}

/* ---------------------------------------------------------------- account */

.av-account {
	display: grid;
	gap: 2.5rem;
	max-width: 52rem;
}

.av-account__section h2 {
	margin: 0 0 0.75rem;
	font-size: 1.25rem;
}

.av-account__status {
	margin: 0 0 1rem;
	padding: 0.7rem 1rem;
	border-radius: var(--av-radius-sm);
	background: var(--av-surface-alt);
	font-weight: 600;
}

.av-account__status.is-active {
	box-shadow: inset 3px 0 0 var(--av-win);
}

.av-account__status.is-inactive {
	box-shadow: inset 3px 0 0 var(--av-ink-faint);
}

.av-account__facts {
	display: grid;
	grid-template-columns: minmax(9rem, auto) 1fr;
	gap: 0.5rem 1.25rem;
	margin: 0 0 1.25rem;
}

.av-account__facts dt {
	color: var(--av-ink-faint);
	font-size: 0.88rem;
}

.av-account__facts dd {
	margin: 0;
}

.av-account__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

.av-account__note {
	color: var(--av-ink-faint);
	font-size: 0.85rem;
	line-height: 1.6;
}

/* ------------------------------------------------------------------ forms */

.av-form fieldset {
	margin: 0 0 1.25rem;
	padding: 0;
	border: 0;
}

.av-form legend {
	padding: 0;
	margin-bottom: 0.5rem;
	font-weight: 600;
}

.av-field {
	margin: 0 0 0.6rem;
}

.av-field--check label {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	line-height: 1.5;
}

.av-field__hint {
	display: block;
	margin-top: 0.25rem;
	color: var(--av-ink-faint);
	font-size: 0.85rem;
}

.av-form__status {
	min-height: 1.3rem;
	font-size: 0.9rem;
}

.av-form__status.is-ok {
	color: var(--av-win);
}

.av-form__status.is-error {
	color: var(--av-loss);
}

.av-form__actions {
	margin: 1rem 0 0;
}

/* ------------------------------------------------------------------ legal */

.av-legal {
	max-width: 44rem;
	line-height: 1.7;
}

.av-legal h3 {
	margin: 2rem 0 0.5rem;
	font-size: 1.1rem;
}

@media (prefers-reduced-motion: reduce) {
	.av-button {
		transition: none;
	}
}
