/*
 * Selox brand layer for every surface OTHER than the admin panel (the admin
 * panel has the same palette and fonts in selox-admin.css):
 *   - legacy vendor (seller) panel and vendor sign-in pages
 *   - Phase 4 vendor back office (layouts/vendor-ops)
 *   - customer collection pages (layouts/selox-customer)
 *   - customer storefront theme (themes/default front-end layout)
 *   - error pages
 *
 * Loaded LAST in each layout. Fonts are self-hosted (SIL OFL 1.1 licences in
 * ../fonts/*), so no page makes a request to Google Fonts for them.
 *
 * Palette (from the Selox logo, 2026-11-07): primary plum #4E184C, accents gold
 * #FBB11F / cream #E7C7AE (never behind white text), canvas #F8F9FA, supporting #6C7293 / #21BF06 /
 * #3B86D1. The storefront's own colours come from the `colors` business
 * setting (Business Setup); this file only sets type and the panels'
 * legacy colour variables.
 */

/* ---------------------------------------------------------------- fonts */
@font-face {
    font-family: "Open Sans";
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
    src: url("../fonts/open-sans/OpenSansVariable.woff2") format("woff2");
}
@font-face { font-family: "Mukta"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/mukta/Mukta-400.woff2") format("woff2"); }
@font-face { font-family: "Mukta"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/mukta/Mukta-500.woff2") format("woff2"); }
@font-face { font-family: "Mukta"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/mukta/Mukta-600.woff2") format("woff2"); }
@font-face { font-family: "Mukta"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/mukta/Mukta-700.woff2") format("woff2"); }

/* --------------------------------------------------------------- tokens */
:root {
    --selox-primary: #4e184c;
    --selox-primary-hover: #3a1138;
    --selox-primary-50: #f6edf5;
    --selox-primary-rgb: 78, 24, 76;
    --selox-accent: #fbb11f;
    --selox-accent-soft: #e7c7ae;
    --selox-ink: #1f2235;
    --selox-ink-soft: #6c7293;
    --selox-canvas: #f8f9fa;
    --selox-success: #178a04;
    --selox-success-bright: #21bf06;
    --selox-info: #2f6fb3;
    --selox-info-bright: #3b86d1;
    --selox-ease: cubic-bezier(.2, .7, .2, 1);
    --selox-font: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --selox-font-heading: "Mukta", "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Legacy panel colour variables (vendor panel / vendor back office use the
   back-end style.css, which reads these). The storefront sets --base /
   --web-primary itself from the business setting, after this file. */
body.selox-panel, .selox-panel-root {
    --c1: var(--selox-primary);
    --c1-rgb: var(--selox-primary-rgb);
    --primary: var(--selox-primary);
    --title-color: var(--selox-ink);
    --text-color: var(--selox-ink-soft);
}

/* ----------------------------------------------------------- typography */
/* Text in Open Sans, headings in Mukta. Elements that carry an icon-font
   class are skipped so every icon set (tio-, czi-, fa, ti, sixvalley) keeps
   its own font. */
body,
body :not(i):not(.fa):not(.ti):not([class*="tio-"]):not([class*="czi-"]):not([class*="fa-"]):not([class^="ti-"]):not([class*=" ti-"]):not([class*="icon"]):not(code):not(pre):not(kbd) {
    font-family: var(--selox-font) !important;
}
/* Same exclusion chain as the text rule plus the :is() term, so a heading's
   specificity (0,9,6) beats the text rule's (0,8,6): with a shorter
   selector the text rule won and headings stayed Open Sans. */
body :is(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6, .page-header-title, .card-title, .section-title, .title):not(i):not(.fa):not(.ti):not([class*="tio-"]):not([class*="czi-"]):not([class*="fa-"]):not([class^="ti-"]):not([class*=" ti-"]):not([class*="icon"]):not(code):not(pre):not(kbd) {
    font-family: var(--selox-font-heading) !important;
    letter-spacing: 0;
}

/* ------------------------------------------------- panels: colour + cards */
body.selox-panel { background-color: var(--selox-canvas); color: var(--selox-ink-soft); }
body.selox-panel a { color: var(--selox-primary); }
body.selox-panel a:hover { color: var(--selox-primary-hover); }
body.selox-panel .btn--primary, body.selox-panel .btn-primary {
    background-color: var(--selox-primary) !important;
    border-color: var(--selox-primary) !important;
    color: #fff !important;
}
body.selox-panel .btn--primary:hover, body.selox-panel .btn-primary:hover {
    background-color: var(--selox-primary-hover) !important;
    border-color: var(--selox-primary-hover) !important;
}
body.selox-panel .text-primary, body.selox-panel .text--primary { color: var(--selox-primary) !important; }
body.selox-panel .bg-primary { background-color: var(--selox-primary) !important; }
body.selox-panel .card {
    border: 1px solid #e9ebf2;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(31, 34, 53, .04), 0 4px 14px rgba(31, 34, 53, .05);
}

/* --------------------------------------------------------------- motion */
@keyframes selox-rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
    body.selox-panel .content .card { animation: selox-rise .45s var(--selox-ease) both; }
    body.selox-panel .card, body.selox-panel .btn { transition: transform .2s var(--selox-ease), box-shadow .2s var(--selox-ease); }
    body.selox-panel .btn--primary:hover, body.selox-panel .btn-primary:hover {
        transform: translateY(-1px);
        box-shadow: 0 8px 18px rgba(var(--selox-primary-rgb), .25);
    }
}

/* Tabs / pills in the vendor back office and customer pages. */
body.selox-panel .nav-pills .nav-link.active,
body.selox-panel .nav-pills .show > .nav-link {
    background-color: var(--selox-primary);
    color: #fff;
    box-shadow: 0 6px 16px rgba(var(--selox-primary-rgb), .25);
}
body.selox-panel .nav-pills .nav-link { border-radius: 999px; }
body.selox-panel .nav-tabs .nav-link.active { color: var(--selox-primary); border-bottom-color: var(--selox-primary); }
body.selox-panel .form-control:focus, body.selox-panel .custom-select:focus {
    border-color: rgba(var(--selox-primary-rgb), .55);
    box-shadow: 0 0 0 .2rem rgba(var(--selox-primary-rgb), .18);
}
body.selox-panel .page-item.active .page-link { background-color: var(--selox-primary); border-color: var(--selox-primary); }
