/**
 * Theme CSS Variables and Styling
 * Light/dark mode variables and cross-theme interactions
 */

:root {
  /* Light theme colors */
  --bg: #EEEEEE;
  --fg: #5E1C61;
  --accent: #5E1C61;
  --secondary: #C6A282;
  --surface: #ffffff;
  --surface-border: rgba(94, 28, 97, 0.2);
  --muted: rgba(94, 28, 97, 0.8);
  --shadow: 0 10px 28px rgba(94, 28, 97, 0.08);
  
  /* Transitions */
  --transition-fast: 0.15s ease-in-out;
  --transition-normal: 0.3s ease-in-out;
  --transition-slow: 0.5s ease-in-out;
}

[data-theme="dark"] {
  /* Dark theme colors */
  --bg: #210F37;
  --fg: #C6A282;
  --accent: #C6A282;
  --secondary: #5E1C61;
  --surface: #2a1645;
  --surface-border: rgba(198, 162, 130, 0.25);
  --muted: rgba(198, 162, 130, 0.82);
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--fg);
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Toggle controls styling */
.toggle-controls {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  display: flex;
  gap: 0.5rem;
  z-index: 1000;
}

.toggle-btn {
  align-items: center;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 0;
  box-shadow: none;
  clip-path: none;
  color: var(--bg);
  cursor: pointer;
  display: flex;
  gap: 0.7rem;
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 900;
  height: auto;
  justify-content: space-between;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  padding: 0.72rem 1.1rem;
  position: relative;
  text-align: left;
  transition: background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
  width: auto;
}

.toggle-btn::before {
  content: none;
}

.toggle-btn:hover {
  background: transparent;
  box-shadow: none;
  color: var(--accent);
  transform: translateY(-1px);
}

.toggle-btn:active {
  background: var(--bg);
  color: var(--accent);
  transform: translateY(0);
}

.toggle-btn:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.theme-icon {
  background: none;
  clip-path: none;
  color: inherit;
  display: block;
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  inset: auto;
  letter-spacing: 0.05em;
  line-height: 1;
  position: static;
  transition: none;
  z-index: auto;
}

.toggle-prefix {
  font-family: inherit;
  font-size: inherit;
  letter-spacing: 0.01em;
  position: static;
  writing-mode: horizontal-tb;
  z-index: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .toggle-controls {
    top: 0.75rem;
    right: 0.75rem;
  }
  
  .toggle-btn {
    padding: 0.65rem 0.85rem;
  }
}
