/*
 * The 2026 site theme: the Silver Icing design system's tokens and base styles (colour, type, corners, focus), on
 * every front office page (main_page.tpl.php loads it last and puts the si_theme_2026 class on <body>). The pages'
 * own stylesheets (style.css, critical_style.css, the React bundle's SCSS) use these tokens in their rules; a page's
 * colours belong there, not here. What's here: the tokens, the base styles, and the pieces shared across the front
 * office that have to win over every page's older rules: form fields, the React pop-ups' boxes, and the
 * utility classes (tachyons, _tachyons.scss, which the stylist back office shares, so their front office colours
 * can't go in the classes themselves).
 *
 * Fonts: Montserrat is the site's self-hosted variable file (includes/fonts/montserrat), here under its own family
 * name with the Light weight the design's body copy uses; the site's "Montserrat" stays 400-700 so older rules asking
 * for thin weights don't turn thin. Sofia Pro is the Adobe Fonts kit's sofia-pro (critical_style.css), Belleza
 * Google Fonts' (main_page.tpl.php).
 */

@font-face {
    font-family: "SI Montserrat";
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url("/includes/fonts/montserrat/montserrat-latin-ext.woff2") format("woff2");
    ascent-override: 85%;
    descent-override: 15%;
    line-gap-override: 0%;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "SI Montserrat";
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url("/includes/fonts/montserrat/montserrat-latin.woff2") format("woff2");
    ascent-override: 85%;
    descent-override: 15%;
    line-gap-override: 0%;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/*
 * The light palette: on :root, so the Operations pages that load style.css (spotlight_cms.php, attributes.php,
 * products_attributes.php) have it too, and on light islands: pieces drawn on a fixed light picture (sign-in's
 * "Already have a stylist?" panel, Create Account's pink picture panel), which keep it in dark mode. Dark mode re-declares the colours on the front
 * office's <body> only, so an island's own light values win inside it. Declared on <body> as well, for the tokens made of others (--button-primary-bg: the ink)
 * to be worked out again there with dark mode's values: on :root alone they'd be the light ones all the way down.
 */
:root,
.si_theme_2026,
.si_theme_2026 .find_stylist .has_stylist,
.si_theme_2026 .create_account_cover_text {
    /* colour: the app's light palette (mobile src/Styles/Theme.js, the "Silver Icing Apps" design system). As there,
       --color-white is the page ground and --color-ink the text, so dark mode swaps the values, not the names. */
    color-scheme: light;
    --color-ink: #201e1d;          /* text, primary buttons */
    --color-body: #4a4745;         /* secondary body copy */
    --color-muted: #6d6a68;        /* meta, captions */
    --color-accent: #b13d68;       /* icons, kickers, stat figures, hovers; never behind body text */
    --color-plum: #8f2f53;         /* links, presale */
    --color-blush: #faf3f5;        /* alternating bands, cards, photo placeholders */
    --color-blush-hover: #f4dee4;
    --color-blush-line: #e5b9c9;
    --color-bar: #333333;          /* the header's promo bar */
    --color-hairline: #eeebec;
    --color-input-border: #ddd6d9;
    --color-neutral: #f1efee;      /* grey chips, sold-out sizes */
    --color-band: #201e1d;         /* the one feature band per page: ink in light */
    --color-on-band: #d9d5d2;      /* body text on the band */
    --color-white: #ffffff;        /* page ground; text on ink */
    --color-accent-fill: #b13d68;  /* pink fills behind text, the same in both themes */
    --color-plum-fill: #8f2f53;
    --color-on-accent: #ffffff;
    --color-positive: #2e7d32;     /* status text: paid, done */
    --color-negative: #c62828;     /* status text: unpaid, failed */
    --color-green: #6a723e;        /* the Icing Points green: text and its tint behind it */
    --color-green-tint: #eaecdb;
    --color-chip-on-photo: rgba(255, 255, 255, .92); /* round buttons over photos and video */
    --shadow-menu: 0 2px 8px rgba(32, 30, 29, .18);
    --logo-filter: none;           /* the black logo and heart files; dark mode turns them white */

    --surface-page: var(--color-white);
    --surface-band: var(--color-blush);
    --surface-dark: var(--color-band);
    --text-primary: var(--color-ink);
    --text-secondary: var(--color-body);
    --text-meta: var(--color-muted);
    --text-accent: var(--color-accent);
    --link-color: var(--color-plum);
    --link-hover: var(--color-accent);
    --button-primary-bg: var(--color-ink);
    --button-primary-hover: var(--color-accent);

    /* type */
    --font-body: "SI Montserrat", "Helvetica Neue", Arial, sans-serif;
    --font-ui: "SI Montserrat", "Helvetica Neue", Arial, sans-serif;
    --font-heading: sofia-pro, "Sofia Pro", "SI Montserrat", "Helvetica Neue", Arial, sans-serif;
    --font-display: "Belleza", "SI Montserrat", "Helvetica Neue", Arial, sans-serif;
    --weight-body: 300;
    --weight-ui: 500;
    --weight-heading: 700;
    --text-body: 16px;
    --text-small: 14px;
    --leading-body: 1.6;
    --tracking-label: 3px;
    --tracking-btn: 1.5px;

    /* space and shape */
    --max-width: 1232px;
    --side-pad: 24px;
    --section-pad: 56px;
    --radius: 2px;
    --transition: 150ms ease;
}

/*
 * Dark mode, as in the app: it follows the device unless the page says otherwise with data-theme="light" or "dark"
 * on <body> (si_theme_2026_mode(): ?theme=dark or ?theme=light, to show either on any device). Images keep their
 * own colours.
 */
@media (prefers-color-scheme: dark) {
    .si_theme_2026:not([data-theme="light"]) {
        color-scheme: dark;
        --color-ink: #ededed;
        --color-body: #d9d5d2;
        --color-muted: #a8a3a0;
        --color-accent: #e0779e;       /* the brand pink is 3.1:1 on the dark ground */
        --color-plum: #eba5bf;
        --color-blush: #2c2427;
        --color-blush-hover: #382a2f;
        --color-blush-line: #6b4656;
        --color-bar: #3a3736;
        --color-hairline: #3a3533;
        --color-input-border: #7a7270;
        --color-neutral: #353130;
        --color-band: #f0e2e7;         /* a soft pink rather than a straight inversion */
        --color-on-band: #4a4745;
        --color-white: #201e1d;
        --color-chip-on-photo: rgba(32, 30, 29, .85);
        --shadow-menu: 0 2px 8px rgba(0, 0, 0, .5);
        --logo-filter: invert(1);
        --color-positive: #7cc77f;
        --color-negative: #f08080;
        --color-green: #bcc58a;
        --color-green-tint: #2b2d22;
    }
}

.si_theme_2026[data-theme="dark"] {
    color-scheme: dark;
    --color-ink: #ededed;
    --color-body: #d9d5d2;
    --color-muted: #a8a3a0;
    --color-accent: #e0779e;       /* the brand pink is 3.1:1 on the dark ground */
    --color-plum: #eba5bf;
    --color-blush: #2c2427;
    --color-blush-hover: #382a2f;
    --color-blush-line: #6b4656;
    --color-bar: #3a3736;
    --color-hairline: #3a3533;
    --color-input-border: #7a7270;
    --color-neutral: #353130;
    --color-band: #f0e2e7;         /* a soft pink rather than a straight inversion */
    --color-on-band: #4a4745;
    --color-white: #201e1d;
    --color-chip-on-photo: rgba(32, 30, 29, .85);
    --shadow-menu: 0 2px 8px rgba(0, 0, 0, .5);
    --logo-filter: invert(1);
    --color-positive: #7cc77f;
    --color-negative: #f08080;
    --color-green: #bcc58a;
    --color-green-tint: #2b2d22;
}

.si_theme_2026 {
    background: var(--surface-page);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

/* selected text: the blush line, which shows against the ground in both themes (blush-hover all but vanished in dark) */
.si_theme_2026 ::selection {
    background: var(--color-blush-line);
}

.si_theme_2026 :focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/*
 * The site's header and footer (main_header.php, main_footer.php: the older styles in critical_style.css and
 * style.css) on the theme's colours, so they follow dark mode too. Links and labels with their own inline colour
 * (the sale links) keep it.
 */
body.si_theme_2026 img[src*="_BLK."] {
    filter: var(--logo-filter);
}

body.si_theme_2026 :is(.header_nav, #search_header) :is(a, button, i, .fa, .fal, .far, .fas, .bag_count, .sub_nav_label, .account_dropdown_close, .search_button, .search_cancel):not([style*="color"]) {
    color: var(--color-ink);
}

/*
 * The whole front office goes onto the theme with the new homepage, so the older pages' shared pieces follow it here:
 * the fixed colours of the utility classes (tachyons, _tachyons.scss), form fields, and the React pop-ups' boxes and
 * drawers. Page-specific pieces follow in their own sections.
 */
/* a bare link (style.css's pink, a later sheet's black) in ink; :where() keeps it as weak as those, so every class's
   own link colour still wins */
:where(body.si_theme_2026) a {
    color: var(--color-ink);
}

body.si_theme_2026 :is(.black, .near-black, .dark-gray, .sifont, .si-light-black):not([style*="color"]) {
    color: var(--color-ink);
}

/* tachyons' see-through blacks (black-70: the account page's notes) */
body.si_theme_2026 :is(.black-90, .black-80):not([style*="color"]) {
    color: var(--color-body);
}

body.si_theme_2026 :is(.black-70, .black-60, .black-50, .black-40):not([style*="color"]) {
    color: var(--color-muted);
}

body.si_theme_2026 .siligtherdarkgray:not([style*="color"]) {
    color: var(--color-body);
}

body.si_theme_2026 :is(.mid-gray, .gray, .silver, .si-gray70, .sidarkmediumgray, .sidarkgray, .sigray):not([style*="color"]) {
    color: var(--color-muted);
}

body.si_theme_2026 :is(.siprimary, .siprimary-dark, .si-required):not([style*="color"]) {
    color: var(--color-accent);
}

body.si_theme_2026 .bg-white:not([style*="background"]) {
    background-color: var(--color-white);
}

body.si_theme_2026 :is(.bg-near-white, .bg-light-gray, .bg-silightgray, .bg-si-lightest-gray, .bg-sisuperlightgray, .bg-silightergray):not([style*="background"]) {
    background-color: var(--color-neutral);
}

body.si_theme_2026 :is(.bg-siprimary-light, .bg-siprimary-selected, .bg-siprimary-lighter, .bg-silightpink, .bg-sipalepink, .bg-sisoftpeach):not([style*="background"]) {
    background-color: var(--color-blush);
}

/* the old pink fill behind white text (steps, badges): the theme's pink, the same in both themes */
body.si_theme_2026 .bg-siprimary:not([style*="background"]) {
    background-color: var(--color-accent-fill);
}

/* the older pages' rounded cards take the theme's corners, as the buttons do */
body.si_theme_2026 .br8px {
    border-radius: var(--radius);
}

/* the Icing Points green (the product page's "Earn N Icing Points" box, the checkout points pill) */
body.si_theme_2026 .bg-siavocadogreen-lighter {
    background-color: var(--color-green-tint);
}

body.si_theme_2026 .siavocadogreen:not([style*="color"]) {
    color: var(--color-green);
}

/* tachyons' see-through black borders (the order page's Order Summary rule) */
body.si_theme_2026 :is(.b--black-05, .b--black-10, .b--black-20, .b--black-30) {
    border-color: var(--color-hairline);
}

body.si_theme_2026 :is(.b--black, .b--sifont) {
    border-color: var(--color-ink);
}

body.si_theme_2026 :is(.b--moon-gray, .b--light-gray, .b--si-border, .b--sigray, .b--siborderlightgray, .b--si-border-light, .b--silightgray, .b--sisuperlightgray) {
    border-color: var(--color-input-border);
}

body.si_theme_2026 :is(input:is([type="text"], [type="email"], [type="password"], [type="tel"], [type="number"], [type="search"], [type="date"], :not([type])), select, textarea):not([style*="background"]) {
    background-color: var(--color-white);
    color: var(--color-ink);
    border-color: var(--color-input-border);
}

body.si_theme_2026 input:is([type="checkbox"], [type="radio"]) {
    accent-color: var(--color-accent);
}

body.si_theme_2026 :is(input, textarea)::placeholder {
    color: var(--color-muted);
}

/* the React pop-ups (FullScreenModal) and drawers (DrawerModal: the bag) */
body.si_theme_2026 .modal_container > .modal_box,
body.si_theme_2026 .MuiDrawer-paper,
body.si_theme_2026 [class*="DrawerModal-open"],
body.si_theme_2026 [class*="DrawerModal-drawer-"] {
    background-color: var(--color-white);
    color: var(--color-ink);
}

/* MUI moves focus to the box itself when it opens: not a control, so no focus ring round it */
body.si_theme_2026 .modal_container > .modal_box:focus-visible {
    outline: none;
}

body.si_theme_2026 .modal_container > .modal_box .close_icon svg {
    background: var(--color-white);
    color: var(--color-ink);
}

/* sign-in's stylist panel (CustomerLogin.js) and Create Account's picture panel (CreateAccount.js) are light islands
   (above), in their own ink */
body.si_theme_2026 :is(.find_stylist .has_stylist, .create_account_cover_text) {
    color: var(--color-ink);
}

body.si_theme_2026 .bg-si-border {
    background-color: var(--color-input-border);
}

/*
 * Corners: every rounded corner in the front office is the theme's 2px (--radius), circles aside. Each page's own sheet
 * has its corners at var(--radius); these are the ones in sheets the back offices load too (tachyons' rounding
 * classes, the points pages' reward-bank.scss, the post viewer's PostViewer.scss), so they turn 2px only here, with
 * this body's class in front so each keeps its own weight against the others. Left round: .sn_filter_n (the filters'
 * count bubble), .points-redeem (Become a Stylist's round photo), .fundraiser_icon; and the product badges
 * (.badge_container) for now.
 */
body.si_theme_2026 #reward_bank ._50_off_expiry_date,
body.si_theme_2026 #reward_bank ._50_offs_container,
body.si_theme_2026 #reward_bank ._50_offs_summary,
body.si_theme_2026 #reward_bank .bo_50_offs_summary,
body.si_theme_2026 #reward_bank .bo_points_container,
body.si_theme_2026 #reward_bank .bo_points_summary,
body.si_theme_2026 #reward_bank .fo_points_container,
body.si_theme_2026 #reward_bank .fo_points_summary,
body.si_theme_2026 #reward_bank .new_points_transfer_modal,
body.si_theme_2026 #reward_bank .paginate_points > :not(.previous):not(.next),
body.si_theme_2026 #reward_bank .points_history_table_desktop,
body.si_theme_2026 #reward_bank .points_search input,
body.si_theme_2026 #reward_bank .points_transfer_btn_desktop,
body.si_theme_2026 #reward_bank .points_transfer_btn_mobile,
body.si_theme_2026 #reward_bank .remaining_until_next_c50_message,
body.si_theme_2026 #reward_bank .table_card,
body.si_theme_2026 #reward_bank .table_card_points,
body.si_theme_2026 .br-pill,
body.si_theme_2026 .br-pill-l,
body.si_theme_2026 .br-pill-m,
body.si_theme_2026 .br-pill-ns,
body.si_theme_2026 .br0_5,
body.si_theme_2026 .br1,
body.si_theme_2026 .br2,
body.si_theme_2026 .br2-l,
body.si_theme_2026 .br2-m,
body.si_theme_2026 .br2-ns,
body.si_theme_2026 .br3,
body.si_theme_2026 .br3-l,
body.si_theme_2026 .br3-m,
body.si_theme_2026 .br3-ns,
body.si_theme_2026 .br4,
body.si_theme_2026 .br4-l,
body.si_theme_2026 .br4-m,
body.si_theme_2026 .br4-ns,
body.si_theme_2026 .br4px,
body.si_theme_2026 .br8px,
body.si_theme_2026 .br_0_5,
body.si_theme_2026 .cancel_btn,
body.si_theme_2026 .carousel .slide .legend,
body.si_theme_2026 .give_btn,
body.si_theme_2026 .irl_tagged_product_review,
body.si_theme_2026 .new_points_transfer_modal,
body.si_theme_2026 .points_transfer_summary,
body.si_theme_2026 .search_results {
    border-radius: var(--radius);
}

body.si_theme_2026 .brt8px {
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
}

body.si_theme_2026 .brb8px {
    border-bottom-left-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
}

body.si_theme_2026 .brr8px {
    border-top-right-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
}

/* tachyons' one-side modifiers keep the other side square, as before */

@media (max-width: 767px) {
    :root,
    .si_theme_2026 {
        --side-pad: 16px;
        --section-pad: 32px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .si_theme_2026 *,
    .si_theme_2026 *::before,
    .si_theme_2026 *::after {
        scroll-behavior: auto !important;
    }
}

/*
 * Freshchat's chat button (main_footer.php) is an iframe of a light page: in dark mode the browser paints an iframe
 * whose page doesn't share the embedding element's colour scheme on an opaque white canvas, a white square round the
 * round button. Light on the iframe itself, as its page is, leaves it see-through.
 */
.si_theme_2026 :is(#fc_frame, #fc_frame iframe, iframe[id^="fc_"]) {
    color-scheme: light;
}
