/* ============================================================
   SanxiasWorld — Theme-Presets für Anbieter-Seiten
   8 Kategorie-Themen. Aktiviert per body[data-theme="<type>"].

   Grundregel: Brand-Fundament (Fraunces, warmes Off-White, rot)
   bleibt überall erhalten. Themes ändern nur Akzent, Hero-Tint
   und subtile Glasmorphism-Tönung.

   Tokens (von app.css / inline-styles erwartet):
     --theme-accent         → Haupt-Akzent (CTA, Highlights)
     --theme-accent-soft    → 12% Tinted Fill
     --theme-accent-strong  → dunkle Akzent-Variante (Hover)
     --theme-hero-grad      → Hero-Gradient-Layer (meist mit alpha)
     --theme-link           → Link-Farbe im Fließtext
     --theme-chip-bg        → Chip-/Badge-Hintergrund
     --theme-chip-fg        → Chip-/Badge-Textfarbe
     --theme-glass-bg       → Glasmorph-Layer Hintergrund
     --theme-glass-border   → Glasmorph-Layer Border

   Jedes Preset definiert 4 "accent-swatches", die der Anbieter
   später wählen kann (`providers.custom_accent_color` overridet).
============================================================ */

/* ── Base / Default (identisch zu tour = Default) ─────────── */
body {
  --theme-accent:        #D94F2C;
  --theme-accent-soft:   rgba(217,79,44,0.12);
  --theme-accent-strong: #B53E1D;
  --theme-hero-grad:     linear-gradient(135deg, rgba(217,79,44,0.06) 0%, rgba(254,252,249,1) 65%);
  --theme-link:          #D94F2C;
  --theme-chip-bg:       rgba(217,79,44,0.10);
  --theme-chip-fg:       #B53E1D;
  --theme-glass-bg:      rgba(254,252,249,0.72);
  --theme-glass-border:  rgba(20,18,14,0.08);
}

/* ───────────────── 1. TOUR — Classic Explorer ───────────── */
body[data-theme="tour"] {
  --theme-accent:        #D94F2C;
  --theme-accent-soft:   rgba(217,79,44,0.10);
  --theme-accent-strong: #B53E1D;
  --theme-hero-grad:     linear-gradient(135deg, rgba(217,79,44,0.08) 0%, rgba(201,168,124,0.06) 60%, rgba(254,252,249,1) 100%);
  --theme-link:          #B53E1D;
  --theme-chip-bg:       rgba(201,168,124,0.18);
  --theme-chip-fg:       #6B5436;
}

/* ───────────────── 2. ACTIVITY — Warm Creative ──────────── */
body[data-theme="activity"] {
  --theme-accent:        #E89B1D;
  --theme-accent-soft:   rgba(232,155,29,0.14);
  --theme-accent-strong: #B57614;
  --theme-hero-grad:     linear-gradient(135deg, rgba(242,176,53,0.12) 0%, rgba(244,234,213,0.4) 60%, rgba(254,252,249,1) 100%);
  --theme-link:          #B57614;
  --theme-chip-bg:       rgba(242,176,53,0.20);
  --theme-chip-fg:       #8C5A0E;
}

/* ───────────────── 3. WORKSHOP — Quiet Craft ────────────── */
body[data-theme="workshop"] {
  --theme-accent:        #8A6B4D;
  --theme-accent-soft:   rgba(138,107,77,0.14);
  --theme-accent-strong: #5E4732;
  --theme-hero-grad:     linear-gradient(135deg, rgba(201,179,140,0.22) 0%, rgba(228,212,188,0.18) 55%, rgba(254,252,249,1) 100%);
  --theme-link:          #5E4732;
  --theme-chip-bg:       rgba(138,107,77,0.14);
  --theme-chip-fg:       #5E4732;
}

/* ───────────────── 4. OUTDOOR — Nature Deep ─────────────── */
body[data-theme="outdoor"] {
  --theme-accent:        #2D6B3F;
  --theme-accent-soft:   rgba(45,107,63,0.12);
  --theme-accent-strong: #1F4F2D;
  --theme-hero-grad:     linear-gradient(135deg, rgba(45,107,63,0.10) 0%, rgba(168,193,160,0.18) 50%, rgba(254,252,249,1) 100%);
  --theme-link:          #1F4F2D;
  --theme-chip-bg:       rgba(168,193,160,0.25);
  --theme-chip-fg:       #1F4F2D;
}

/* ───────────────── 5. FOOD — Appetizing ─────────────────── */
body[data-theme="food"] {
  --theme-accent:        #C0392B;
  --theme-accent-soft:   rgba(192,57,43,0.12);
  --theme-accent-strong: #8E2018;
  --theme-hero-grad:     linear-gradient(135deg, rgba(192,57,43,0.08) 0%, rgba(230,126,75,0.12) 55%, rgba(254,252,249,1) 100%);
  --theme-link:          #8E2018;
  --theme-chip-bg:       rgba(230,126,75,0.18);
  --theme-chip-fg:       #8E2018;
}

/* ───────────────── 6. WELLNESS — Calm Balance ───────────── */
body[data-theme="wellness"] {
  --theme-accent:        #6E9D7A;
  --theme-accent-soft:   rgba(110,157,122,0.14);
  --theme-accent-strong: #4F7A5A;
  --theme-hero-grad:     linear-gradient(135deg, rgba(139,174,148,0.16) 0%, rgba(232,223,201,0.26) 55%, rgba(254,252,249,1) 100%);
  --theme-link:          #4F7A5A;
  --theme-chip-bg:       rgba(139,174,148,0.22);
  --theme-chip-fg:       #3E6347;
  /* Wellness: etwas mehr Atemraum im Body */
  --theme-line-height:   1.82;
}

/* ───────────────── 7. TRANSFER — Efficient Clear ────────── */
body[data-theme="transfer"] {
  --theme-accent:        #1558A0;
  --theme-accent-soft:   rgba(21,88,160,0.10);
  --theme-accent-strong: #0C3E6B;
  --theme-hero-grad:     linear-gradient(135deg, rgba(21,88,160,0.06) 0%, rgba(229,231,235,0.5) 60%, rgba(254,252,249,1) 100%);
  --theme-link:          #0C3E6B;
  --theme-chip-bg:       rgba(21,88,160,0.12);
  --theme-chip-fg:       #0C3E6B;
}

/* ───────────────── 8. TICKET — Event Energy ─────────────── */
body[data-theme="ticket"] {
  --theme-accent:        #B32874;
  --theme-accent-soft:   rgba(179,40,116,0.12);
  --theme-accent-strong: #841A54;
  --theme-hero-grad:     linear-gradient(135deg, rgba(217,50,140,0.10) 0%, rgba(224,160,48,0.10) 60%, rgba(254,252,249,1) 100%);
  --theme-link:          #841A54;
  --theme-chip-bg:       rgba(217,50,140,0.14);
  --theme-chip-fg:       #841A54;
}

/* ============================================================
   Theme-sensitive Komponenten — nutzen die Tokens oben
============================================================ */

/* Hero-Bereich bekommt seine subtile Farbwelt */
.theme-hero,
.hero-section,
section.hero,
#hero-next-exp {
  background-image: var(--theme-hero-grad) !important;
}

/* Primär-CTA */
.btn-primary,
.btn-cta,
button.primary,
.cta-primary,
.save-btn {
  background: var(--theme-accent);
  transition: background-color 200ms ease, transform 150ms ease, box-shadow 200ms ease;
}
.btn-primary:hover,
.btn-cta:hover,
button.primary:hover,
.cta-primary:hover,
.save-btn:hover {
  background: var(--theme-accent-strong);
}
.btn-primary:active { transform: scale(0.98); }

/* Accent-Chips / kleine Badges */
.theme-chip,
.type-badge,
.chip-tgl:has(input:checked) {
  background: var(--theme-chip-bg);
  color: var(--theme-chip-fg);
  border-color: transparent;
}

/* Links innerhalb von Inhalts-Containern */
.content a:not(.btn-primary):not(.btn-ghost),
.prose a {
  color: var(--theme-link);
}

/* Glasmorphism-Layer für Overlays (Hero, Sticky-Header, Modal) */
.theme-glass {
  background: var(--theme-glass-bg);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border: 1px solid var(--theme-glass-border);
}

/* Bento-Grid-Helper (Detailseiten-Module-Raster) */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.bento > .b-hero  { grid-column: 1 / -1; }
.bento > .b-wide  { grid-column: span 8; }
.bento > .b-half  { grid-column: span 6; }
.bento > .b-third { grid-column: span 4; }
.bento > .b-quart { grid-column: span 3; }
@media (max-width: 768px) {
  .bento > * { grid-column: 1 / -1 !important; }
}

/* Wellness: weicheres Body-Letter für Ruhe */
body[data-theme="wellness"] p,
body[data-theme="wellness"] .prose {
  line-height: var(--theme-line-height, 1.82);
}

/* Motion: Micro-Press-Feedback für alle Klickflächen */
.theme-press,
.card,
.type-card,
.tab {
  transition: transform 160ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.theme-press:active,
.type-card:active {
  transform: scale(0.985);
}

/* Reduced motion: Alle Animationen deaktivieren */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Focus-Ring überall sichtbar (Accessibility) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.type-card:focus-visible {
  outline: 2px solid var(--theme-accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Mobile Theme-Header Anpassung */
@media (max-width: 640px) {
  :root {
    --theme-hero-grad-mobile: var(--theme-hero-grad);
  }
}

/* ════════════════════════════════════════════════════════════
   PRESET 9: language — Sprachkurse / Tutoren (academic-warm)
   Added 2026-04-29 for public provider profile page.
   Sub-variants via [data-subtheme="business|exam|kids"] override
   only the accent colors; layout/spacing unchanged.
   ════════════════════════════════════════════════════════════ */
body[data-theme="language"] {
  --theme-accent:        #4F46E5;
  --theme-accent-soft:   #EEF2FF;
  --theme-accent-strong: #3730A3;
  --theme-hero-grad:     linear-gradient(135deg, #FAF6E8 0%, #EEF2FF 100%);
  --theme-link:          #4F46E5;
  --theme-chip-bg:       #EEF2FF;
  --theme-chip-fg:       #3730A3;
  --theme-glass-bg:      rgba(238, 242, 255, 0.6);
  --theme-glass-border:  rgba(79, 70, 229, 0.2);
}

body[data-theme="language"][data-subtheme="business"] {
  --theme-accent:        #1E3A8A;
  --theme-accent-soft:   #EFF6FF;
  --theme-accent-strong: #1E40AF;
  --theme-link:          #1E3A8A;
  --theme-chip-bg:       #EFF6FF;
  --theme-chip-fg:       #1E40AF;
}

body[data-theme="language"][data-subtheme="exam"] {
  --theme-accent:        #B45309;
  --theme-accent-soft:   #FEF3C7;
  --theme-accent-strong: #92400E;
  --theme-link:          #B45309;
  --theme-chip-bg:       #FEF3C7;
  --theme-chip-fg:       #92400E;
}

body[data-theme="language"][data-subtheme="kids"] {
  --theme-accent:        #DB2777;
  --theme-accent-soft:   #FCE7F3;
  --theme-accent-strong: #9D174D;
  --theme-link:          #DB2777;
  --theme-chip-bg:       #FCE7F3;
  --theme-chip-fg:       #9D174D;
}
