/* ============================================================================
   travelmean-theme-presets.css — the ASSIGNABLE palettes (A307).

   WHAT THIS FILE IS
   -----------------
   travelmean-tokens.css is the seam and carries the INHERITED look. This file
   carries the three palettes an installation can be assigned instead. It loads
   AFTER the seam and selects on an attribute the layout stamps on <html>:

       <html data-admin-theme="deep-sea" data-bs-theme="light">

   The attribute value never comes from the database. AdminThemePresets.Resolve
   maps whatever the Hub sent onto one of four compile-time constants and the
   layout prints the CONSTANT — see that class for why a stylesheet selected by
   database text is a CSS injection surface. This file is the other half of the
   same guarantee: it recognises exactly three values and has no rule that could
   match a fourth.

   🔴 "default" HAS NO BLOCK HERE, AND THAT ABSENCE IS THE FAIL-SAFE.
   An installation with no assignment resolves to `default`, nothing below
   matches, and every token keeps the value travelmean-tokens.css gives it. The
   panel therefore cannot change appearance without an assignment — not because a
   code path decided so, but because there is no code path. Adding a
   `[data-admin-theme=default]` block would destroy that property; do not.

   HOW THE SPECIFICITY WORKS (read before adding a preset)
   -------------------------------------------------------
   The seam declares theme-VARIANT tokens under `[data-bs-theme=light]` and
   `[data-bs-theme=dark]`, both (0,1,0). A preset must outrank them REGARDLESS of
   source order, so every colour block below is written as

       html[data-admin-theme=X][data-bs-theme=light]     -> (0,2,1)

   and never as a bare attribute selector. The density block is
   `html[data-admin-theme=X]` -> (0,1,1), which beats the seam's `:root` (0,1,0).

   🔴 EVERY COLOUR LIVES IN THE LIGHT/DARK PAIR, INCLUDING THE BRAND.
   In the seam the brand and the four status solids are theme-invariant, because
   the Shreyu theme genuinely does not redefine them. The candidate palettes DO:
   each brightens its brand and its status colours for dark, which is what makes
   them legible there. So a preset declares them twice. Only DENSITY and the
   standalone-page tokens are invariant.

   🔴 CHANNELS, NOT COLOURS. Bootstrap 5.3 paints badges, pills, alerts and
   subtle backgrounds from `--bs-*-rgb`, and the seam wires those to `--sea-rgb`,
   `--open-rgb`, `--on-request-rgb`, `--stop-sale-rgb`, `--no-allotment-rgb`. A
   preset that wrote only `--sea: #0d6b83` would recolour buttons and leave every
   badge on the old indigo. Write the CHANNEL; the plain token derives from it in
   the seam and follows for free.

   WHAT ARRIVES FOR FREE, AND WHAT DOES NOT
   ----------------------------------------
   Free: the five filled button variants and their hover/active tones (derived
   with color-mix from the channels), pagination, links (via --tide-rgb), every
   `-subtle` badge (via the washes), and `.bg-info`, which the seam wires to
   --tide rather than to a colour of its own.

   NOT free, and named rather than hidden:
     * --bs-btn-focus-shadow-rgb is an rgb TRIPLET the seam could not derive
       (gap G-3, still open). The focus ring keeps the inherited brand under
       every preset. It is an accessibility surface and belongs to a wave that
       can render and look at it.
     * The candidate previews carried FOUR inks on fills (--on-brand, --on-ok,
       --on-error, --on-secondary) where production has ONE (--ink-on-fill). In
       light all four were #ffffff, so the collapse is exact. In dark they are
       four different near-black tints and the brand's is used for all of them —
       an approximation, stated here rather than discovered later.
     * The previews also carried an --info family. Production has no such token:
       the seam routes `.bg-info` through --tide, so info follows the link
       colour. Named as a real difference from the preview, not an oversight.

   SOURCE OF THE VALUES
   --------------------
   docs/design/palette-candidates.html, block by block. The preview page uses its
   own token names (--brand, --ok, --warn, --error, --secondary, --tide, --ctrl-h,
   --card-pad, --fs) and states its own mapping onto these; every hex below was
   copied from it, and every channel is that hex converted to three decimals.
   ============================================================================ */


/* ===========================================================================
   A · DERIN DENIZ  —  deep-sea
   Sea blue over warm sand. The only candidate with a hotel/travel association
   and the shortest journey from today's indigo. Cost: the brand and the "info"
   meaning end up in the same blue family.
   =========================================================================== */

/* --- density (theme-invariant) + the standalone pages ---------------------- */
html[data-admin-theme="deep-sea"] {
    --row-pad: 12px;
    --cell-pad-x: 12px;
    --control-h: 38px;
    --radius: 8px;
    --s5: 24px;
    --fs-body: 14px;
    --fs-table: 14px;
    --fs-label: 14px;

    /* The nine self-contained pages (A308). Light values only — those pages have
       no theme switcher and never stamp data-bs-theme. */
    --sa-page: #f2f5f7;
    --sa-surface: #ffffff;
    --sa-brand: #0d6b83;
    --sa-ink: #22333b;
    --sa-muted: #556a74;
    --sa-danger: #b3261e;
    --sa-success: #1a7f5a;
    --sa-danger-rule: #fbe1df;

    /* The primary button on those pages. Only the BASE is stated; the four tones
       are derived so every palette keeps the inherited theme's own relationship
       (hover 85% toward black, active 80%, and the two border tones 80% / 75% —
       ratios measured from #5369f8 -> #4759d3 -> #4254c6 -> #3e4fba). Without
       this block --sa-brand repaints the wordmark and the button stays indigo:
       one card, two blues. See travelmean-standalone.css for why the button
       cannot read a :root token on its own. */
    --sa-btn: #0d6b83;
    --sa-btn-hover: color-mix(in srgb, #0d6b83 85%, #000);
    --sa-btn-active: color-mix(in srgb, #0d6b83 80%, #000);
    --sa-btn-rule: #0d6b83;
    --sa-btn-rule-hover: color-mix(in srgb, #0d6b83 80%, #000);
    --sa-btn-rule-active: color-mix(in srgb, #0d6b83 75%, #000);
    --sa-on-btn: #ffffff;

    /* The B2B agency portal (_AgencyLayout). It already linked the token layer but stamped no
       theme attribute and never linked THIS file, so its names were wired and its values had
       nowhere to come from: with deep-sea assigned the panel went teal and the portal next door
       stayed indigo. Only the six BRAND-carrying tokens are restated here — the portal's status
       colours (--ag-warn-*, --ag-ok-*, --ag-bad-*) are a separate system that must survive a
       rebrand, and --ag-doc-* dresses the PRINTED voucher, where black on white is the point. */
    --ag-page-bg: #f2f5f7;
    --ag-card-bg: #ffffff;
    --ag-page-ink: #22333b;
    --ag-brand-ink: #0d6b83;
    --ag-nav-ink: #556a74;
    --ag-meta-ink: #7c8f98;
}

html[data-admin-theme="deep-sea"][data-bs-theme="light"] {
    --sea-rgb: 13, 107, 131;
    --open-rgb: 26, 127, 90;
    --on-request-rgb: 224, 163, 10;
    --stop-sale-rgb: 179, 38, 30;
    --no-allotment-rgb: 138, 90, 43;

    --tide-rgb: 10, 92, 114;
    --bs-link-hover-color: #073f4e;

    --page: #f2f5f7;
    --surface: #ffffff;
    --surface-2: #eef3f5;
    --ink: #22333b;
    --ink-2: #556a74;
    --ink-3: #7c8f98;
    --rule: #dbe4e8;
    --control-rule: #838c90;             /* A-RULE-SPLIT: --rule's tint, dropped to 3.43 /
                                            3.07 / 3.13 on surface / surface-2 / page.    */

    --sea-wash: #dcecfa;
    --open-wash: #dcf2e8;
    --on-request-wash: #fdefd6;
    --stop-sale-wash: #fbe1df;
    --no-allotment-wash: #f0e6da;

    /* A309: the card/panel fill the view rules read. Follows --surface. */
    --screen-surface-rgb: 255, 255, 255;

    --ink-on-fill: #ffffff;
    --ink-on-light-fill: #3a2900;
    --light-fill-tone-target: #ffffff;
}

html[data-admin-theme="deep-sea"][data-bs-theme="dark"] {
    --sea-rgb: 63, 176, 204;
    --open-rgb: 72, 199, 154;
    --on-request-rgb: 227, 165, 60;
    --stop-sale-rgb: 242, 115, 107;
    --no-allotment-rgb: 217, 160, 102;

    --tide-rgb: 92, 195, 221;
    --bs-link-hover-color: #8ad8ea;

    --page: #101d22;
    --surface: #17282f;
    --surface-2: #1d323a;
    --ink: #d5e2e7;
    --ink-2: #a3b7bf;
    --ink-3: #8199a3;
    --rule: #2c454f;
    --control-rule: #647d87;             /* A-RULE-SPLIT: raised, not dropped — dark. 3.49 /
                                            3.07 / 3.95.                                   */

    --sea-wash: #14293c;
    --open-wash: #12362c;
    --on-request-wash: #3a2c0d;
    --stop-sale-wash: #3d1c1a;
    --no-allotment-wash: #33280f;

    --screen-surface-rgb: 23, 40, 47;

    --ink-on-fill: #06222b;
    --ink-on-light-fill: #2b1c00;
    --light-fill-tone-target: #ffffff;
}


/* ===========================================================================
   B · GRAFIT VE KOR  —  graphite-ember
   Ember over graphite, compact. The easiest to look at all day and the one whose
   four status colours stay completely free of the brand. Cost: the weakest
   identity of the three.
   =========================================================================== */

html[data-admin-theme="graphite-ember"] {
    --row-pad: 7px;
    --cell-pad-x: 7px;
    --control-h: 32px;
    --radius: 4px;
    --s5: 16px;
    --fs-body: 13px;
    --fs-table: 13px;
    --fs-label: 13px;

    --sa-page: #f4f4f3;
    --sa-surface: #ffffff;
    --sa-brand: #b34a12;
    --sa-ink: #2a2c2b;
    --sa-muted: #5c605e;
    --sa-danger: #a81f1f;
    --sa-success: #256d4a;
    --sa-danger-rule: #f9e0e0;

    /* The primary button on those pages. Only the BASE is stated; the four tones
       are derived so every palette keeps the inherited theme's own relationship
       (hover 85% toward black, active 80%, and the two border tones 80% / 75% —
       ratios measured from #5369f8 -> #4759d3 -> #4254c6 -> #3e4fba). Without
       this block --sa-brand repaints the wordmark and the button stays indigo:
       one card, two blues. See travelmean-standalone.css for why the button
       cannot read a :root token on its own. */
    --sa-btn: #b34a12;
    --sa-btn-hover: color-mix(in srgb, #b34a12 85%, #000);
    --sa-btn-active: color-mix(in srgb, #b34a12 80%, #000);
    --sa-btn-rule: #b34a12;
    --sa-btn-rule-hover: color-mix(in srgb, #b34a12 80%, #000);
    --sa-btn-rule-active: color-mix(in srgb, #b34a12 75%, #000);
    --sa-on-btn: #ffffff;

    /* The B2B agency portal (_AgencyLayout). It already linked the token layer but stamped no
       theme attribute and never linked THIS file, so its names were wired and its values had
       nowhere to come from: with deep-sea assigned the panel went teal and the portal next door
       stayed indigo. Only the six BRAND-carrying tokens are restated here — the portal's status
       colours (--ag-warn-*, --ag-ok-*, --ag-bad-*) are a separate system that must survive a
       rebrand, and --ag-doc-* dresses the PRINTED voucher, where black on white is the point. */
    --ag-page-bg: #f4f4f3;
    --ag-card-bg: #ffffff;
    --ag-page-ink: #2a2c2b;
    --ag-brand-ink: #b34a12;
    --ag-nav-ink: #5c605e;
    --ag-meta-ink: #838886;
}

html[data-admin-theme="graphite-ember"][data-bs-theme="light"] {
    --sea-rgb: 179, 74, 18;
    --open-rgb: 37, 109, 74;
    --on-request-rgb: 143, 99, 0;
    --stop-sale-rgb: 168, 31, 31;
    --no-allotment-rgb: 59, 68, 80;

    --tide-rgb: 156, 64, 15;
    --bs-link-hover-color: #7a320c;

    --page: #f4f4f3;
    --surface: #ffffff;
    --surface-2: #efefee;
    --ink: #2a2c2b;
    --ink-2: #5c605e;
    --ink-3: #838886;
    --rule: #e0e0de;
    --control-rule: #888886;             /* A-RULE-SPLIT: 3.55 / 3.09 / 3.23.              */

    --sea-wash: #f7e6dc;
    --open-wash: #ddf0e6;
    --on-request-wash: #f8eed3;
    --stop-sale-wash: #f9e0e0;
    --no-allotment-wash: #e4e6e9;

    --screen-surface-rgb: 255, 255, 255;

    --ink-on-fill: #ffffff;
    /* 🔴 THIS PRESET IS WHY --light-fill-tone-target EXISTS. Its warning fill is
       DARK (#8f6300) and carries WHITE text, so the raised state must get DARKER,
       not lighter. The seam's .btn-warning rule mixes toward this token; leaving
       it at #fff would have washed a dark amber toward its own text colour on
       hover — lower contrast, and reading as pressed rather than raised. */
    --ink-on-light-fill: #ffffff;
    --light-fill-tone-target: #000000;
}

html[data-admin-theme="graphite-ember"][data-bs-theme="dark"] {
    --sea-rgb: 240, 128, 60;
    --open-rgb: 76, 190, 134;
    --on-request-rgb: 223, 167, 46;
    --stop-sale-rgb: 239, 106, 106;
    --no-allotment-rgb: 154, 167, 182;

    --tide-rgb: 245, 151, 92;
    --bs-link-hover-color: #f8b184;

    --page: #17181a;
    --surface: #212326;
    --surface-2: #292c30;
    --ink: #e2e2e0;
    --ink-2: #adaeac;
    --ink-3: #8d908e;
    --rule: #3a3d41;
    --control-rule: #73767a;             /* A-RULE-SPLIT: raised — dark. 3.45 / 3.07 / 3.89. */

    --sea-wash: #33200f;
    --open-wash: #123024;
    --on-request-wash: #332703;
    --stop-sale-wash: #3a1717;
    --no-allotment-wash: #22282e;

    --screen-surface-rgb: 33, 35, 38;

    --ink-on-fill: #261004;
    --ink-on-light-fill: #241900;
    --light-fill-tone-target: #ffffff;
}


/* ===========================================================================
   C · ERIK VE YOSUN  —  plum-moss
   Plum over moss, roomy. The most recognisable and the least "template"; purple
   carries no status meaning anywhere in the product. Cost: the secondary (moss)
   sits close to the "open" green, and it is the boldest of the three.
   =========================================================================== */

html[data-admin-theme="plum-moss"] {
    --row-pad: 13px;
    --cell-pad-x: 13px;
    --control-h: 40px;
    --radius: 12px;
    --s5: 26px;
    --fs-body: 14px;
    --fs-table: 14px;
    --fs-label: 14px;

    --sa-page: #f6f3f6;
    --sa-surface: #ffffff;
    --sa-brand: #7a2e63;
    --sa-ink: #2e2431;
    --sa-muted: #5f5163;
    --sa-danger: #ab2540;
    --sa-success: #3d6b2e;
    --sa-danger-rule: #fadfe4;

    /* The primary button on those pages. Only the BASE is stated; the four tones
       are derived so every palette keeps the inherited theme's own relationship
       (hover 85% toward black, active 80%, and the two border tones 80% / 75% —
       ratios measured from #5369f8 -> #4759d3 -> #4254c6 -> #3e4fba). Without
       this block --sa-brand repaints the wordmark and the button stays indigo:
       one card, two blues. See travelmean-standalone.css for why the button
       cannot read a :root token on its own. */
    --sa-btn: #7a2e63;
    --sa-btn-hover: color-mix(in srgb, #7a2e63 85%, #000);
    --sa-btn-active: color-mix(in srgb, #7a2e63 80%, #000);
    --sa-btn-rule: #7a2e63;
    --sa-btn-rule-hover: color-mix(in srgb, #7a2e63 80%, #000);
    --sa-btn-rule-active: color-mix(in srgb, #7a2e63 75%, #000);
    --sa-on-btn: #ffffff;

    /* The B2B agency portal (_AgencyLayout). It already linked the token layer but stamped no
       theme attribute and never linked THIS file, so its names were wired and its values had
       nowhere to come from: with deep-sea assigned the panel went teal and the portal next door
       stayed indigo. Only the six BRAND-carrying tokens are restated here — the portal's status
       colours (--ag-warn-*, --ag-ok-*, --ag-bad-*) are a separate system that must survive a
       rebrand, and --ag-doc-* dresses the PRINTED voucher, where black on white is the point. */
    --ag-page-bg: #f6f3f6;
    --ag-card-bg: #ffffff;
    --ag-page-ink: #2e2431;
    --ag-brand-ink: #7a2e63;
    --ag-nav-ink: #5f5163;
    --ag-meta-ink: #8b7d8f;
}

html[data-admin-theme="plum-moss"][data-bs-theme="light"] {
    --sea-rgb: 122, 46, 99;
    --open-rgb: 61, 107, 46;
    --on-request-rgb: 149, 89, 10;
    --stop-sale-rgb: 171, 37, 64;
    --no-allotment-rgb: 77, 107, 60;

    --tide-rgb: 109, 42, 88;
    --bs-link-hover-color: #4f1e40;

    --page: #f6f3f6;
    --surface: #ffffff;
    --surface-2: #f1ecf1;
    --ink: #2e2431;
    --ink-2: #5f5163;
    --ink-3: #8b7d8f;
    --rule: #e5dce6;
    --control-rule: #8e858f;             /* A-RULE-SPLIT: 3.56 / 3.05 / 3.23.              */

    --sea-wash: #f2e2ee;
    --open-wash: #e3efdc;
    --on-request-wash: #f9e9d4;
    --stop-sale-wash: #fadfe4;
    --no-allotment-wash: #e6eee0;

    --screen-surface-rgb: 255, 255, 255;

    --ink-on-fill: #ffffff;
    --ink-on-light-fill: #ffffff;
    /* Same reasoning as candidate B: this warning fill (#95590a) is dark enough
       to carry white text, so its raised state must darken. */
    --light-fill-tone-target: #000000;
}

html[data-admin-theme="plum-moss"][data-bs-theme="dark"] {
    --sea-rgb: 210, 118, 180;
    --open-rgb: 141, 193, 111;
    --on-request-rgb: 221, 162, 87;
    --stop-sale-rgb: 239, 113, 137;
    --no-allotment-rgb: 157, 196, 127;

    --tide-rgb: 222, 141, 196;
    --bs-link-hover-color: #eaacd5;

    --page: #1a141c;
    --surface: #241d26;
    --surface-2: #2d2530;
    --ink: #e6dee8;
    --ink-2: #b3a6b8;
    --ink-3: #96889b;
    --rule: #3d3341;
    --control-rule: #796f7d;             /* A-RULE-SPLIT: raised — dark. 3.43 / 3.09 / 3.78. */

    --sea-wash: #331b2c;
    --open-wash: #1e2c16;
    --on-request-wash: #33230d;
    --stop-sale-wash: #3a1620;
    --no-allotment-wash: #222c1b;

    --screen-surface-rgb: 36, 29, 38;

    --ink-on-fill: #2a0c21;
    --ink-on-light-fill: #251500;
    --light-fill-tone-target: #ffffff;
}
