/*
 * Marke und Grundregeln, die Backoffice UND Kundenseiten brauchen: die Design-Tokens und die
 * paar Element-Regeln, auf denen jede Seite steht. Der Astro-Shop importiert genau diese Datei
 * (Ibiza.Astro/src/styles/index.ts) — sie ist die eine Quelle, nicht kopiert
 * (docs/development/public-astro-phase6.md §5). Alles, was nur das Backoffice braucht
 * (Bootstrap-Buttons, Error Boundary, Touch-Ziele der Cockpit-Karten), bleibt in
 * app.css. App.razor lädt diese Datei unmittelbar vor app.css — an der Stelle, an der die Regeln
 * vorher standen, die Kaskade ist also unverändert.
 *
 * Achtung: wwwroot/*.css wird fingerprinted und mit cache-control: immutable ausgeliefert.
 * Änderungen wirken erst nach App-Neustart und hartem Reload (CLAUDE.md, CSS hot-reload gotcha).
 */
/* ============================================================
   Brand Design Tokens – "Elegant Charter Black"
   (Quelle: Wissens-Vault, Marencia-KnowHow/04 Brand & Language/Brand Core.md § Design-Tokens)
   ============================================================ */

:root {
  /* --- Charcoal Navy --- */
  --charcoal-50: #ECECEE;
  --charcoal-100: #CFD1D4;
  --charcoal-200: #9FA2AA;
  --charcoal-300: #6F747F;
  --charcoal-400: #3F4555;
  --charcoal-500: #0F172A;
  --charcoal-600: #0D1425;
  --charcoal-700: #0B1120;
  --charcoal-800: #090E1A;
  --charcoal-900: #070B14;

  /* --- Steel Blue --- */
  --steel-50: #EFF1F3;
  --steel-100: #D6DCE1;
  --steel-200: #ADB8C3;
  --steel-300: #8595A4;
  --steel-400: #5C7186;
  --steel-500: #334E68;
  --steel-600: #2D455C;
  --steel-700: #273B4F;
  --steel-800: #203040;
  --steel-900: #182532;

  /* --- Teal Accent --- */
  --teal-50: #ECF9F8;
  --teal-100: #D0F1ED;
  --teal-200: #A1E3DB;
  --teal-300: #72D4CA;
  --teal-400: #43C6B8;
  --teal-500: #14B8A6;
  --teal-600: #12A292;
  --teal-700: #0F8C7E;
  --teal-800: #0C7267;
  --teal-900: #0A5850;

  /* --- Champagne --- */
  --champagne-50: #FCFAF7;
  --champagne-100: #F7F3EB;
  --champagne-200: #EFE7D7;
  --champagne-300: #E6DAC2;
  --champagne-400: #DECEAE;
  --champagne-500: #D6C29A;
  --champagne-600: #BCAB88;
  --champagne-700: #A39375;
  --champagne-800: #85785F;
  --champagne-900: #675D4A;

  /* --- Pearl --- */
  --pearl-50: #FEFEFE;
  --pearl-100: #FEFDFC;
  --pearl-200: #FCFBF9;
  --pearl-300: #FBFAF7;
  --pearl-400: #F9F8F4;
  --pearl-500: #F8F6F1;
  --pearl-600: #DAD8D4;
  --pearl-700: #BCBBB7;
  --pearl-800: #9A9995;
  --pearl-900: #777674;

  /* --- Semantic aliases (Brand Guidelines: Elegant Charter Black) --- */
  --bg: #FFFFFF;                         /* reines Weiss — bewusste Abweichung von Pearl-500 (s. Brand Core § Design-Tokens im Vault) */
  --surface: var(--pearl-50);            /* #FEFEFE — card surface */
  --expanded-bg: var(--steel-50);        /* #EFF1F3 — accordion expanded */
  --hover-bg: var(--steel-50);           /* #EFF1F3 — hover background */
  --active-bg: var(--teal-50);           /* #ECF9F8 — active/selected bg */
  --dark-section: var(--charcoal-500);   /* #0F172A — dark section */

  /* Sidebar & Menu */
  --sidebar-bg: #FEFEFE;         /* surface */
  --sidebar-divider: #D6DCE1;    /* light border */
  --menu-text: #0F172A;          /* text primary */

  --menu-hover-bg: #F3F5F7;
  --menu-hover-text: #0F172A;

  --menu-parent-open-bg: #EFF1F3;
  --menu-parent-open-text: #0F172A;

  --menu-active-bg: #ECF9F8;     /* teal-50 */
  --menu-active-text: #0F8C7E;   /* teal-700 */

  --text-primary: var(--charcoal-500);   /* #0F172A */
  --text-secondary: var(--steel-500);    /* #334E68 */
  --text-muted: var(--charcoal-300);     /* #6F747F */
  --text-on-dark: var(--pearl-500);      /* #F8F6F1 */

  --border-light: var(--steel-100);      /* #D6DCE1 */
  --border-default: var(--steel-200);    /* #ADB8C3 */
  --border-dark: var(--charcoal-400);    /* #3F4555 */

  /* Card elevation. Two layers on purpose: the tight one draws the edge, the wide soft one
     lifts the card off the page. Since --bg is pure white, a card's own surface (#FEFEFE) no
     longer separates it from the background — the shadow does that job now, not the fill. */
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px -6px rgba(15, 23, 42, 0.12);
  --shadow-card-hover: 0 2px 6px rgba(15, 23, 42, 0.08), 0 16px 36px -8px rgba(15, 23, 42, 0.18);

  /* Primary = Teal Accent (CTA / interactive) */
  --primary: var(--teal-500);            /* #14B8A6 */
  --primary-hover: var(--teal-600);      /* #12A292 */
  --primary-active: var(--teal-700);     /* #0F8C7E */
  --primary-text: var(--charcoal-500);   /* #0F172A — dark text on teal (brand rule) */

  /* Secondary = Steel Blue (structural) */
  --secondary: var(--steel-500);         /* #334E68 */
  --secondary-hover: var(--steel-600);   /* #2D455C */
  --secondary-active: var(--steel-700);  /* #273B4F */
  --secondary-text: var(--pearl-500);    /* #F8F6F1 */

  /* Premium = Champagne (accent) */
  --premium: var(--champagne-500);       /* #D6C29A */
  --premium-text: var(--charcoal-500);   /* #0F172A */

  /* --- Bootstrap 5 overrides --- */
  --bs-body-bg: #fff;
  --bs-body-color: var(--text-primary);
  --bs-link-color: var(--primary);
  --bs-link-hover-color: var(--primary-hover);
  --bs-border-color: var(--border-light);
}

/* ============================================================
   Global base styles
   ============================================================ */

html, body {
    /* Definiert in typography.css. Gilt nur für alles, was nicht Syncfusion ist —
       die Komponenten setzen ihre eigene font-family und erben nicht, deshalb
       zieht syncfusion-overrides.css dieselbe Variable dort noch einmal durch. */
    font-family: var(--font-sans);
    background-color: #fff;
    color: var(--text-primary);
    /* Ohne Antialiasing-Hinweis rendert Inter auf macOS spürbar fetter als auf
       Windows; damit liegen die beiden Plattformen nah beieinander.

       Bewusst ohne text-rendering: optimizeLegibility — die beiden Hinweise oben tragen
       die Angleichung allein. optimizeLegibility schaltet zusätzlich Ligaturen und Kerning
       scharf, was bei längeren Texten als Layout-Verzögerung messbar wird und in mehreren
       Engines eine Fehlerhistorie hat; gewonnen wäre nichts, was hier jemand sieht. */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a, .btn-link {
    color: var(--primary);
}

hr {
    border-color: var(--border-light);
}

/* ============================================================
   Content & layout
   ============================================================ */

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

/* Absatzabstand, global. */

p {
    margin-bottom: 2px;
}

/* ============================================================
   Form validation — Blazor's EditForm classes (valid/modified/invalid on the field, the messages);
   the shop's contact form uses the same ones in both frontends.
   ============================================================ */

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}
