/* ============================================================
   MYAVANA AI Studio — UI theme
   Derived from "12112024 MYAVANA Brand Guidelines"
   Palette: Onyx #222323 · White #ffffff · Stone #f5f5f7 ·
            Sand #eeece1 · Coral #e7a690 · Light Coral #fce5d7 ·
            Blueberry #4a4d68
   Typeface: Archivo (variable, served same-origin)
   ============================================================ */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 100%;
  font-display: swap;
  src: url("/static/fonts/archivo/archivo-latin.woff2") format("woff2");
  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;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 100%;
  font-display: swap;
  src: url("/static/fonts/archivo/archivo-latin-ext.woff2") format("woff2");
  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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ------------------------------------------------------------
   Label Studio's primary color system is built on the
   --color-grape-* scale; every --color-primary-* token in both
   light and dark schemes references it. Re-pointing the scale
   to a Coral ramp (anchored at brand Coral #e7a690 = step 400,
   Light Coral #fce5d7 = step 000) rethemes the whole app.
   ------------------------------------------------------------ */
:root {
  --color-grape-000: #fce5d7; /* Light Coral (brand) */
  --color-grape-100: #f7d5c2;
  --color-grape-200: #f2c5ae;
  --color-grape-300: #edb69f;
  --color-grape-400: #e7a690; /* Coral (brand) */
  --color-grape-500: #d68d76;
  --color-grape-600: #c07460;
  --color-grape-700: #a75f4c;
  --color-grape-800: #824a3b;
  --color-grape-900: #61372c;
  --color-grape-950: #331d17;

  /* Brand reference tokens */
  --myavana-onyx: #222323;
  --myavana-white: #ffffff;
  --myavana-stone: #f5f5f7;
  --myavana-sand: #eeece1;
  --myavana-coral: #e7a690;
  --myavana-light-coral: #fce5d7;
  --myavana-blueberry: #4a4d68;

  /* Typography — Archivo per brand guidelines */
  --font-family-base: "Archivo";
  --font-sans: "Archivo", "Figtree", sans-serif;

  /* -raw triplets are hardcoded per token (used for alpha
     compositing) and do not follow the scale override —
     light-scheme values: */
  --color-primary-background-raw: 252 229 215;
  --color-primary-background-hover-raw: 247 213 194;
  --color-primary-border-raw: 192 116 96;
  --color-primary-border-bold-raw: 231 166 144;
  --color-primary-border-subtle-raw: 214 141 118;
  --color-primary-border-subtler-raw: 237 182 159;
  --color-primary-border-subtlest-raw: 242 197 174;
  --color-primary-content-raw: 167 95 76;
  --color-primary-content-hover-raw: 231 166 144;
  --color-primary-content-subtle-raw: 214 141 118;
  --color-primary-emphasis-raw: 247 213 194;
  --color-primary-emphasis-subtle-raw: 252 229 215;
  --color-primary-focus-outline-raw: 247 213 194;
  --color-primary-icon-raw: 214 141 118;
  --color-primary-shadow-raw: 97 55 44;
  --color-primary-surface-raw: 167 95 76;
  --color-primary-surface-hover-raw: 192 116 96;
  --color-primary-surface-active-raw: 130 74 59;
  --color-primary-surface-content-raw: 252 229 215;
  --color-primary-surface-content-subtle-raw: 247 213 194;
  --color-primary-surface-icon-raw: 247 213 194;
}

:root[data-color-scheme="dark"] {
  --color-primary-background-raw: 51 29 23;
  --color-primary-background-hover-raw: 97 55 44;
  --color-primary-border-raw: 167 95 76;
  --color-primary-border-bold-raw: 130 74 59;
  --color-primary-border-subtle-raw: 167 95 76;
  --color-primary-border-subtler-raw: 130 74 59;
  --color-primary-border-subtlest-raw: 97 55 44;
  --color-primary-content-raw: 231 166 144;
  --color-primary-content-hover-raw: 237 182 159;
  --color-primary-content-subtle-raw: 192 116 96;
  --color-primary-emphasis-raw: 130 74 59;
  --color-primary-emphasis-subtle-raw: 97 55 44;
  --color-primary-focus-outline-raw: 167 95 76;
  --color-primary-icon-raw: 231 166 144;
  --color-primary-shadow-raw: 51 29 23;
  --color-primary-surface-raw: 192 116 96;
  --color-primary-surface-hover-raw: 214 141 118;
  --color-primary-surface-active-raw: 167 95 76;
  --color-primary-surface-content-raw: 252 229 215;
  --color-primary-surface-content-subtle-raw: 237 182 159;
  --color-primary-surface-icon-raw: 247 213 194;
}

/* ------------------------------------------------------------
   MYAVANA primary logo (extracted from myavana.com): onyx+coral
   on light backgrounds, white+coral on dark. Applies to both
   <img> (login lockup) and SVG <image> (in-app header swap).
   ------------------------------------------------------------ */
.myavana-logo-dark {
  display: none;
}
:root[data-color-scheme="dark"] .myavana-logo-dark {
  display: inline;
}
:root[data-color-scheme="dark"] .myavana-logo-light {
  display: none;
}

.myavana-lockup img {
  display: block;
  height: auto;
}
:root[data-color-scheme="dark"] .myavana-lockup .myavana-logo-dark {
  display: block;
}
.myavana-lockup .myavana-sub {
  font-family: "Archivo", "Figtree", "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.35em;
  color: #4a4d68; /* Blueberry */
  margin-top: 10px;
  text-indent: 0.35em; /* optically center against tracking */
  text-align: center;
}
:root[data-color-scheme="dark"] .myavana-lockup .myavana-sub {
  color: #eeece1; /* Sand */
}

/* ------------------------------------------------------------
   Square buttons — matches myavana.com landing page styling
   (covers app buttons, login/signup submit pills, link-buttons)
   ------------------------------------------------------------ */
button,
input[type="submit"],
input[type="button"],
a[role="button"],
[role="button"] {
  border-radius: 0 !important;
}

/* ------------------------------------------------------------
   Hide Label Studio promo/help widgets:
   - "Did you know?" Heidi tips cards (all pages)
   - "Resources" help card + the sidebar section that also holds
     the "Label Studio Version: Community" badge
   ------------------------------------------------------------ */
.lsf-heidy-tip,
[data-testid="resources-card"],
section:has([data-testid="resources-card"]) {
  display: none !important;
}

/* Apply Archivo where Label Studio hardcodes Figtree */
body,
.lsf-root,
[class*="app-"] {
  font-family: "Archivo", "Figtree", "Segoe UI", Helvetica, Arial, sans-serif;
}
