/* =====================================================================
   PPDMc v2 – design tokens (website + dashboard)
   Values 1:1 from design_handoff_ppdmc/README.md ("Design Tokens").
   The guest view uses its own per-restaurant variables (DesignSettings).
   ===================================================================== */
:root {
  /* fonts (self-hosted, see fonts-ui.css / fonts.css) */
  --pp-font-display: 'Space Grotesk', system-ui, sans-serif;
  --pp-font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* surfaces */
  --pp-bg: #F4F2ED;              /* page background */
  --pp-surface: #FFFFFF;         /* cards */
  --pp-field: #F4F2ED;           /* input background */
  --pp-hairline: #F0EDE6;        /* light dividers */
  --pp-border: #E3DFD6;          /* borders */

  /* text */
  --pp-text: #111111;
  --pp-text-2: #5E5A53;          /* secondary */
  --pp-text-3: #7A766D;          /* tertiary */
  --pp-label: #4A4740;
  --pp-hint: #8A857C;

  /* accent & states */
  --pp-accent: oklch(0.56 0.16 255);
  --pp-accent-hover: oklch(0.5 0.16 255);
  --pp-accent-soft: oklch(0.94 0.035 255);
  --pp-success: oklch(0.6 0.12 155);      /* toggle on */
  --pp-success-soft: oklch(0.95 0.04 155);
  --pp-toggle-off: #D9D4CA;
  --pp-danger: oklch(0.5 0.16 25);        /* text */
  --pp-danger-strong: oklch(0.55 0.18 25);/* button */
  --pp-danger-soft: oklch(0.96 0.03 25);  /* notice box */
  --pp-warning-soft: oklch(0.95 0.05 80);
  --pp-premium-bg: oklch(0.86 0.09 80);
  --pp-premium-fg: #4A3410;
  --pp-chip-active-bg: #111111;
  --pp-chip-active-fg: #FFFFFF;
  --pp-chip-bg: #F4F2ED;
  --pp-chip-fg: #4A4740;

  /* selection ring */
  --pp-ring: inset 0 0 0 2px oklch(0.56 0.16 255);

  /* radii */
  --pp-r-chip: 12px;
  --pp-r-input: 12px;
  --pp-r-btn: 13px;
  --pp-r-btn-lg: 15px;
  --pp-r-card: 22px;
  --pp-r-modal: 24px;

  /* sizes */
  --pp-h-input: 44px;
  --pp-h-btn: 44px;
  --pp-h-cta: 50px;
  --pp-h-chip: 38px;
  --pp-h-chip-sm: 34px;

  /* shadows (used sparingly) */
  --pp-shadow-sticky: 0 10px 30px -20px rgba(0, 0, 0, 0.3);
  --pp-shadow-phone: 0 40px 70px -40px rgba(0, 0, 0, 0.55);
  --pp-shadow-modal: 0 40px 90px -30px rgba(0, 0, 0, 0.45);
  --pp-shadow-toast: 0 12px 30px -10px rgba(0, 0, 0, 0.4);
  --pp-overlay: rgba(17, 17, 17, 0.42);

  /* motion */
  --pp-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --pp-dur: 0.2s;

  /* layout */
  --pp-content-max: 1200px;
  --pp-sidebar-w: 248px;

  /* z-index scale */
  --pp-z-sticky: 15;
  --pp-z-palette: 40;
  --pp-z-modal: 45;
  --pp-z-toast: 60;
}

/* ---------------------------------------------------------------------
   Colour scheme of the customer dashboard (Einstellungen › Darstellung, Premium).
   Default = "ProPeak Blau" (all plans); <html data-scheme="…"> switches it
   (layouts/dashboard.php, App\Services\UiScheme). Values from the design handoff.
   dashboard.css maps them onto --pp-accent/--pp-bg …, booking.css onto --bk-*.
   --------------------------------------------------------------------- */
:root {
  --pp-brand: #2f55e4; --pp-brand-2: #2446c7; --pp-brand-soft: #dfe6ff;
  --pp-page: #f7f7f5; --pp-sub: #f1f2f4; --pp-line: #e7e8eb; --pp-line-2: #d6d9df;
  --pp-side-bg: #0d0e10;                     /* sidebar */
  --pp-side-ink: #e9ebef;                    /* sidebar text */
  --pp-side-mut: #9aa1ae;                    /* sidebar muted text */
  --pp-side-on: rgba(255, 255, 255, 0.09);   /* active item */
  --pp-side-hover: rgba(255, 255, 255, 0.05);
  --pp-side-line: rgba(255, 255, 255, 0.12); /* borders/dividers on the sidebar */
}
[data-scheme="bordeaux"]   { --pp-brand: #6b1e24; --pp-brand-2: #5e1a20; --pp-brand-soft: #f1e3c8; --pp-page: #f6f2ea; --pp-sub: #f1ebe0; --pp-line: #ece5d9; --pp-line-2: #d4c9b8; --pp-side-bg: #1d1714; }
[data-scheme="pflaume"]    { --pp-brand: #55002f; --pp-brand-2: #430025; --pp-brand-soft: #f3dbe6; --pp-page: #f8f0e6; --pp-sub: #f3e9dc; --pp-line: #ecdfcf; --pp-line-2: #d9c8b4; --pp-side-bg: #2a0018; }
[data-scheme="salbei"]     { --pp-brand: #3f6b4f; --pp-brand-2: #335a42; --pp-brand-soft: #dce9df; --pp-page: #f4f5f0; --pp-sub: #eceee6; --pp-line: #e2e5db; --pp-line-2: #ccd1c3; --pp-side-bg: #151c17; }
[data-scheme="nacht"]      { --pp-brand: #1f3a5f; --pp-brand-2: #172d4a; --pp-brand-soft: #e3e9f3; --pp-page: #f6f4ef; --pp-sub: #eeebe4; --pp-line: #e5e1d8; --pp-line-2: #d0cabd; --pp-side-bg: #0e1a2b; }
[data-scheme="terrakotta"] { --pp-brand: #b5532f; --pp-brand-2: #9c4626; --pp-brand-soft: #f6ddd0; --pp-page: #f8f3ee; --pp-sub: #f1e9e1; --pp-line: #ebe1d7; --pp-line-2: #d8c8b9; --pp-side-bg: #24160f; }
[data-scheme="graphit"]    { --pp-brand: #1f2328; --pp-brand-2: #0f1115; --pp-brand-soft: #e4e4e2; --pp-page: #f5f5f4; --pp-sub: #ededec; --pp-line: #e4e4e2; --pp-line-2: #cfcfcc; --pp-side-bg: #0f1115; }

/* ---------------------------------------------------------------------
   Dark mode of the customer dashboard (Einstellungen › Darstellung › Modus, all plans, whole restaurant):
   <html data-mode="dark"> (layouts/dashboard.php, UiScheme::mode); light = attribute absent, the values above.
   Only token values change; the kits read them (dashboard.css, ui.css, booking.css → --bk-*).
   Brand: --pp-brand stays the FILL (white text on it ≥ 4.5:1); --pp-brand-ink = brand AS TEXT on surfaces
   (light: the brand itself; dark: a lighter tone, ≥ 4.5:1 on card and on --pp-brand-soft).
   Dark-only tokens (no light value): the kits use them with the old light literal as fallback,
   e.g. background: var(--pp-surface-2, #FAF9F6) – light mode stays exactly as before.
   Public pages (website, guest booking, menus) never set data-mode.
   --------------------------------------------------------------------- */
:root { --pp-brand-ink: var(--pp-brand); }
[data-mode="dark"] {
  color-scheme: dark;
  /* scheme layer (default ProPeak Blau, per scheme below) */
  --pp-brand: #4a6be8; --pp-brand-2: #3d5ddc; --pp-brand-soft: #26336a; --pp-brand-ink: #859dff;
  --pp-page: #0c0e12; --pp-surface: #14171d; --pp-sub: #1a1e25; --pp-line: #252a33; --pp-line-2: #343a46;
  --pp-side-bg: #07080b; --pp-side-line: rgba(255, 255, 255, 0.1);
  /* base layer */
  --pp-bg: var(--pp-page); --pp-field: var(--pp-page); --pp-hairline: var(--pp-sub); --pp-border: var(--pp-line);
  --pp-text: #e9ebef; --pp-text-2: #c7cbd3; --pp-text-3: #a2a9b5; --pp-label: #c7cbd3; --pp-hint: #959cab;
  --pp-accent-soft: var(--pp-brand-soft);
  --pp-success: #2f9e5c; --pp-success-soft: #11291a;
  --pp-toggle-off: #3a404c;
  --pp-danger: #ff8a7d; --pp-danger-strong: #c4321f; --pp-danger-hover: #a82a1a; --pp-danger-soft: #3a1916;
  --pp-warning-soft: #33270f;
  --pp-premium-bg: #3d2f12; --pp-premium-fg: #f3d58c;
  --pp-chip-active-bg: #e9ebef; --pp-chip-active-fg: #111111;
  --pp-chip-bg: var(--pp-sub); --pp-chip-fg: #c7cbd3;
  --pp-overlay: rgba(0, 0, 0, 0.62); --pp-palette-scrim: var(--pp-overlay);
  /* dark-only */
  --pp-accent-ink: var(--pp-brand-ink);                      /* accent/brand used as text */
  --pp-surface-2: var(--pp-sub); --pp-sand: var(--pp-sub);   /* hover on cards, light fills inside cards */
  --pp-fill-hover: var(--pp-line); --pp-line-3: var(--pp-line-2);
  --pp-icon: #8a919e; --pp-ink-2: #c7cbd3;
  --pp-hover-tint: rgba(255, 255, 255, 0.06); --pp-glass: color-mix(in srgb, var(--pp-surface) 92%, transparent);
  --pp-inverse-bg: #e9ebef; --pp-inverse-fg: #111111; --pp-inverse-hover: #ffffff; --pp-toast-dot: rgba(0, 0, 0, 0.1);   /* selected chips/tabs, dark buttons, toast */
  --pp-ok-bg: #11291a; --pp-ok-ink: #73d995;
  --pp-warn-bg: #33270f; --pp-warn-bg-2: #3f3014; --pp-warn-ink: #f3c76a; --pp-warn-line: #4a3a17;
  --pp-err-bg: #3a1916; --pp-err-ink: #ff958a; --pp-on-brand-mut: #ffffff;
  --pp-info-bg: var(--pp-brand-soft); --pp-info-bg-2: color-mix(in srgb, var(--pp-brand-soft) 45%, var(--pp-surface)); --pp-info-ink: var(--pp-brand-ink); --pp-info-line: var(--pp-line-2);
  --pp-shadow-sticky: 0 10px 30px -20px rgba(0, 0, 0, 0.8);
  --pp-shadow-modal: 0 40px 90px -30px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.07);
  --pp-shadow-toast: 0 12px 30px -10px rgba(0, 0, 0, 0.8);
}
/* per scheme: brand fill + brand ink + tinted surfaces (text stays neutral) */
[data-mode="dark"][data-scheme="bordeaux"]   { --pp-brand: #a8323b; --pp-brand-2: #93283a; --pp-brand-soft: #4a2a1e; --pp-brand-ink: #d28991; --pp-page: #13100e; --pp-surface: #1c1815; --pp-sub: #231e1a; --pp-line: #2e2722; --pp-line-2: #3d342d; --pp-side-bg: #0c0a09; }
[data-mode="dark"][data-scheme="pflaume"]    { --pp-brand: #a3185f; --pp-brand-2: #8f1a55; --pp-brand-soft: #45203a; --pp-brand-ink: #d779aa; --pp-page: #140d10; --pp-surface: #1d1418; --pp-sub: #241a1f; --pp-line: #30242a; --pp-line-2: #3f3037; --pp-side-bg: #12000a; }
[data-mode="dark"][data-scheme="salbei"]     { --pp-brand: #4c805f; --pp-brand-2: #3f7052; --pp-brand-soft: #1f3a2a; --pp-brand-ink: #6fae86; --pp-page: #0e120f; --pp-surface: #161b17; --pp-sub: #1c221d; --pp-line: #273028; --pp-line-2: #354036; --pp-side-bg: #080c09; }
[data-mode="dark"][data-scheme="nacht"]      { --pp-brand: #3a69aa; --pp-brand-2: #33609e; --pp-brand-soft: #1c2a40; --pp-brand-ink: #7fa3d6; --pp-page: #0b1018; --pp-surface: #121924; --pp-sub: #18202c; --pp-line: #232d3b; --pp-line-2: #313d4d; --pp-side-bg: #070d16; }
[data-mode="dark"][data-scheme="terrakotta"] { --pp-brand: #b5532f; --pp-brand-2: #9c4626; --pp-brand-soft: #46271a; --pp-brand-ink: #e0845f; --pp-page: #130e0b; --pp-surface: #1c1612; --pp-sub: #231c17; --pp-line: #2f2620; --pp-line-2: #3e332b; --pp-side-bg: #0f0906; }
[data-mode="dark"][data-scheme="graphit"]    { --pp-brand: #5b6573; --pp-brand-2: #4d5663; --pp-brand-soft: #2a2d33; --pp-brand-ink: #e6e8eb; --pp-page: #0e0f11; --pp-surface: #16181b; --pp-sub: #1c1e22; --pp-line: #26292e; --pp-line-2: #35393f; --pp-side-bg: #050607; }

/* ---------------------------------------------------------------------
   Dark mode › Tischplan (Buchung › Tischplan, "Tisch zuweisen", Einstellungen › Räume & Plätze › Tischplan).
   Colours only – layout, functions and the Tischplan files themselves stay untouched
   (booking-timeline/-floor/-assign/-editor.css, booking-floor-geo.js). Light mode: nothing here applies.
   Problem: those files fill the time bar and the active room pill with --bk-ink + white text,
   but --bk-ink is the (light) text colour in dark mode.
   The plan SVG (booking-floor-geo.js) sets its light-only literals as inline styles → !important, matched by
   the literal value so the red selection (#e0302a) keeps its colour.
   --------------------------------------------------------------------- */
/* time bar (Tischplan + Tisch zuweisen): stays a dark bar, a raised tone of the scheme; handle = brand as ink */
[data-mode="dark"] .bktl { --bk-ink: var(--pp-line); --bk-acc: var(--pp-brand-ink); }
/* active room pill (Tischplan, Tisch zuweisen, Tischplaner): light pill + dark text, like the other selected chips */
[data-mode="dark"] :is(.bkf-room, .bka-room, .bke-room).is-active { color: var(--pp-inverse-fg); }
[data-mode="dark"] :is(.bkf-room, .bka-room, .bke-room).is-active small { color: color-mix(in srgb, var(--pp-inverse-fg) 72%, transparent); }
/* dotted floor behind the plan */
[data-mode="dark"] :is(.bkf-plan, .bka-plan) { background-image: radial-gradient(circle, rgba(255, 255, 255, 0.07) 1px, transparent 1.4px); }
/* plan SVG: chairs tinted towards the dark floor instead of white (same 40 % of the table outline as in light) */
[data-mode="dark"] .bkg-t > rect[style*="color-mix"] { fill: color-mix(in srgb, var(--bk-okInk) 40%, var(--bk-card)) !important; }   /* frei, Tischplaner */
[data-mode="dark"] .bkg-t[data-s="reserviert"] > rect[style*="color-mix"] { fill: color-mix(in srgb, var(--bk-errInk) 40%, var(--bk-card)) !important; }
[data-mode="dark"] .bkg-t[data-s="angefragt"] > rect[style*="color-mix"] { fill: color-mix(in srgb, var(--bk-warn) 40%, var(--bk-card)) !important; }
[data-mode="dark"] .bkg-t[data-s="da"] > rect[style*="color-mix"] { fill: color-mix(in srgb, var(--bk-brand2) 40%, var(--bk-card)) !important; }
[data-mode="dark"] .bkg-t[data-s="zu"] > rect[style*="color-mix"] { fill: color-mix(in srgb, var(--bk-zuInk) 40%, var(--bk-card)) !important; }
/* plan SVG: zones (dashed areas), Tischplaner grid, entrances */
[data-mode="dark"] .bkg-area > rect { fill: rgba(255, 255, 255, 0.035) !important; }
[data-mode="dark"] .bkg-area > rect[style*="rgba(15,17,21,.35)"] { stroke: rgba(233, 235, 239, 0.4) !important; }
[data-mode="dark"] .bkg-room pattern path[style*="rgba(15,17,21,.07)"] { stroke: rgba(255, 255, 255, 0.06) !important; }
[data-mode="dark"] .bkg-room pattern path[style*="rgba(15,17,21,.16)"] { stroke: rgba(255, 255, 255, 0.14) !important; }
[data-mode="dark"] .bkg-door > rect[style*="#2c6e8f"] { fill: #5aa9cf !important; }
[data-mode="dark"] .bkg-door > text[style*="#2c6e8f"] { fill: #5aa9cf !important; }
