/* ===================================================================
   MATAWOW – Shared Styles (global)
   - Farb-Variablen Light/Dark
   - Basis Typo & Layout
   - Header (Topbar) + Darkmode-Schalter
   - Komponenten: Buttons, Inputs
   - Modals (Signup/AGB)
   - Footer (zentriert, mit Trennern)
   =================================================================== */

/* ---------------------- Farb-Variablen ---------------------------- */
:root{
  /* Oberfläche */
  --bg: #ffffff;
  --fg: #111827;         /* Slate-900 */
  --muted: #6b7280;      /* Slate-500 */
  --border: #e5e7eb;     /* Slate-200 */
  --card: #ffffff;

  /* Akzent & Brand */
  --accent: #2563eb;     /* Blue-600 */
  --accent-contrast: #ffffff;

  /* Header (bewusst immer dunkel) */
  --nav-bg: #0f172a;     /* Slate-900 */
  --nav-fg: #e5e7eb;
  --nav-muted: #a3aed0;

  /* Schatten */
  --shadow-1: 0 6px 20px rgba(0,0,0,.12);
  --shadow-2: 0 22px 60px rgba(0,0,0,.35);
}

:root[data-theme="dark"]{
  --bg: #0b1220;         /* sehr dunkles Blau */
  --fg: #e5e7eb;
  --muted: #9ca3af;
  --border: #1f2937;     /* Slate-800 */
  --card: #0e172a;       /* leicht vom BG abgesetzt */

  /* Header bleibt dunkel – Werte oben passen weiterhin */
}

/* ---------------------- Basis / Reset ----------------------------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
body{
  margin:0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a{ color: var(--accent); text-underline-offset: 2px; }
a:hover{ opacity:.9; }

.container{
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

/* Fokus klar sichtbar */
:where(a,button,input,select,textarea,[role="button"]):focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------------------- Header / Topbar --------------------------- */
.site-header{
  background: var(--nav-bg);
  color: var(--nav-fg);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.site-header__inner{
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}
.brand{
  font-weight: 900;
  letter-spacing:.4px;
  color: var(--nav-fg);
  text-decoration: none;
}
.brand:hover{ opacity:.85; }

.header-center{
  margin-left: auto;
  margin-right: auto;
  color: var(--nav-muted);
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: 12px;
  white-space: nowrap;
}

/* Rechts: Toggle + Auth-Button */
.header-right{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

/* Auth-Button (Login/Logout) */
.auth-btn{
  appearance:none;
  border:0;
  padding:8px 12px;
  border-radius: 999px;
  background: #0b1220;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  line-height: 1;
  border: 1px solid rgba(255,255,255,.12);
}
.auth-btn:hover{ opacity:.9; }

/* ---------------------- Physischer Darkmode-Schalter -------------- */
/* erwartete Struktur:
  <label class="mode-switch">
    <input id="themeToggle" type="checkbox">
    <span class="track"><span class="thumb"></span></span>
  </label>
*/
.mode-switch{
  display:inline-flex;
  align-items:center;
  cursor:pointer;
  user-select:none;
  -webkit-tap-highlight-color: transparent;
}
.mode-switch input{ display:none; }
.mode-switch .track{
  width: 44px; height: 24px;
  position: relative;
  border-radius: 999px;
  background: rgba(255,255,255,.24);
  border: 1px solid rgba(255,255,255,.18);
  transition: background .2s ease, border-color .2s ease;
}
.mode-switch .thumb{
  width: 18px; height: 18px;
  position: absolute; top: 2.5px; left: 2.5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.25);
  transition: transform .22s cubic-bezier(.2,.7,.2,1);
}
.mode-switch input:checked + .track{
  background: #1e293b; /* dunkler bei aktiv (Dark) */
}
.mode-switch input:checked + .track .thumb{
  transform: translateX(20px);
}

/* ---------------------- Buttons & Inputs -------------------------- */
.btn{
  appearance:none;
  border:1px solid var(--border);
  border-radius:12px;
  background:#111827;
  color:#fff;
  padding:12px 16px;
  font-weight:800;
  text-decoration:none;
  cursor:pointer;
}
.btn:hover{ opacity:.95; }
.btn.secondary{
  background: transparent;
  color: var(--fg);
}
.btn.ghost{
  background: transparent;
  border-color: var(--border);
  color: var(--fg);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="tel"],
select,
textarea{
  width:100%;
  padding:12px 14px;
  border:1px solid var(--border);
  border-radius:12px;
  background:#fff;
  color:#111827;
}
:root[data-theme="dark"] :is(input,select,textarea){
  background:#0b1220;
  color:#e5e7eb;
  border-color: var(--border);
}

/* Badges/Pills (z.B. "Sicherer Login") */
.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:14px;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.7);
}
:root[data-theme="dark"] .pill{ background:#0b1220; }

/* ---------------------- Modals (Signup / AGB) --------------------- */
.mw-backdrop{
  position:fixed; inset:0;
  background: rgba(17,24,39,.55);
  display:none;
  align-items:center; justify-content:center;
  padding:16px; z-index:60;
  opacity:0; transition:opacity .18s ease-out;
}
.mw-backdrop.show{ display:flex; opacity:1; }

.mw-modal{
  width:min(980px,96vw);
  max-height:90vh;
  overflow:auto;
  background: var(--card);
  border:1px solid var(--border);
  border-radius:22px;
  box-shadow: var(--shadow-2);
  transform: translateY(6px) scale(.992);
  transition: transform .22s ease-out;
}
.mw-backdrop.show .mw-modal{ transform: translateY(0) scale(1); }

.mw-modal header{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 18px;
  border-bottom:1px solid var(--border);
}
.mw-modal h2{ margin:0; font-size:18px; }

.mw-modal .content{ padding:16px; }

.mw-close{
  appearance:none; cursor:pointer;
  border:1px solid var(--border);
  background:transparent; color:var(--fg);
  border-radius:12px; padding:8px 12px;
}

/* Grid & Fields im Modal */
.mw-grid{ display:grid; gap:12px; grid-template-columns:1fr; }
.mw-grid.two{ grid-template-columns:1fr; }
@media (min-width:780px){
  .mw-grid.two{ grid-template-columns:1fr 1fr; }
}
.mw-field{ display:grid; gap:6px; }
.mw-label{ font-size:13px; color:var(--muted); }
.mw-input, .mw-select{ /* nur falls im HTML genutzt */
  width:100%; padding:12px 14px; border:1px solid var(--border);
  border-radius:12px; background:#fff; color:#111827;
}
:root[data-theme="dark"] :is(.mw-input,.mw-select){
  background:#0b1220; color:#e5e7eb;
}
.mw-row{ display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end; margin-top:6px; }
.mw-btn{
  appearance:none; border:1px solid #111827; background:#111827; color:#fff;
  padding:12px 16px; border-radius:12px; font-weight:700; cursor:pointer;
}
:root[data-theme="dark"] .mw-btn{ border-color:#374151; background:#111827; }

.mw-hint{ color:var(--muted); font-size:12px; margin-top:8px; }
.mw-ok{ color:#10b981; font-size:14px; display:none; margin-top:6px; }
.mw-err{ color:#ef4444; font-size:14px; display:none; margin-top:6px; }
.mw-check{ display:flex; gap:8px; align-items:flex-start; }
.mw-check input{ margin-top:3px; }

/* AGB/DSGVO Frame */
.mw-backdrop.mw-terms .mw-modal{ width:min(980px,96vw); }
.mw-terms-frame{ width:100%; height:60vh; border:0; border-radius:12px; background:var(--card); }
.mw-terms-note{ font-size:12px; color:var(--muted); margin-top:8px; }

/* ---------------------- Footer (zentriert, Trenner) --------------- */
/* ==== Footer: universeller Fix (zentriert + Trenner) ==== */
footer, .site-footer{
  border-top:1px solid var(--border);
  background:var(--bg);
  padding:20px 0 28px;
  text-align:center;                 /* alles zentrieren */
}

/* Links im Footer */
footer a, .site-footer a{
  color:var(--muted);
  text-decoration:none;
  font-weight:700;
  margin:0 .25rem;
}
footer a:hover, .site-footer a:hover{
  color:var(--fg);
  text-decoration:underline;
}

/* Trenner " | " automatisch zwischen Links – kein Trenner vor dem ersten */
footer a + a::before,
.site-footer a + a::before{
  content:"|";
  color:var(--muted);
  margin:0 .45rem 0 .25rem;
}

/* Copyright-Zeile (falls vorhanden) */
footer .copy, footer .foot-copy,
.site-footer .copy, .site-footer .foot-copy{
  display:block;
  margin-top:10px;
  color:var(--muted);
  font-size:12px;
}


