/* =============================================================
   Rhinory-v4 — Commerce7 SDK override surface
   Brief: docs/briefs/2026-05-14-block-theme-spa-and-css-vars.md
   Source of truth: prototypes/c7-interface/c7-overrides.css
   (CD-pinned variable spec — refresh from there on future passes.)
   Closed variable list:
     https://design-docs.commerce7.com/docs/css-overrides
   (Bible Part 7 §7.1.6, contract.md "Theme styling surface" v0.4.2)

   ZERO inner .c7-* selectors. Allowed targets only:
     :root, .winery-c7-spa-surface, .winery-c7-spa-surface--<slug>,
     .winery-c7-checkout-blank, .winery-c7-cart-icon, .winery-c7-login-button,
     .winery-c7-login-form (added 2026-08-07, brief
     2026-08-06-gate-signin-return-redirect Pass 2).

   Loaded from functions.php after style.css (rhinory-v4-c7-overrides
   handle, depends on rhinory-v4-style).

   Hex fallbacks on every var() call so the file stays self-contained
   even though the WP theme exposes its palette via
   --wp--preset--color--<slug> rather than the prototype-side raw
   --acacia / --reserve / --ivory token names. The fallbacks ARE the
   brand hex values, so no token-system bridging is required.

   Note on the existing nav-icon scope (style.css:763 — the
   .rhinory-nav__icons .winery-c7-cart-icon + .winery-c7-login-button
   block from commits e01ee1c + 3e5d717): higher specificity than
   :root, so it continues to win for the side-cart drawer + account
   dropdown panels that hydrate inside those mounts. This file's
   :root defaults apply to the /profile/* and /cart/ + /checkout
   surfaces where no nav-icon ancestor exists.

   Findings status (per brief Review notes, 2026-05-16 v0.5.0 consumption):
     FINDING-1 mini-cart gold rule: RESOLVED accepted ceiling.
     FINDING-2 button typography vars: RESOLVED 2026-05-16 via
       --winery-c7-button-{letter-spacing,text-transform} (see
       v0.5.0 override block at end of :root). font-family already
       correct via existing --c7-font-family at line 61.
     FINDING-3 field-text-color: descendant-selector workaround
       retained (decision recorded in v0.5.0 override block).
       Bridge default --winery-c7-field-text-color produces
       identical paint at identical specificity; migration is
       churn. SDK's field-rules win against :root, so the
       workaround below at line 164 stays the authoritative paint.
     FINDING-5 tabs underline cascade: RESOLVED 2026-05-16 via
       --winery-c7-tab-underline-color (plugin v0.5.2 bridge).
       v0.5.0 cascade probe established no --c7-* variable reaches
       the .c7-account__menu .c7-active a border-bottom; v0.5.2
       adds the explicit bridge variable. See F-5 closure block
       at end of :root.
     FINDING-7 destructive-action color: RESOLVED 2026-05-16 via
       --winery-c7-destructive-{bg,text-color}; hover uses bridge's
       color-mix(...) default with graceful degradation per
       contract.md:435.
     FINDING-8 secondary link color: see brief Review notes for
       over-coverage verification result; override defined below
       in v0.5.0 block.
     FINDING-G1 cart-count corner-overlay: RESOLVED 2026-05-16 via
       atomic 4-variable --winery-c7-cart-count-* override.
   ============================================================= */

/* -------------------------------------------------------------
   :ROOT — global defaults.
   These apply to every plugin SPA surface. Per-surface body-class
   blocks below narrow the scope where the rhinory-v4 register
   diverges (cart vs profile vs checkout).
   ------------------------------------------------------------- */
:root {

  /* ----- General / layout / typography (26 vars in inventory) ----- */
  --c7-page-width: 1280px;
  --c7-page-width-checkout: 1320px;
  --c7-font-family: var(--ff-body, "Lora", system-ui, -apple-system, sans-serif);
  --c7-body-text-color: var(--ivory, #F1E8D6);
  --c7-alt-text-color: var(--bone, #D9CDB4);
  --c7-font-size: 16px;
  --c7-font-size-sub: 13px;
  --c7-heading-font-family: var(--ff-display, "Cormorant Garamond", Georgia, "Times New Roman", serif);
  --c7-heading-text-color: var(--ivory, #F1E8D6);
  --c7-heading-font-weight: 400; /* Cormorant 400 = brand signature; bold reads heavy. See FINDING-1. */
  --c7-primary-color: var(--acacia, #D4A24C);
  --c7-primary-color-text: var(--acacia, #D4A24C);
  --c7-primary-color-dark: var(--acacia-dk, #A87B28);
  --c7-primary-color-focus: rgba(212,162,76,0.30);
  --c7-link-color: var(--acacia, #D4A24C);
  --c7-bg: var(--reserve, #0F1A14);
  --c7-bg-alt: var(--reserve-2, #152217);
  --c7-border-color: rgba(241,232,214,0.16);          /* --rule */
  --c7-border-radius: 0;                              /* editorial = sharp corners */
  --c7-loading-bg: rgba(15,26,20,0.65);
  --c7-modal-border-radius: 0;
  --c7-modal-shadow: 0 30px 80px -30px rgba(0,0,0,0.65);
  --c7-overlay-bg: rgba(8,6,4,0.62);
  --c7-progress-bar: var(--acacia, #D4A24C);
  --c7-pill-bg: rgba(212,162,76,0.12);
  --c7-pill-text-color: var(--acacia, #D4A24C);

  /* ----- Forms (8 vars) ----- */
  --c7-field-bg: var(--ink-2, #141210);
  --c7-field-border-radius: 0;
  --c7-field-border-color: rgba(216,162,76,0.28);
  --c7-field-focus-color: rgba(212,162,76,0.20);
  --c7-field-option-selected-color: var(--acacia, #D4A24C);
  --c7-field-option-focus-color: rgba(212,162,76,0.30);
  /* Placeholder text — ivory at 55% alpha clears AA (~5.4:1 on
     --ink-2 field bg) while preserving CD's "muted hint" intent.
     Previous --rhino (#6E6A62) read at 3.46:1; bumped 2026-05-15
     per Upsun-smoke defect (Edit Credit Card "1234 1234 1234 1234"
     placeholder read as broken field rather than hint). */
  --c7-field-placeholder: rgba(241,232,214,0.55);
  --c7-field-dropdown-shadow: 0 18px 40px -16px rgba(0,0,0,0.7);

  /* ----- Buttons (7 vars) ----- */
  --c7-primary-button-bg: var(--acacia, #D4A24C);
  --c7-primary-button-bg-hover: #E0B96A;              /* matches mini-cart.css hover (prototypes/6) */
  --c7-primary-button-text-color: var(--reserve, #0F1A14);
  --c7-alt-button-bg: transparent;                    /* Cancel buttons read as quiet outline */
  --c7-alt-button-bg-hover: rgba(212,162,76,0.08);
  --c7-alt-button-text-color: var(--ivory, #F1E8D6);
  --c7-button-border-radius: 0;

  /* ----- Messages / alerts (7 vars) ----- */
  --c7-info-bg: rgba(212,162,76,0.10);                /* gold-tinted, NOT light grey */
  --c7-error: #E26464;                                /* warmed red — readable on reserve */
  --c7-error-bg: rgba(202,55,55,0.16);
  --c7-warning: #E8B26A;
  --c7-warning-bg: rgba(232,178,106,0.10);
  --c7-success: #7FB68C;
  /* Success backdrop neutralized. SDK paints the club Total row as
     <button class="c7-btn--unstyled" aria-expanded="true"> with a
     .c7-order-summary__item--total child — the SDK reuses
     --c7-success-bg as the expanded-Total emphasis fill. CD's
     2026-05-15 0.40 → 0.15 alpha bump still surfaced visible green
     against --ink-2 canvas (Upsun re-smoke). Transparent removes
     the chroma entirely; the green icon + green text inside
     success-pattern alerts still carry the semantic read.
     Tradeoff (FINDING-7 absorbs): info / warning / error alerts
     elsewhere keep their tinted backdrop; success alerts paint
     iconography + text only. --c7-success-bg is overloaded between
     "Total row state-fill" and "success alert backdrop" with no
     per-role discriminator in the closed list — plugin v0.5.0
     contract gap to split. */
  --c7-success-bg: transparent;

  /* ----- Header (SDK-internal account/cart widget chrome — 9 vars) ----- */
  --c7-header-text-color: var(--ivory, #F1E8D6);
  --c7-notification: var(--acacia, #D4A24C);
  --c7-cart-count-bg: var(--acacia, #D4A24C);
  --c7-cart-count-bg-focus: rgba(212,162,76,0.30);
  --c7-cart-count-text-color: var(--reserve, #0F1A14);
  --c7-side-cart-shadow: -30px 0 80px -20px rgba(0,0,0,0.7);
  --c7-dropdown-border-radius: 0;
  --c7-dropdown-shadow: 0 20px 60px -20px rgba(0,0,0,0.7);
  --c7-dropdown-hover: rgba(212,162,76,0.08);

  /* ----- Account blocks (Profile / Dashboard / Shipping — 4 vars) ----- */
  --c7-block-bg: #141210;                             /* --ink-2 */
  --c7-block-border-color: rgba(241,232,214,0.12);
  --c7-block-border-radius: 0;
  --c7-block-shadow: none;

  /* ----- Plugin-owned --winery-c7-* variable surface (v0.5.0) -----
     Bridge file: ~/dev/wordpress-for-wineries/assets/css/winery-c7-integration-bridge.css
     Contract: ~/dev/wordpress-for-wineries/docs/contract.md
       § "Plugin-owned --winery-c7-* variable surface (v0.5.0)"
     Brief: docs/briefs/2026-05-16-c7-v0.5.0-variable-consumption.md
     Closes 5 Tier 1+2 findings (F-2/F-3/F-7/F-8/F-G1, plus F-5 conditional).
     Every override below cites its CD-spec source inline. */

  /* F-2 button typography — match brand .btn editorial register.
     SDK targets: .c7-btn, .c7-btn--primary, .c7-btn--alt.
     --winery-c7-button-font-family deliberately NOT overridden — bridge
     default `var(--c7-font-family)` already maps to --ff-body (Lora,
     Port 01 Phase 0) via c7-overrides.css:61 (above). */
  --winery-c7-button-letter-spacing: 0.16em;          /* F-2 — style.css:272 (.btn) */
  --winery-c7-button-text-transform: uppercase;       /* F-2 — style.css:273 (.btn) */

  /* F-3 field text color.
     DECISION (2026-05-16): keep the existing descendant-selector workaround
     at c7-overrides.css:164 (.winery-c7-spa-surface input/textarea/select).
     Reasoning: bridge selector `.c7-form__field input/textarea/select` and
     theme workaround both have (0,1,1) specificity and both resolve to
     --c7-body-text-color → identical paint. The workaround's scope is
     structurally broader (catches inputs that may leak in outside
     .c7-form__field), serving as a belt-and-suspenders for themes without
     descendant overrides. Migrating is churn for no paint change.
     No --winery-c7-field-text-color override declared; bridge default
     `var(--c7-body-text-color)` is already correct for this theme. */

  /* F-7 destructive action colors — Sign Out / Delete Account.
     SDK targets: .c7-account-details__delete-account,
     .c7-user-nav__account__dropdown__logout.
     Modal-confirm exclusion: plugin bridge:60-65 intentionally omits
     .c7-modal--*-delete-confirm; CD-spec carries no modal-confirm color
     either (verified against prototypes/c7-interface/c7-overrides.css).
     No Phase 2+ finding owed.
     --winery-c7-destructive-bg-hover deliberately NOT overridden — bridge
     default color-mix(in srgb, var(--c7-error) 85%, black) gives a sensible
     darkened hover, with graceful degradation on pre-2023 browsers per
     contract.md:435 (rhinory.com analytics inaccessible from this session;
     plugin's bridge-level fallback is the right floor). */
  --winery-c7-destructive-bg: var(--c7-error, #E26464);      /* F-7 — c7-overrides.css:112 warmed-red brand destructive */
  --winery-c7-destructive-text-color: var(--ivory, #F1E8D6); /* F-7 — brand "white" = ivory (style.css:43-44) */

  /* F-8 cart-item action color — side-cart "Remove" affordance.
     SDK target: .c7-side-cart .c7-link (bridge over-coverage caveat per
     contract.md:437 — selector hits ALL side-cart links, not just Remove).
     Verified 2026-05-16 via Chrome MCP DOM walk with populated guest cart:
     [VERIFIED-ON-IMPLEMENTATION — see brief Review notes for the per-link
     inventory]. CD-spec subdued bone register reads as quiet secondary
     action, not as a primary CTA cascade. */
  --winery-c7-cart-item-action-color: var(--c7-alt-text-color, #D9CDB4); /* F-8 — subdued bone (c7-overrides.css:63) */

  /* F-G1 cart-count corner-overlay — ATOMIC 4-variable override.
     SDK target: .c7-user-nav__cart__count.
     Per brief AC §F-G1: partial = fail. All four declarations land
     together to lift the count from inline-pill into corner-overlay
     position. translate: 50% -50% nudges the badge to the top-right
     corner of the cart-icon glyph (rather than aligning with its
     baseline). */
  --winery-c7-cart-count-position: absolute;          /* F-G1 — brief AC §F-G1 */
  --winery-c7-cart-count-top: 0;                      /* F-G1 — brief AC §F-G1 */
  --winery-c7-cart-count-right: 0;                    /* F-G1 — brief AC §F-G1 */
  --winery-c7-cart-count-translate: 50% -50%;         /* F-G1 — brief AC §F-G1 */

  /* ----- F-5 closure (v0.5.2) -----
     SDK target: .c7-account__menu .c7-active a (active profile tab underline).
     v0.5.0 cascade smoke (theme commits 73f247b + 80d10e9) confirmed no
     --c7-* variable reaches that selector — SDK ships the acacia underline
     as a literal in the CORS-opaque commerce7.css bundle, so the theme had
     zero contract control over it. Plugin v0.5.2 adds the explicit bridge
     variable + !important rule (winery-c7-integration-bridge.css:93,180);
     this override locks the contract value to brand acacia (the same
     visual paint the SDK has been hardcoding) so the underline is
     insulated against any future SDK shift AND from any change to the
     bridge default's cascade chain (--c7-field-option-selected-color →
     --c7-primary-color). Paired plugin brief:
     ~/dev/wordpress-for-wineries/docs/briefs/2026-05-16-v052-tab-underline-and-watchlist-cleanup.md */
  --winery-c7-tab-underline-color: var(--acacia, #D4A24C);  /* F-5 — closes v0.5.0 consumption brief routed finding; locks explicit acacia value for .c7-account__menu .c7-active a border-bottom (plugin v0.5.2 bridge) */

  /* ----- F-D closure (v0.5.6, 2026-05-22) -----
     SDK target: .c7-user-nav__cart__count.
     Plugin v0.5.6 bridge selector with !important paints the cart-count
     badge from this variable surface. Replaces the deleted depth-3
     structural-position appearance block at style.css (pre-F-D 1285-1304
     + mobile 1325-1331).
     Brief: docs/briefs/2026-05-19-c7-v0.5.6-cart-count-and-logout-bridge-consumption.md
     Contract: ~/dev/wordpress-for-wineries/docs/contract.md § F-D cart-count appearance.
     --winery-c7-cart-count-{bg,text-color} deliberately NOT overridden —
     bridge defaults var(--c7-cart-count-bg) + var(--c7-cart-count-text-color)
     already resolve to acacia + reserve via :root above (lines 146 + 148).
     --winery-c7-cart-count-font-weight NOT in the contract surface;
     SDK default paints (was 600 pre-F-D — accept Playwright baseline
     regen if visible diff).
     --winery-c7-cart-count-margin NOT overridden here — the existing
     depth-2 .winery-c7-cart-icon .c7-user-nav__cart__count override
     below at line ~378 wins on specificity and continues to paint 0.
     Mobile step-down (height + min-width + border-radius + font-size)
     declared in the @media (max-width: 780px) block after :root closes. */
  --winery-c7-cart-count-font-family: var(--ff-mono, "Josefin Sans", ui-monospace, monospace);
  --winery-c7-cart-count-font-size: 9px;
  --winery-c7-cart-count-height: 16px;
  --winery-c7-cart-count-min-width: 16px;
  --winery-c7-cart-count-padding: 0 4px;
  --winery-c7-cart-count-border-radius: 8px;
  --winery-c7-cart-count-box-shadow: 0 0 0 1.5px var(--reserve, #0F1A14);
  --winery-c7-cart-count-box-shadow-hover: 0 0 0 1.5px var(--reserve, #0F1A14);
}

/* F-D mobile step-down — cart-count badge shrinks at <=780px to match
   the outer .winery-c7-login-button + .winery-c7-cart-icon 32x32 mobile
   clamp at style.css ~1315. Padding stays 0 4px (unchanged from desktop). */
@media (max-width: 780px) {
  :root {
    --winery-c7-cart-count-height: 14px;
    --winery-c7-cart-count-min-width: 14px;
    --winery-c7-cart-count-border-radius: 7px;
    --winery-c7-cart-count-font-size: 8px;
  }
}

/* -------------------------------------------------------------
   SPA surface base (every /profile/* and /cart/ surface)
   ------------------------------------------------------------- */
.winery-c7-spa-surface {
  background: var(--reserve, #0F1A14);
  color: var(--ivory, #F1E8D6);
}

/* FINDING-3 promotion (2026-05-15, Upsun smoke).
   SDK's field-rules win against :root at higher specificity, so
   filled <input>/<textarea>/<select> values painted dim. Bare
   HTML element selectors scoped through the allowed-target outer
   wrapper — NOT targeting any .c7-* class. */
.winery-c7-spa-surface input,
.winery-c7-spa-surface textarea,
.winery-c7-spa-surface select {
  color: var(--c7-body-text-color, #F1E8D6);
}

/* /profile/login — minimal centered form on reserve canvas.
   The SDK paints the form inside #c7-content; the surface body
   paints the canvas. */
.winery-c7-spa-surface--profile-login {
  --c7-bg: var(--reserve, #0F1A14);
  --c7-bg-alt: var(--reserve-2, #152217);
}

/* /profile dashboard + every sub-page.
   Account-blocks paint as quiet ink-2 cards; the "Hello {name}"
   greeting + tab strip sit above on reserve. */
.winery-c7-spa-surface--profile,
.winery-c7-spa-surface--profile-account-details,
.winery-c7-spa-surface--profile-club-memberships,
.winery-c7-spa-surface--profile-order-history,
.winery-c7-spa-surface--profile-reservations {
  --c7-block-bg: #141210;
  --c7-block-border-color: rgba(241,232,214,0.12);
}

/* /profile/order/<id> — order detail uses Account-block treatment
   for the shipping-address card + items + totals box. Timeline
   is SDK-rendered; --c7-success cascade paints its checkmark dot. */
.winery-c7-spa-surface--profile-order {
  --c7-block-bg: #141210;
  --c7-block-border-color: rgba(241,232,214,0.12);
}

/* X-icon centering on `/profile/*` (2026-05-15, Upsun smoke).
   Symptom: the close X on each selected wine tile in the club-edit
   shipment modal renders subtly off-center within its gold circle.
   Production rhinory.com (default SDK + blue primary) centers the
   glyph correctly; the misalignment is specific to acacia's
   interaction with the SDK's circle-drawing math.
   Bare element selectors (button + attribute-on-svg) scoped through
   the allowed-target body class. NOT targeting any .c7-* class.
   Scope is intentionally broad: `--profile` is the only body class
   v0.4.2 emits for all `/profile/*` sub-routes (per FINDING-9), and
   the modal is portaled at body level so its X-buttons resolve
   under the same class context as the surface. */
.winery-c7-spa-surface--profile button:has(svg[viewBox="0 0 24 24"]) {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

/* /cart/ — full SPA cart page.
   Two-column layout (lines left, Order Summary right). The right
   panel uses --c7-bg-alt = ink-2 so it reads as a quiet aside,
   not a hard card. */
.winery-c7-spa-surface--cart {
  --c7-bg: var(--reserve, #0F1A14);
  --c7-bg-alt: #141210;                               /* --ink-2 */
}

/* /cart/ width constraint (2026-05-15, Upsun smoke).
   --c7-page-width at :root doesn't constrain this specific SDK
   route — the cart painted edge-to-edge viewport-wide on Upsun.
   Body class > bare <main> is discipline-clean: allowed-target
   wrapper + bare HTML element child (NOT the #c7-content mount
   id, NOT a .c7-* class). The SDK paints its content inside main;
   constraining main's width is the cheapest centering hook. */
.winery-c7-spa-surface--cart > main {
  max-width: var(--c7-page-width, 1280px);
  margin-inline: auto;
  padding-inline: 24px;
}

/* /checkout — blank-chrome focused flow. No host header/footer.
   Centered rhino logo is SDK-rendered into the checkout template;
   stepper + Delivery/Payment/Review form fields + summary right
   panel all paint from --c7-* alone. */
.winery-c7-checkout-blank {
  background: var(--reserve, #0F1A14);
  color: var(--ivory, #F1E8D6);
  --c7-bg: var(--reserve, #0F1A14);
  --c7-bg-alt: #141210;                               /* --ink-2 */
  --c7-page-width-checkout: 1320px;
}

/* Club signup (Scope A) — NOT yet routed in v0.4.2.
   When the plugin/theme bug wires up /club-signup/<slug>, a
   body class like .winery-c7-spa-surface--club-signup will be
   emitted by the SPA-routes module. Pre-positioning the override
   here means zero theme work after the route lands.
   Production rhinory.com uses light-grey-and-gold; we paint dark
   register through the variable surface. */
.winery-c7-spa-surface--club-signup {
  --c7-bg: var(--reserve, #0F1A14);
  --c7-bg-alt: #141210;
  /* Member-pricing strikethrough + "Min Qty" pills cascade from
     --c7-pill-bg + --c7-pill-text-color set in :root. */
}

/* -------------------------------------------------------------
   Outer plugin-owned wrappers
   These are the FROZEN host-side classes (NOT inner SDK classes).
   The nav-icon trigger styling is in style.css's host CSS;
   only the cart-count badge + login text color flow through here.
   ------------------------------------------------------------- */
.winery-c7-cart-icon {
  /* Cart count corner-overlay positioning closed 2026-05-16 via the
     plugin-owned --winery-c7-cart-count-{position,top,right,translate}
     atomic 4-var override in :root above (F-G1). The badge now sits at
     the top-right of the cart-icon glyph rather than as an inline pill. */
}

/* Reset inherited parent-button values on the SDK-painted cart count badge.
   Two declarations, two distinct inheritance defenses:
   - margin: SDK paints the badge with `margin: 0 0 0 -3px` by default
     (commerce7.css volatile rule). The -3px left margin shifts the
     badge ~3px left of where F-G1's `right: 0; translate: 50% -50%`
     corner-overlay positioning intends. Zeroing it lets F-G1's pure-
     translate positioning land exactly per design.
   - text-indent: HOTFIX 2026-05-23 (v0.5.6 regression). The parent cart
     button at style.css:1200 carries `text-indent: -9999px` to hide the
     SDK-painted "Cart" text label for accessibility-friendly icon-only
     presentation. text-indent is an inherited property — it cascades
     down to the .c7-user-nav__cart__count span. v0.5.6 deletion of the
     bare-element appearance rules at style.css:1285-1304 silently
     removed the implicit text-indent: 0 reset, so the inherited
     -9999px pushed the count digit off-screen and the badge appeared
     blank. Plugin bridge's --winery-c7-cart-count-* var surface does
     NOT include text-indent (F-D contract scope), so the reset lives
     here.
   Known-debt: this targets a c7-* inner class (volatile per Bible §7.9.2)
   — flagged for F-D scope expansion (paired plugin brief candidate
   `2026-05-16-cart-count-plumbing.md` already queued; adding
   `--winery-c7-cart-count-margin` + `--winery-c7-cart-count-text-indent`
   to the variable surface there closes both debts cleanly).
   Briefs: docs/briefs/2026-05-17-nav-icon-wrapper-dimensions-fix.md
           docs/briefs/2026-05-23-cart-count-text-indent-hotfix.md */
.winery-c7-cart-icon .c7-user-nav__cart__count {
  margin: 0 !important;
  text-indent: 0 !important;
}

.winery-c7-login-button {
  /* "Log in" anchor text + "Hello {name} ⌄" hydrated trigger.
     Paints in --c7-header-text-color (ivory) — already covered by
     3e5d717's cascade per the brief. */
}

/* Side-cart drawer qty <select> color (2026-05-15, Upsun smoke #4).
   Chrome MCP runtime: select computed color = rgb(0,0,0) (browser
   default) with zero matching CSS color rules — none of the
   .winery-c7-spa-surface input/textarea/select FINDING-3 promotion
   reaches here because the drawer mounts inside .winery-c7-cart-icon,
   not a .winery-c7-spa-surface ancestor. Black-on-reserve renders
   invisible. appearance:none is required: Chrome's native <select>
   widget ignores CSS `color` in some configs without it. Bare element
   scoped through the allowed-target wrapper — zero c7-* class hits. */
/* Chevron restored (0.67.6): CSS-only SVG data URI on background-image,
   ivory stroke (#F1E8D6 matches body text — subtle editorial hint, not
   loud affordance). Sits in the 24px padding-right reserve from 0.67.4. */
.rhinory-nav__icons .winery-c7-cart-icon select {
  appearance: none;
  -webkit-appearance: none;
  color: var(--c7-body-text-color, #F1E8D6);
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%23F1E8D6' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='1 1 6 6 11 1'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px 8px;
  padding-right: 24px;
}

/* Club-memberships Total disclosure bg (2026-05-15, Upsun smoke #4).
   Chrome MCP runtime: the Total row is a <button aria-controls=
   "c7-shipment-summary-group"> with the SDK's transparent background.
   0.67.3 neutralized --c7-success-bg → transparent, which IS resolving
   correctly; the residual green is the body bg (--reserve, rgb(15,26,20))
   showing through. Shipment cards above paint --ink-2 (#141210, warm
   dark brown); the Total disclosure with transparent bg reads as a
   "green band" against ink-2 cards. Painting the disclosure with the
   same --ink-2 makes the cards + Total a continuous register.
   Bare element + bare attribute selector scoped through allowed-target
   body class. The `c7-btn--unstyled` class on the button is NOT used
   as the discriminator — we use the aria-controls value, which is a
   semantic-DOM attribute, not an SDK styling hook. See FINDING-14
   below for the plugin-side ask. */
.winery-c7-spa-surface--profile button[aria-controls="c7-shipment-summary-group"] {
  background-color: var(--ink-2, #141210);
}

/* ============================================================
   Plugin v0.7.0 account-dropdown header slots — Rail F consumption
   Briefs: docs/briefs/2026-05-17-account-dropdown-header-slots.md (Stage-1)
           docs/briefs/2026-05-23-account-dropdown-stage-2-polish.md (Stage-2)
           docs/briefs/2026-05-23-account-dropdown-anchor-slot-consumption.md (Rail F)
   Contract: ~/dev/wordpress-for-wineries/docs/contract.md
             § DOM contract — .winery-c7-account-avatar
                              / .winery-c7-account-greeting
                              / .winery-c7-account-anchor-slot
             § Rail F (augment inside SDK-painted text-bearing elements)

   Plugin v0.7.0 inserts three plugin-owned wrappers around / inside the
   SDK-painted .c7-user-nav__account__dropdown__header after hydration:
     - .winery-c7-account-avatar       (header first child, empty
                                        <span aria-hidden>)
     - .winery-c7-account-greeting     (header last child — currently
                                        suppressed via filter; rule
                                        retained defensively)
     - .winery-c7-account-anchor-slot  (last child of SDK identity
                                        anchor, after email span;
                                        Rail F augment-inside-SDK)

   The three-row identity stack (name / email / "Conservation Circle")
   lives INSIDE the SDK anchor via Rail F — the v0.6.0 Stage-1
   :has()-gated 2-col Grid workaround that placed an outside-anchor
   greeting BELOW the anchor was removed in favor of the anchor-internal
   slot. The SDK header's default layout flow puts the avatar beside
   the anchor without theme-side grid composition.

   Rails A-F held: no SDK text modification, no SDK node
   removal/reordering, no server pre-population, no window.commerce7
   reads, plugin bails cleanly on missing SDK structure, and the
   anchor-slot is the documented Rail F position (last child of SDK
   identity anchor) — no other SDK-painted nodes touched.
   ============================================================ */

/* Header composition — put avatar BESIDE the identity anchor.
   The original v0.6.0 follow-on used Grid + grid-column: 1 / -1 to
   span the outside-anchor greeting below the anchor. That outside
   greeting is now suppressed (Rail F anchor-slot is canonical), so
   we only need the simpler avatar-beside-anchor composition.
   SDK default display: block on header spans would stack avatar
   ABOVE the anchor without this rule. align-items: flex-start lets
   the anchor wrap gracefully in its column without forcing the
   avatar to stretch. */
.c7-user-nav__account__dropdown__header:has(.winery-c7-account-avatar) {
  display: flex;
  align-items: flex-start;
  /* Gap reduced 12px -> 6px (fix-pack 4, Erik smoke 2026-05-24).
     Avatar -> text-column visual spacing now ~6px; reclaims 6px for
     text column width to accommodate longer names/emails. Flex
     composition + flex-shrink: 0 still hold from fix-packs 2-3. */
  gap: 6px;
}

/* SDK-painted identity paragraph internal padding (fix-pack 5).
   Erik eye-call 2026-05-24: give the paragraph internal breathing
   room. !important required because SDK shipped baseline padding 0
   on the paragraph (verified via Cowork Chrome MCP getComputedStyle);
   a non-!important rule of equal specificity loses the cascade. The
   `> p` child selector targets the SDK's identity paragraph — the
   second flex child of the header, wrapping the name anchor + email
   span + Rail F anchor-slot.
   Known-debt: targets a c7-* inner element (volatile per Bible §7.9.2)
   — same class of debt as the cart-count margin/text-indent overrides
   at line ~432. Flagged for variable-surface migration if the plugin
   adds a paragraph-padding bridge variable. */
.c7-user-nav__account__dropdown__header > p {
  padding: 0 4px 4px 4px !important;
}

/* Avatar slot — Stage-2 polish brings the slot to prototype parity with
   prototypes/6/01-homepage.html § .acct-lead-icon. 38×38 acacia-tinted
   ring (border at acacia @ 32% opacity — softer than Stage-1's solid
   acacia), transparent fill, person-silhouette SVG centered. Same SVG
   used by prototypes/6/nav-icon-state-design.html:234 — visual continuity
   intentional. The stroke color is baked into the data-URI as a hex
   value because `currentColor` inside an inline-SVG-via-background-image
   doesn't inherit from the host element's `color` property; the
   `color: var(--acacia)` declaration stays as semantic token surface
   for any future switch to a mask-image-driven paint. */
.winery-c7-login-button .winery-c7-account-avatar {
  width: 38px;
  height: 38px;
  /* Prevent flex-shrink under long name/email content pressure. Codex
     re-fire finding 2026-05-24: at C7's 240px dropdown min-width,
     default flex-shrink: 1 measured avatar at 18.3594px in synthetic
     probe. Without this guard the 38px width is a basis not a minimum. */
  flex-shrink: 0;
  /* Right margin reset 2026-05-24 (fix-pack 3). Parent's flex `gap`
     handles avatar->anchor inter-item spacing; the previous 12px right
     margin stacked with gap and cramped the text column enough to wrap
     blurb copy. Top + bottom margins preserved.
     Margin-left reduced 16px -> 4px (fix-pack 4, Erik smoke 2026-05-24).
     Margin-left 4 -> 8 (fix-pack 5, Erik eye-call 2026-05-24) — avatar
     shifted 4px right from dropdown frame to add visual indent. Header
     has 20px SDK padding-left visually but computed 0 (Cowork Chrome MCP
     probe); the 8px additional margin gives clean indent without flushing
     avatar against the frame. */
  margin: 4px 0 0 8px;
  border: 1px solid rgba(216, 180, 79, 0.32);
  border-radius: 50%;
  background-color: transparent;
  color: var(--acacia, #D4A24C);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22' fill='none' stroke='%23D4A24C' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='8' r='3.5'/%3E%3Cpath d='M4 19c1.4-3.2 4.2-5 7-5s5.6 1.8 7 5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
}

/* Greeting slot — typography retained as a defensive future-override
   surface. The filter in inc/account-dropdown.php currently returns ''
   so the plugin doesn't insert this slot at all (bail-on-empty
   discipline), but if a later override returns non-empty content the
   rule applies. The Stage-1 `grid-column: 1 / -1` declaration was
   removed alongside the :has()-gated Grid composition on the header
   parent — there is no longer a grid context to span. Register matches
   the SDK email span + the anchor-slot below: Fraunces 11.5px ivory@60%. */
.winery-c7-login-button .winery-c7-account-greeting {
  display: block;
  margin: 8px 16px 0 16px;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 11.5px;
  font-style: normal;
  font-weight: 400;
  line-height: 16.1px;
  color: rgba(241, 232, 214, 0.6);
  letter-spacing: 0;
}

/* Anchor-slot — Rail F augment-inside-SDK. Plugin-owned <span> appended
   as the last child of the SDK identity anchor (after the SDK-painted
   email span) when the winery_c7_account_anchor_slot filter resolves
   non-empty. Establishes the third row of the prototype's
   .acct-lead-text identity stack (name / email / blurb) without
   touching SDK-painted text. Register inherits Stage-2's email-span
   typography (Fraunces 11.5px ivory@60% at style.css:878-933) — if
   that rule moves or changes, re-verify this. text-indent: 0 is
   defensive against the same -9999px inheritance class as the
   cart-count hotfix at cb46dac. */
.winery-c7-account-anchor-slot {
  display: block;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 11.5px;
  line-height: 16.1px;
  font-weight: 400;
  color: rgba(241, 232, 214, 0.6);
  margin: 0;
  text-indent: 0;
}

/* =============================================================
   Availability badges (plugin v0.49.0 frozen surface)
   Brief: docs/briefs/2026-06-26-availability-badge-styling.md (AC-2)
   Contract: ~/dev/wordpress-for-wineries/docs/contract.md
     § frozen CSS classes — winery-c7-availability-badge (:58)
     § DOM data-attributes — data-winery-c7-availability (:153)

   The plugin emits, on wine-card / bundle-card, a status badge
   (.winery-c7-availability-badge + --low/--out/--soon/--allocation)
   as a direct child AFTER the media anchor, only when the operator
   state is not in_stock. The card <article> root carries
   data-winery-c7-availability="<state>" for ALL five states — used
   here as the reliable, unambiguous card-level hook.

   Plugin ships a minimal DEFAULT style in winery-base.css at
   single-class specificity (0,1,0): a solid WP-admin-blue chip with
   warning-amber / error-red / info-teal state fills. The theme MUST
   out-specify it so the dark-luxury treatment wins the cascade — every
   rule below pairs the badge class with the card-root attribute
   ([data-winery-c7-availability] .winery-c7-availability-badge…) for
   (0,2,0) specificity, which beats the plugin base regardless of
   stylesheet load order. (winery-base.css is unlayered, plain cascade.)

   Register (per brief AC-2):
   - --low / --allocation -> acacia-gold scarcity. These are DESIRABLE
     exclusivity signals (prestige), not warnings: gold hairline + gold
     mono label on ink glass.
   - --out / --soon -> muted/recessive (--rhino family). Unavailable and
     understated; deliberately NOT alarm-red — luxury doesn't shout.

   No transitions on the badge (static on load), so there is nothing to
   gate behind prefers-reduced-motion; the only motion-bearing rule
   (the sold-out media dim) is a static filter, not an animation.
   ============================================================= */

/* Card root is the positioning context for the absolutely-placed badge.
   The plugin base rule positions the badge absolute but never establishes
   a containing block on the card; declare it here so the overlay anchors
   to the card media corner rather than the page. */
.winery-c7-wine-card[data-winery-c7-availability],
.winery-c7-bundle-card[data-winery-c7-availability] {
  position: relative;
}

/* Base badge — overlay chip, top-left of the card media. Redeclares every
   plugin-base property the theme owns (placement, fill, type) so the look
   is fully theme-controlled. */
[data-winery-c7-availability] .winery-c7-availability-badge {
  position: absolute;
  inset-block-start: 12px;
  inset-inline-start: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 0;
  margin: 0;
  padding: 0.45em 0.72em;
  border: 1px solid transparent;
  border-radius: 2px;
  background: rgba(10, 8, 7, 0.82); /* --ink #0A0807 glass over the photo */
  color: var(--ivory, #F1E8D6);
  font-family: var(--ff-mono, 'JetBrains Mono', ui-monospace, monospace);
  font-size: 0.625rem; /* 10px */
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 2px 10px -4px rgba(0, 0, 0, 0.6);
}

/* Scarcity / prestige register — Low Stock + Allocation.
   Gold hairline + gold label read as exclusivity, not alarm.
   --acacia #D4A24C on the ink-glass fill is ~8.6:1 (well past WCAG AA);
   the gold border vs. the adjacent media is the >=3:1 non-text edge. */
[data-winery-c7-availability] .winery-c7-availability-badge--low,
[data-winery-c7-availability] .winery-c7-availability-badge--allocation {
  border-color: var(--acacia, #D4A24C);
  color: var(--acacia, #D4A24C);
  background: rgba(10, 8, 7, 0.86);
}

/* Recessive / muted register — Sold Out + Coming Soon.
   Faint ivory hairline + warm-grey label; understated, NOT red.
   --rhino #9C968A on ink glass is ~7:1 (legible but quiet). */
[data-winery-c7-availability] .winery-c7-availability-badge--out,
[data-winery-c7-availability] .winery-c7-availability-badge--soon {
  border-color: var(--rule, rgba(241, 232, 214, 0.16));
  color: var(--rhino, #9C968A);
  background: rgba(10, 8, 7, 0.78);
}

/* Sold-out card treatment — dim + desaturate the media so the card reads
   as unavailable. Paired with the recessive badge overlay and the
   plugin's disabled "Sold Out" <button>, this makes the dual signal read
   as intentional rather than duplicated (plugin CC pass-1 §3). Keyed on
   the reliable card-root attribute, not a wrapper-modifier suffix. */
[data-winery-c7-availability='sold_out'] .winery-c7-wine-card__media,
[data-winery-c7-availability='sold_out'] .winery-c7-bundle-card__media {
  opacity: 0.6;
  filter: saturate(0.7);
}

/* =============================================================
   /login — Commerce7 login form, light-warm re-set
   -------------------------------------------------------------
   Brief:     docs/briefs/2026-08-06-gate-signin-return-redirect.md (Pass 2)
   Prototype: prototypes/13/14-login.html (#cd-login-styles, the
              .winery-c7-login-form block — THAT is the deliverable;
              its #cd-c7-sdk-emulation block stands in for Commerce7's
              own stylesheet and is explicitly not shipped)
   Contract:  ~/dev/wordpress-for-wineries/docs/contract.md
              § Plugin-owned --winery-c7-* variable surface (v0.75.0
              login-form bridges F-L1 / F-L2 / F-L5 + F-2 / F-3 box model)

   WHY A SCOPED RE-SET, NOT A GLOBAL ONE. Every --c7-* default above is
   the DARK register (acacia gold on reserve green) — correct for
   /profile and checkout. /login is the one C7 surface in the LIGHT-WARM
   register, because it sits mid-purchase between two light-warm wine
   PDPs: the bottle the visitor left and the bottle they are returned to.
   Re-setting the variables on the plugin's frozen wrapper keeps that
   inversion from leaking onto any other C7 surface.

   MECHANISM. Custom properties inherit, and every plugin bridge rule
   targets elements (`.c7-form__field input`, `label.c7-required`, …)
   rather than :root, so a value set on the wrapper reaches the SDK's own
   painted output. That is the entire styling contract: variables in,
   paint out. Zero inner .c7-* selectors — they are volatile SDK output.

   Hydrated shape this was built against (view-source-verified 2026-08-07,
   tenant staging-rhinory-llc; NOT assumed):
     .winery-c7-login-form > #c7-login-form > form.c7-form.c7-form--login
       div.c7-form__field > label.c7-required + input     (email, password)
       div.c7-form__buttons.c7-form__buttons--wide > button.c7-btn--primary
       div.c7-account-login__password-options > p > a.c7-link
   No magic-link or social buttons on this tenant.
   ============================================================= */
.winery-c7-login-form {
  margin-top: 30px;

  /* ----- General / links / type ----- */
  --c7-font-family: var(--ff-body, "Lora", Georgia, serif);
  --c7-heading-font-family: var(--ff-display, "Cormorant Garamond", Georgia, serif);
  --c7-body-text-color: #2D2926;              /* --ink-warm */
  --c7-alt-text-color: #717271;               /* --rhino-warm */
  --c7-primary-color: #520000;                /* --burgundy */
  --c7-primary-color-text: #520000;
  --c7-link-color: #520000;                   /* "Forgot your password?" */
  --c7-border-color: rgba(45, 41, 38, 0.18);  /* --rule-warm-2 */

  /* ----- Forms group — the input fields -----
     Radius 2px, not the global 0: the card, the chip and the fallback all
     carry the same 2px, and a hard-cornered input inside a soft-cornered
     card reads as unstyled rather than editorial. */
  --c7-field-bg: #FFFFFF;                     /* crisp fill on the paper card */
  --c7-field-border-color: rgba(45, 41, 38, 0.18);
  --c7-field-focus-color: rgba(82, 0, 0, 0.20);   /* burgundy-tinted focus ring */
  --c7-field-placeholder: #717271;            /* --rhino-warm */
  --c7-field-border-radius: 2px;
  --c7-field-option-selected-color: #520000;
  --c7-field-option-focus-color: rgba(82, 0, 0, 0.30);
  --c7-field-dropdown-shadow: 0 18px 48px -24px rgba(45, 41, 38, 0.30);

  /* ----- Buttons group — the "Log in" submit ----- */
  --c7-primary-button-bg: #520000;            /* --burgundy */
  --c7-primary-button-bg-hover: #3D0000;      /* --burgundy-dk */
  --c7-primary-button-text-color: #FBF7EE;    /* --paper */
  --c7-button-border-radius: 2px;
  --c7-alt-button-bg: transparent;
  --c7-alt-button-bg-hover: rgba(82, 0, 0, 0.08);
  --c7-alt-button-text-color: #2D2926;

  /* ----- Messages — login errors (bad password, locked account) ----- */
  --c7-error: #8A1F1F;                        /* warm red, ~5.7:1 on paper */
  --c7-error-bg: rgba(138, 31, 31, 0.08);

  /* ===== Plugin --winery-c7-* bridges (v0.75.0) =====
     Everything below has NO --c7-* equivalent — these are the properties
     the plugin bridged specifically so this surface could be branded
     without a raw .c7-* selector. */

  /* F-L1 label typography. The single biggest fidelity gap before v0.75.0:
     the SDK renders labels in the body face at 15px, so "Email" and
     "Password" read as prose. Josefin uppercase at 11px/0.16em makes them
     read as field labels, matching every other label on the site. */
  --winery-c7-label-font-family: var(--ff-mono, "Josefin Sans", sans-serif);
  --winery-c7-label-font-size: 11px;
  --winery-c7-label-font-weight: 600;
  --winery-c7-label-text-transform: uppercase;
  --winery-c7-label-letter-spacing: 0.16em;
  --winery-c7-label-color: #2D2926;           /* --ink-warm */

  /* F-3 field text color. MUST be set explicitly, and this is the trap worth
     knowing about: the bridge's default is `--winery-c7-field-text-color:
     var(--c7-body-text-color)` declared at :ROOT. A var() inside a custom
     property resolves in the scope where the property is DECLARED, not where
     it is used — so that alias had already resolved to the :root dark-register
     ivory long before anything reached this wrapper. Re-setting
     --c7-body-text-color here (above) correctly repaints everything the SDK
     reads directly, but it cannot reach back through a :root-level alias.
     Symptom if this line is deleted: ivory input text on a white field —
     invisible typing. Caught in Chrome, not by reading the CSS. */
  --winery-c7-field-text-color: #2D2926;      /* --ink-warm */

  /* F-L2 spacing. NOTE — the prototype expressed field spacing as
     `display:flex; gap:20px` on .c7-form--login. That is INERT in
     production: the SDK form is display:block, so `gap` never applies.
     The bridge maps to .c7-form__field margin-bottom instead, which is the
     property the SDK actually uses. Same 20px, real mechanism. */
  --winery-c7-field-group-gap: 20px;
  --winery-c7-field-label-gap: 8px;

  /* F-3 input box model. min-height is grow-only against the SDK's authored
     46px, so 52px clamps upward — it cannot shrink the field. */
  --winery-c7-field-min-height: 52px;
  --winery-c7-field-padding: 14px 16px;

  /* F-2 primary-button box model + typography. The typography knobs are
     pre-existing bridges (overridden globally at :root above for the dark
     register); they are restated here only where the login value differs —
     the tracking is slightly wider on this CTA than the site default. */
  --winery-c7-button-min-height: 54px;
  --winery-c7-button-padding: 16px 28px;
  --winery-c7-button-box-shadow: 0 14px 34px -14px rgba(82, 0, 0, 0.62);
  --winery-c7-button-font-family: var(--ff-mono, "Josefin Sans", sans-serif);
  --winery-c7-button-letter-spacing: 0.18em;
  --winery-c7-button-text-transform: uppercase;

  /* F-L5 password-options row. The SDK default is right-aligned; centered
     under a full-width CTA reads as a deliberate secondary action rather
     than a stray link. Both margin variables are set because the SDK picks
     between them by sibling composition — on this tenant the row follows
     .c7-form__buttons (so the base value applies), but a tenant that
     enables magic-link can reorder it to follow .c7-form__field. */
  --winery-c7-password-options-align: center;
  --winery-c7-password-options-margin-top: 14px;
  --winery-c7-password-options-margin-top-adjacent: 14px;
}
