/* =========================================================================
 * MarkGallery — Account Theme Layer (tokens only)
 * =========================================================================
 * NO layout and NO component styling lives here. Only design tokens:
 * colour, spacing, radius, shadow, type.
 *
 * A seasonal theme (Nowruz, Yalda, Ramadan, Black Friday) is applied by
 * redefining a handful of variables — account.css never needs to change.
 *
 *   Layer 1: :root / [data-mg-theme="default"]  → the store baseline
 *   Layer 2: [data-mg-theme="…"]                → a named theme
 *   Layer 3: body.mg-theme-<slug>               → chosen from PHP
 *
 * PHP side: add_filter( 'mgt_account_theme', fn() => 'yalda' );
 * ========================================================================= */

:root,
[data-mg-theme="default"],
body.mg-theme-default {
	/* --- surface ------------------------------------------------ */
	--mg-acc-surface: #ffffff;
	--mg-acc-surface-sunken: #fafafa;
	--mg-acc-page: #f4f3f1;

	/* --- ink (text) --------------------------------------------- */
	--mg-acc-ink: #0a0a0a;
	--mg-acc-ink-soft: #3a3a3a;
	--mg-acc-ink-muted: #8c8c8c;
	--mg-acc-ink-faint: #b5b5b5;
	--mg-acc-ink-danger: #a33a3a;

	/* --- lines --------------------------------------------------- */
	--mg-acc-line: #e9e9e9;
	--mg-acc-line-strong: #d5d5d5;
	--mg-acc-line-mid: #bdbdbd;

	/* --- nav buttons (my-account menu) ----------------------------- */
	--mg-nav-btn-bg: #f2f2f2;
	--mg-nav-btn-bg-hover: #e8e8e8;
	--mg-nav-btn-bg-active: #e2e2e2;

	/* --- accent (used sparingly: highlight, ticks) --------------- */
	--mg-acc-accent: #f8c13b;
	--mg-acc-accent-ink: #0a0a0a;
	/* Accent read as TEXT (the asterisk, the focus underline). The raw
	 * --mg-acc-accent is a surface colour: at 11px type it fails contrast on
	 * white, so anything typographic uses this darkened cut instead. */
	--mg-acc-accent-deep: #a9780a;

	/* --- field surfaces ------------------------------------------ */
	/* The old design drew fields as a bare hairline. On a white card that left
	 * the eye with nothing to aim at, so the address form now gives every
	 * control its own surface. These are separate tokens (not --mg-acc-line)
	 * because the field fill needs to stay a shade quieter than the card while
	 * still reading as a target at arm's length. */
	--mg-acc-field-bg: #f7f6f3;
	--mg-acc-field-bg-hover: #f2f1ed;
	--mg-acc-field-border: #e2e0dc;
	--mg-acc-field-border-hover: #cfccc6;
	--mg-acc-label: #2b2b2b;
	--mg-acc-hint: #6f6b66;

	/* --- status pills -------------------------------------------- */
	--mg-acc-ok-line: #bfe0c4;
	--mg-acc-ok-bg: #f2fbf3;
	--mg-acc-ok-ink: #256b31;
	--mg-acc-wait-line: #f0dcae;
	--mg-acc-wait-bg: #fffaef;
	--mg-acc-wait-ink: #8a6a1a;
	--mg-acc-ship-line: #c9d8ef;
	--mg-acc-ship-bg: #f4f8ff;
	--mg-acc-ship-ink: #28527f;

	/* --- focus ring ---------------------------------------------- */
	--mg-acc-ring: rgba(10, 10, 10, 0.08);

	/* --- spacing scale (4px base) -------------------------------- */
	--mg-acc-s-1: 4px;
	--mg-acc-s-2: 8px;
	--mg-acc-s-3: 12px;
	--mg-acc-s-4: 16px;
	--mg-acc-s-5: 20px;
	--mg-acc-s-6: 24px;
	--mg-acc-s-7: 32px;
	--mg-acc-s-8: 40px;
	--mg-acc-s-9: 56px;
	--mg-acc-s-10: 72px;

	/* --- radius --------------------------------------------------- */
	--mg-acc-r-xs: 2px;
	--mg-acc-r-sm: 3px;
	--mg-acc-r-md: 4px;
	--mg-acc-r-lg: 6px;
	--mg-acc-r-xl: 8px;
	--mg-acc-r-pill: 999px;

	/* --- shadow (deliberately shallow: the brand is typographic) -- */
	--mg-acc-shadow-sm: 0 1px 2px rgba(10, 10, 10, 0.03);
	--mg-acc-shadow-md: 0 1px 2px rgba(10, 10, 10, 0.03), 0 18px 44px -28px rgba(10, 10, 10, 0.24);

	/* --- type ------------------------------------------------------ */
	/* Point at the site-wide font pairing instead of naming families here.
	 * This file used to hardcode "Vazirmatn", which silently beat the installed
	 * Arad/Estedad setup: every account element resolved to the parent theme's
	 * fallback because Vazirmatn is never loaded on this site. Reading --mg-font
	 * and --mg-font-display from fonts.css means one edit there updates the whole
	 * store, account pages included. */
	--mg-acc-font: var(--mg-font, "Estedad", Tahoma, Arial, sans-serif);
	--mg-acc-font-display: var(--mg-font-display, "Arad", "Estedad", Tahoma, sans-serif);
	--mg-acc-lh: 1.85;
	/* Eyebrows are Persian labels ("خوش آمدید", "حساب کاربری"). 11.5px sat
	 * below the project's 15px reading floor and 0.16em tracking stopped the
	 * letters from joining — a tracked Persian word is a different word. 13px
	 * with no tracking keeps the eyebrow subordinate to the title. */
	--mg-acc-fs-eyebrow: 13px;
	--mg-acc-fs-xs: 12px;
	--mg-acc-fs-sm: 13px;
	--mg-acc-fs-base: 14px;
	--mg-acc-fs-md: 15px;
	--mg-acc-fs-lg: 17px;
	--mg-acc-fs-h1: clamp(24px, 3vw, 40px);
	--mg-acc-fs-h2: clamp(21px, 2.4vw, 27px);
	--mg-acc-ls-eyebrow: 0;

	/* --- controls --------------------------------------------------- */
	--mg-acc-h-control: 52px;
	--mg-acc-h-control-sm: 46px;

	/* --- page gutter (the only horizontal page padding) ------------- */
	--mg-acc-gutter: clamp(16px, 2.4vw, 40px);
}

/* -------------------------------------------------------------------------
 * Yalda — deep plum, gold accent
 * ---------------------------------------------------------------------- */
[data-mg-theme="yalda"],
body.mg-theme-yalda {
	--mg-acc-page: #2a1020;
	--mg-acc-surface: #3a1529;
	--mg-acc-surface-sunken: #451a31;
	--mg-acc-ink: #fdf5f8;
	--mg-acc-ink-soft: #e6c9d6;
	--mg-acc-ink-muted: #b98ca0;
	--mg-acc-ink-faint: #8e6478;
	--mg-acc-line: rgba(255, 255, 255, 0.12);
	--mg-acc-line-strong: rgba(255, 255, 255, 0.2);
	--mg-acc-line-mid: rgba(255, 255, 255, 0.3);

	--mg-nav-btn-bg: rgba(255, 255, 255, 0.06);
	--mg-nav-btn-bg-hover: rgba(255, 255, 255, 0.11);
	--mg-nav-btn-bg-active: rgba(255, 255, 255, 0.16);
	--mg-acc-accent: #f2c14e;
	--mg-acc-accent-deep: #f2c14e;
	/* On plum, the light field fill would punch a white hole in the card, so
	 * the surface steps UP from the card instead of down. */
	--mg-acc-field-bg: rgba(255, 255, 255, 0.06);
	--mg-acc-field-bg-hover: rgba(255, 255, 255, 0.10);
	--mg-acc-field-border: rgba(255, 255, 255, 0.18);
	--mg-acc-field-border-hover: rgba(255, 255, 255, 0.32);
	--mg-acc-label: #f0dbe5;
	--mg-acc-hint: #b98ca0;
	--mg-acc-ring: rgba(242, 193, 78, 0.22);
	--mg-acc-shadow-md: 0 1px 2px rgba(0, 0, 0, 0.3), 0 18px 44px -28px rgba(0, 0, 0, 0.6);
}

/* -------------------------------------------------------------------------
 * Nowruz — cream and green
 * ---------------------------------------------------------------------- */
[data-mg-theme="nowruz"],
body.mg-theme-nowruz {
	--mg-acc-page: #f2f7f0;
	--mg-acc-surface: #ffffff;
	--mg-acc-surface-sunken: #f7fbf5;
	--mg-acc-ink: #12281a;
	--mg-acc-ink-soft: #33513f;
	--mg-acc-ink-muted: #7d9587;
	--mg-acc-line: #e0ebe0;
	--mg-acc-line-strong: #cadccb;
	--mg-acc-accent: #57a773;
	--mg-acc-accent-deep: #2f6b45;
	--mg-acc-field-bg: #f5faf3;
	--mg-acc-field-bg-hover: #eef6ec;
	--mg-acc-field-border: #dbe8db;
	--mg-acc-field-border-hover: #c3d8c5;
	--mg-acc-label: #23402e;
	--mg-acc-hint: #6b8574;
	--mg-acc-ring: rgba(87, 167, 115, 0.2);
}

/* -------------------------------------------------------------------------
 * Light — flat, no page tint (for landing pages that share the block)
 * ---------------------------------------------------------------------- */
[data-mg-theme="light"],
body.mg-theme-light {
	--mg-acc-page: #ffffff;
	--mg-acc-surface: #ffffff;
	--mg-acc-surface-sunken: #fafafa;
	--mg-acc-shadow-md: none;
}
