/* css/tokens.css — Design-Tokens für Muslim Radar */
/* Alle Werte als CSS Custom Properties — konsistentes Design-System */

/* ============================================================
   LIGHT MODE (Default)
   ============================================================ */
:root {
  /* --- Primärfarbe (Material You — Islamic Green) --- */
  --color-primary:        #005a3c;
  --color-primary-light:  #247352;
  --color-primary-dark:   #003d28;
  --color-primary-50:     #a5f3ca;
  --color-primary-100:    #89d6af;
  /* Tonal Surface: sehr helle Fläche für aktive Nav-Items, Hover-States */
  --color-primary-fixed:  oklch(0.96 0.03 165);
  /* Allgemeine Surface-Farbe (= Card-Hintergrund) */
  --color-surface:        #ffffff;

  /* --- Hintergrundfarben: Warm-Neutral --- */
  --color-bg:            #fcf9f1;
  --color-bg-card:       #ffffff;
  --color-bg-elevated:   #f1eee6;
  --color-bg-subtle:     #ebe8e0;

  /* --- Text --- */
  --color-text:          #1c1c17;
  --color-text-muted:    #3f4943;
  --color-text-faint:    #6f7a72;
  --color-text-inverse:  #ffffff;

  /* --- Rand & Trennlinien --- */
  --color-border:        #bfc9c1;
  --color-border-light:  #e5e2da;

  /* --- Akzentfarbe: Warm-Amber (für Badges, Highlights) --- */
  --color-accent:        oklch(0.65 0.15 45);
  --color-accent-bg:     oklch(0.97 0.03 45);

  /* --- Semantische Farben --- */
  --color-success:       oklch(0.55 0.14 145);
  --color-success-bg:    oklch(0.97 0.03 145);
  --color-warning:       oklch(0.70 0.15 60);
  --color-warning-bg:    oklch(0.98 0.03 60);
  --color-error:         oklch(0.55 0.20 25);
  --color-error-bg:      oklch(0.97 0.03 25);
  --color-info:          oklch(0.55 0.15 235);
  --color-info-bg:       oklch(0.97 0.03 235);

  /* --- Volunteer / Featured Badge --- */
  --color-volunteer:     oklch(0.58 0.18 290);
  --color-volunteer-bg:  oklch(0.97 0.03 290);
  --color-featured:      oklch(0.65 0.15 45);
  --color-featured-bg:   oklch(0.97 0.03 45);

  /* ============================================================
     TYPOGRAFIE
     ============================================================ */
  --font-sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --text-xs:   0.75rem;   /* 12px */
  --text-sm:   0.875rem;  /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-lg:   1.125rem;  /* 18px */
  --text-xl:   1.25rem;   /* 20px */
  --text-2xl:  1.5rem;    /* 24px */
  --text-3xl:  1.875rem;  /* 30px */

  --font-normal:   400;
  --font-medium:   500;
  --font-semibold: 600;
  --font-bold:     700;

  --leading-tight:  1.25;
  --leading-normal: 1.5;
  --leading-relaxed:1.625;

  /* ============================================================
     ABSTÄNDE
     ============================================================ */
  --space-1:   0.25rem;  /* 4px  */
  --space-2:   0.5rem;   /* 8px  */
  --space-3:   0.75rem;  /* 12px */
  --space-4:   1rem;     /* 16px */
  --space-5:   1.25rem;  /* 20px */
  --space-6:   1.5rem;   /* 24px */
  --space-8:   2rem;     /* 32px */
  --space-10:  2.5rem;   /* 40px */
  --space-12:  3rem;     /* 48px */
  --space-16:  4rem;     /* 64px */

  /* ============================================================
     RADIUS
     ============================================================ */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-full: 9999px;

  /* ============================================================
     SCHATTEN (Elevation via Shadow, nicht Border)
     ============================================================ */
  --shadow-sm:  0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md:  0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg:  0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-xl:  0 16px 40px rgba(0, 0, 0, 0.15);

  /* ============================================================
     ÜBERGÄNGE
     ============================================================ */
  --transition-fast:   150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow:   400ms ease;

  /* ============================================================
     LAYOUT
     ============================================================ */
  --max-width-content: 680px;
  --nav-height:        72px;
  --bottom-nav-height: 72px;
  --header-height:     56px;
}

/* ============================================================
   DARK MODE via [data-theme="dark"]
   ============================================================ */
[data-theme="dark"] {
  /* --- Primärfarbe dark --- */
  --color-primary:        #81C784;
  --color-primary-light:  #a5f3ca;
  --color-primary-dark:   #70c090;
  --color-primary-50:     #1a2e24;
  --color-primary-100:    #1e3a2c;
  --color-primary-fixed:  oklch(0.22 0.05 165);
  --color-surface:        #242420;

  /* --- Hintergrundfarben: dunkle Warm-Neutrals --- */
  --color-bg:            #1c1c17;
  --color-bg-card:       #242420;
  --color-bg-elevated:   #2a2a24;
  --color-bg-subtle:     #313128;

  /* --- Text --- */
  --color-text:          #e5e2da;
  --color-text-muted:    #bfc9c1;
  --color-text-faint:    #6f7a72;
  --color-text-inverse:  #1c1c17;

  /* --- Rand & Trennlinien --- */
  --color-border:        #3f4943;
  --color-border-light:  #2a2a24;

  /* --- Akzent --- */
  --color-accent:        oklch(0.70 0.15 45);
  --color-accent-bg:     oklch(0.25 0.05 45);

  /* --- Semantische Farben --- */
  --color-success:       oklch(0.65 0.14 145);
  --color-success-bg:    oklch(0.20 0.04 145);
  --color-warning:       oklch(0.75 0.15 60);
  --color-warning-bg:    oklch(0.22 0.05 60);
  --color-error:         oklch(0.65 0.20 25);
  --color-error-bg:      oklch(0.22 0.05 25);
  --color-info:          oklch(0.65 0.15 235);
  --color-info-bg:       oklch(0.20 0.05 235);

  /* --- Volunteer / Featured --- */
  --color-volunteer:     oklch(0.68 0.18 290);
  --color-volunteer-bg:  oklch(0.22 0.05 290);
  --color-featured:      oklch(0.70 0.15 45);
  --color-featured-bg:   oklch(0.22 0.05 45);

  /* --- Schatten dunkler --- */
  --shadow-sm:  0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-md:  0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg:  0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-xl:  0 16px 40px rgba(0, 0, 0, 0.55);
}

/* ============================================================
   MATERIAL SYMBOLS
   ============================================================ */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  user-select: none;
  pointer-events: none;
}
.material-symbols-outlined.filled {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Hide-scrollbar helper */
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ============================================================
   BASIS-RESET & GLOBALE STILE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  min-height: 100dvh;
  transition: background-color var(--transition-normal),
              color var(--transition-normal);
}

/* Fokus-Stile für Accessibility */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Bilder und Medien */
img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Links */
a {
  color: var(--color-primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Buttons Reset */
button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
}

/* Scrollbar (Webkit) */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-faint);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
