/* Railroaded — Light theme overrides & toggle button */

/* --- Light theme color scheme --- */
[data-theme="light"] {
  --bg-dark: #f5f0e8;
  --bg-card: #ffffff;
  --bg-card-hover: #f0ebe0;
  --bg-event: #faf7f2;
  --gold: #8a6d1b;
  --gold-light: #7a6015;
  --gold-dim: #7a6318;
  --text: #2c2520;
  --text-dim: #5a5250;
  --text-bright: #1a1510;
  --red: #9b2020;
  --red-glow: #c43c3c;
  --red-bright: #d04545;
  --green: #1f6b35;
  --green-light: #2d8c3f;
  --blue: #2a5580;
  --blue-light: #3070a5;
  --purple: #5a3090;
  --purple-light: #7040b0;
  --border: #d4cfc5;
  --border-gold: #c4aa60;
}

/* Nav background — hardcoded rgba in each page, override here */
[data-theme="light"] nav {
  background: rgba(245, 240, 232, 0.95);
}

/* Mobile nav dropdown override */
@media (max-width: 768px) {
  [data-theme="light"] nav .links {
    background: rgba(245, 240, 232, 0.98);
  }
}

/* Combat init entry uses hardcoded rgba(0,0,0,0.3) */
[data-theme="light"] .ev-combat-start .init-entry {
  background: rgba(0, 0, 0, 0.06);
}

/* --- Theme toggle button --- */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0.3rem 0.5rem;
  line-height: 1;
  transition: border-color 0.3s;
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--gold-dim);
}

/* --- Audio toggle button --- */
.audio-toggle {
  position: relative;
  flex-shrink: 0;
}
.audio-toggle-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0.3rem 0.5rem;
  line-height: 1;
  transition: border-color 0.3s;
}
.audio-toggle-btn:hover {
  border-color: var(--gold-dim);
}
.audio-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  min-width: 140px;
  z-index: 200;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.audio-dropdown.open { display: block; }
.audio-dropdown-label {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}
.audio-slider {
  width: 100%;
  accent-color: var(--gold);
  cursor: pointer;
}

/* Date inputs in light mode */
[data-theme="light"] input[type="date"] {
  color-scheme: light;
}

/* Mobile touch targets */
@media (max-width: 600px) {
  footer a {
    display: inline-block;
    padding: 0.4rem 0.2rem;
    min-height: 44px;
    line-height: 2;
  }
  .theme-toggle {
    min-width: 44px;
    min-height: 44px;
  }
}

/* Smooth color transitions on toggle */
body {
  transition: background-color 0.3s ease, color 0.3s ease;
}
nav {
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
