/* public/global.css */

/* ==========================================
   1. Theme-Variablen & Farbschemata
   ========================================== */

/* Standard (Light Mode) */
:root {
  --bg-color: #f4f4f4;
  --text-color: #1a1a1a;
  --primary-color: #fbb32b;
  --card-bg: #fff;
  --border-color: #eaeaea;
}

/* Automatischer Dark Mode (Systemeinstellung) */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #121212;
    --text-color: #f5f5f5;
    --primary-color: #eaa21b;
    --card-bg: #1e1e1e;
    --border-color: #333333;
  }
}

/* Manueller Dark Mode (per data-theme Attribut) */
[data-theme="dark"] {
  --bg-color: #121212;
  --text-color: #f5f5f5;
  --primary-color: #eaa21b;
  --card-bg: #1e1e1e;
  --border-color: #333333;
}

/* ==========================================
   2. Globaler Reset & Basis-Styles
   ========================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  padding: 16px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Zentrales Responsive Padding für den Body */
@media (min-width: 768px) {
  body {
    padding: 32px;
  }
}

/* Layout Utilities */
.container {
  width: 100%;
  margin: auto;
}

button, .button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  border-radius: 8px;
  padding: 12px 16px;
  cursor: pointer;
  font-size: 1rem;
  background: var(--border-color);
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

button.primary, .button.primary {
  background: var(--primary-color);
  color: white; /* Text auf farbigen Buttons bleibt weiß */
}


/* ==========================================
   3. Globale Typografie (Überschriften)
   ========================================== */

h1 {
  font-size: 2rem;
  font-weight: bold;
}

h2 {
  font-size: 1.4rem;
  font-weight: bold;
}

h3 {
  font-size: 1.15rem;
  font-weight: bold;
}

a {
  text-decoration: none;
}

/* ==========================================
   4. Globale Formular-Komponenten
   ========================================== */

label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-color);
  opacity: 0.7;
}

input {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-color);
  color: var(--text-color);
  font-size: 1rem;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-group {
  margin-bottom: 14px;
}

/* ==========================================
   5. Globale Overlays (Modals & Dialoge)
   ========================================== */

dialog, .modal {
  margin: auto;
  border: none;
  border-radius: 12px;
  background: var(--card-bg);
  color: var(--text-color);
  padding: 24px;
  max-width: 420px;
  width: calc(100% - 2rem);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  transition: background-color 0.3s ease, color 0.3s ease;
}

dialog::backdrop, .modal::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

svg {
  flex-shrink: 0;
}