/* Universal Theme Styles for Ystra Website */
/* Include this CSS file in all pages for consistent theming */

/* Base theme variables - Light Mode (Default) */
:root {
  --backgroundcolor: #ffffff;
  --Goud: #c5b673;
  --scroll: #cccccc;
  --scrollhover: #c5b673;
  --Rood: #CC231E;
  --Groen: #34A65F;
  --Donkergroen: #0F8A5F;
  --tekstkleur: #222222;
  
  /* Additional variables for better theming */
  --card-background: #f8f8f8;
  --border-color: #e0e0e0;
  --input-background: #ffffff;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --hover-shadow: rgba(197, 182, 115, 0.3);
}

/* Dark mode variables */
:root.dark-mode {
  --backgroundcolor: #222222;
  --tekstkleur: white;
  --scroll: #3b3b3b;
  --scrollhover: #c5b6735d;
  --Goud: #c5b673;
  --Rood: #CC231E;
  --Groen: #34A65F;
  --Donkergroen: #0F8A5F;
  
  /* Dark mode specific variables */
  --card-background: #333333;
  --border-color: #444444;
  --input-background: #2a2a2a;
  --shadow-color: rgba(0, 0, 0, 0.3);
  --hover-shadow: rgba(197, 182, 115, 0.4);
}

/* Universal smooth transitions for theme switching */
*,
*::before,
*::after {
  transition: background-color 0.3s ease, 
              color 0.3s ease, 
              border-color 0.3s ease, 
              box-shadow 0.3s ease !important;
}

/* Prevent transition on page load */
.no-transition * {
  transition: none !important;
}

/* Theme toggle button styles */
.theme-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--Goud);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px var(--shadow-color);
  z-index: 1000;
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 15px var(--hover-shadow);
}

.theme-toggle:focus {
  outline: 2px solid var(--Goud);
  outline-offset: 2px;
}

.theme-icon {
  transition: transform 0.3s ease;
  line-height: 1;
}

/* Universal light mode adjustments */
:root.light-mode .theme-toggle {
  box-shadow: 0 2px 10px var(--shadow-color);
}

:root.light-mode .theme-toggle:hover {
  box-shadow: 0 4px 15px var(--hover-shadow);
}

/* Common element theming */
:root.light-mode input,
:root.light-mode textarea,
:root.light-mode select {
  background-color: var(--input-background);
  border: 2px solid var(--border-color);
  color: var(--tekstkleur);
}

:root.light-mode input:focus,
:root.light-mode textarea:focus,
:root.light-mode select:focus {
  border-color: var(--Goud);
  outline: none;
}

/* Card and container theming */
:root.light-mode .card,
:root.light-mode .container,
:root.light-mode .box {
  background-color: var(--card-background);
  border-color: var(--border-color);
}

/* Button theming */
:root.light-mode button,
:root.light-mode .btn {
  background-color: var(--Goud);
  color: white;
  border-color: var(--Goud);
}

:root.light-mode button:hover,
:root.light-mode .btn:hover {
  background-color: var(--tekstkleur);
  color: var(--Goud);
}

/* Link theming */
:root.light-mode a {
  color: var(--tekstkleur);
}

:root.light-mode a:hover {
  color: var(--Goud);
}

/* Shadow adjustments for light mode */
:root.light-mode *[class*="shadow"],
:root.light-mode .box:hover,
:root.light-mode .card:hover {
  box-shadow: 0 8px 25px var(--shadow-color) !important;
}

/* Scrollbar theming */
::-webkit-scrollbar {
  height: 7px;
  width: 7px;
}

::-webkit-scrollbar-thumb {
  background-color: var(--scroll);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollhover);
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
  
  .theme-toggle:hover {
    transform: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border-color: #666666;
  }
  
  :root.light-mode {
    --border-color: #333333;
  }
}

/* Print styles - always use light theme for printing */
@media print {
  :root {
    --backgroundcolor: #ffffff !important;
    --tekstkleur: #000000 !important;
    --Goud: #666666 !important;
  }
  
  .theme-toggle {
    display: none !important;
  }
}

/* Explicit light (default) text color safeguard */
html:not(.dark-mode), html:not(.dark-mode) body, html:not(.dark-mode) h1, html:not(.dark-mode) h2, html:not(.dark-mode) h3, html:not(.dark-mode) p, html:not(.dark-mode) span, html:not(.dark-mode) li, html:not(.dark-mode) td, html:not(.dark-mode) th {
  color: var(--tekstkleur);
}
