/* ============================================
   Dark Mode Overrides — Ron van Empel
   Selector: html[data-theme="dark"]

   Specificity fix: selectors mirror the nesting
   path from master.scss (html body #site ...)
   so dark overrides always win.
   ============================================ */

/* --- Transition bij thema-wissel --- */
.theme-transition,
.theme-transition *,
.theme-transition *::before,
.theme-transition *::after {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease !important;
}

/* --- Body / pagina achtergrond --- */
html[data-theme="dark"] body {
  background-color: #0e0e0e;
  color: #e0e0e0;
}

/* --- Header --- */
html[data-theme="dark"] body #site header {
  background-color: #000;
}

/* --- Header: menu / navwrap --- */
html[data-theme="dark"] body #site header .menu .navwrap {
  background-color: #000;
  background-image: none;
}

/* --- Mobiel menu achtergrond --- */
html[data-theme="dark"] body #site header .menu .navwrap .navbar .navbar-collapse {
  background-color: #000 !important;
}

/* --- Hamburger lijntjes → wit --- */
html[data-theme="dark"] body #site header .menu .navwrap .navbar .hamburger .hamburger-inner,
html[data-theme="dark"] body #site header .menu .navwrap .navbar .hamburger .hamburger-inner::before,
html[data-theme="dark"] body #site header .menu .navwrap .navbar .hamburger .hamburger-inner::after {
  background-color: #fff;
}

/* --- Nav links in dark mode --- */
html[data-theme="dark"] body #site header .menu .navwrap .navbar .navbar-nav .nav-item .nav-link {
  color: #e0e0e0;
}
html[data-theme="dark"] body #site header .menu .navwrap .navbar .navbar-nav .nav-item .nav-link:hover,
html[data-theme="dark"] body #site header .menu .navwrap .navbar .navbar-nav .nav-item .nav-link.active {
  color: #fcbc0f;
}

/* --- CTA knop in navbar --- */
html[data-theme="dark"] body #site header .menu .navwrap .navbar a.knop {
  /* inherits dark styling from navbar context */
}

/* --- Afspraak bar --- */
html[data-theme="dark"] body #site header .menu .afspraak {
  background-color: #000;
}

/* --- Logo --- */
html[data-theme="dark"] body #site header .menu #logo img {
  filter: brightness(1.1);
}

/* --- Breadcrumb --- */
html[data-theme="dark"] body #site .breadcrumb a {
  color: #e0e0e0;
}
html[data-theme="dark"] body #site .breadcrumb a:hover {
  color: #fcbc0f;
}
html[data-theme="dark"] body #site .breadcrumb a ~ a {
  filter: brightness(3);
}

/* --- #content --- */
html[data-theme="dark"] body #site #content {
  background-color: #0e0e0e;
}

/* --- Content tekst --- */
html[data-theme="dark"] body #site #content .content div.tekst h1,
html[data-theme="dark"] body #site #content .content div.tekst h3 {
  color: #f0f0f0;
}
html[data-theme="dark"] body #site #content .content div.tekst p,
html[data-theme="dark"] body #site #content .content div.tekst ul {
  color: #e0e0e0;
}
html[data-theme="dark"] body #site #content .content div.tekst div.item ~ div.item {
  border-top-color: #3a3a5c;
}

/* --- Sidebar --- */
html[data-theme="dark"] body #site #content .sidebar .dropdown .dropdown-toggle {
  color: #e0e0e0;
  border-bottom-color: #3a3a5c;
}
html[data-theme="dark"] body #site #content .sidebar .dropdown .dropdown-menu {
  background-color: #0e0e0e;
  box-shadow: 0px 3px 16px rgba(0, 0, 0, 0.4);
}
html[data-theme="dark"] body #site #content .sidebar .dropdown .dropdown-menu .dropdown-item {
  color: #e0e0e0;
}
html[data-theme="dark"] body #site #content .sidebar .dropdown .dropdown-menu .dropdown-item:hover,
html[data-theme="dark"] body #site #content .sidebar .dropdown .dropdown-menu .dropdown-item.active {
  color: #fcbc0f;
  background: none;
}
html[data-theme="dark"] body #site #content .sidebar .dropdown .dropdown-menu .dropdown-item ~ .dropdown-item {
  border-top-color: #3a3a5c;
}

/* --- Introtekst --- */
html[data-theme="dark"] body #site .introtekst {
  background-color: #0e0e0e;
}
html[data-theme="dark"] body #site .introtekst.grey {
  background-color: #000;
}
html[data-theme="dark"] body #site .introtekst .tekst h1 {
  color: #f0f0f0;
}
html[data-theme="dark"] body #site .introtekst .tekst p,
html[data-theme="dark"] body #site .introtekst .tekst ul {
  color: #e0e0e0;
}

/* --- Introtekst-half --- */
html[data-theme="dark"] body #site .introtekst-half {
  background-color: #000;
}
html[data-theme="dark"] body #site .introtekst-half .row .tekst h1 {
  color: #f0f0f0;
}
html[data-theme="dark"] body #site .introtekst-half .row .tekst p,
html[data-theme="dark"] body #site .introtekst-half .row .tekst ul {
  color: #e0e0e0;
}

/* --- Grey-blok --- */
html[data-theme="dark"] body #site .grey-blok .grey {
  background-color: #000;
}
html[data-theme="dark"] body #site .grey-blok .grey .row .tekst h3 {
  color: #f0f0f0;
}
html[data-theme="dark"] body #site .grey-blok .grey .row .tekst p {
  color: #e0e0e0;
}

/* --- White-blok --- */
html[data-theme="dark"] body #site .white-blok .grey .row .tekst h3 {
  color: #f0f0f0;
}
html[data-theme="dark"] body #site .white-blok .grey .row .tekst p {
  color: #e0e0e0;
}

/* --- Over-teaser --- */
html[data-theme="dark"] body #site .over-teaser {
  background-color: #000;
}
html[data-theme="dark"] body #site .over-teaser .row .image {
  background-color: #000;
}
html[data-theme="dark"] body #site .over-teaser .row .tekst h3 {
  color: #f0f0f0;
}
html[data-theme="dark"] body #site .over-teaser .row .tekst p {
  color: #e0e0e0;
}
html[data-theme="dark"] body #site .over-teaser .row .tekst ul li strong {
  color: #e0e0e0;
}

/* --- Contactopties --- */
html[data-theme="dark"] body #site .contactopties {
  background-color: #000;
}
html[data-theme="dark"] body #site .contactopties .col-12 p {
  color: #e0e0e0;
}
html[data-theme="dark"] body #site .contactopties .col-12 p span {
  color: #4a90d9;
}
html[data-theme="dark"] body #site .contactopties .col-12 p span a {
  color: #4a90d9;
}
html[data-theme="dark"] body #site .contactopties .col-12 .icon {
  color: #4a90d9;
}

/* --- Contactform --- */
html[data-theme="dark"] body #site .contactform .tekst h1 {
  color: #f0f0f0;
}
html[data-theme="dark"] body #site .contactform .tekst p {
  color: #e0e0e0;
}
html[data-theme="dark"] body #site .contactform .row .form p {
  color: #e0e0e0;
}
html[data-theme="dark"] body #site .contactform .row .form form input[type="text"],
html[data-theme="dark"] body #site .contactform .row .form form input[type="email"],
html[data-theme="dark"] body #site .contactform .row .form form textarea {
  background-color: #fff;
  color: #333;
  border-color: #3a3a5c;
}
html[data-theme="dark"] body #site .contactform .row .form form ::-webkit-input-placeholder {
  color: #a0a0a0;
}
html[data-theme="dark"] body #site .contactform .row .form form :-ms-input-placeholder {
  color: #a0a0a0;
}
html[data-theme="dark"] body #site .contactform .row .form form ::placeholder {
  color: #a0a0a0;
}

/* --- Team --- */
html[data-theme="dark"] body #site .team h3 {
  color: #f0f0f0;
}
html[data-theme="dark"] body #site .team .row .team-lid .info .naam {
  color: #e0e0e0;
}
html[data-theme="dark"] body #site .team .row .team-lid .info .functie {
  color: #4a90d9;
}

/* --- Diensten --- */
html[data-theme="dark"] body #site .diensten a .cap h4 {
  color: #f0f0f0;
}
html[data-theme="dark"] body #site .diensten a .cap p {
  color: #e0e0e0;
}
html[data-theme="dark"] body #site .diensten a .cap span {
  color: #4a90d9;
}
html[data-theme="dark"] body #site .diensten a:hover .cap span {
  color: #fcbc0f;
}

/* --- Vacature-blok --- */
html[data-theme="dark"] body #site .vacature-blok .tekst h2 {
  color: #f0f0f0;
}
html[data-theme="dark"] body #site .vacature-blok .tekst p {
  color: #e0e0e0;
}

/* --- Assortiment --- */
html[data-theme="dark"] body #site .assortiment .top h3 {
  color: #f0f0f0;
}
html[data-theme="dark"] body #site .assortiment .top p {
  color: #e0e0e0;
}
html[data-theme="dark"] body #site .assortiment .selector dl dt,
html[data-theme="dark"] body #site .assortiment .selector dl dd {
  color: #e0e0e0;
}
html[data-theme="dark"] body #site .assortiment .selector p {
  color: #e0e0e0;
}
html[data-theme="dark"] body #site .assortiment .selector ul li b,
html[data-theme="dark"] body #site .assortiment .selector ul li a {
  color: #e0e0e0;
}
html[data-theme="dark"] body #site .assortiment .selector ul li a:hover {
  color: #fcbc0f;
}
html[data-theme="dark"] body #site .assortiment .selector .resultaten .velg figure {
  border-bottom-color: #3a3a5c;
}
html[data-theme="dark"] body #site .assortiment .selector .resultaten .velg .specs dl dt,
html[data-theme="dark"] body #site .assortiment .selector .resultaten .velg .specs dl dd {
  color: #e0e0e0;
}
html[data-theme="dark"] body #site .assortiment .selector .resultaten .velg .specs a {
  color: #e0e0e0;
}
html[data-theme="dark"] body #site .assortiment .selector .resultaten .velg .specs a:hover {
  color: #fcbc0f;
}

/* --- Select elementen --- */
html[data-theme="dark"] body #site .assortiment .selector form .select select {
  background-color: #0f3460;
  color: #e0e0e0;
  border-color: #3a3a5c;
}
html[data-theme="dark"] body #site .assortiment .selector form .select::after {
  color: #e0e0e0;
}

/* --- APKs --- */
html[data-theme="dark"] body #site .apks h2 {
  color: #f0f0f0;
}
html[data-theme="dark"] body #site .apks .apk .inner .knop {
  background-color: #0e0e0e;
  color: #e0e0e0;
}

/* --- APK modal --- */
html[data-theme="dark"] body #site .apks #apkmodal .modal-content {
  background-color: #0e0e0e;
}
html[data-theme="dark"] body #site .apks #apkmodal .modal-body h2 {
  color: #f0f0f0;
}
html[data-theme="dark"] body #site .apks #apkmodal .modal-body p {
  color: #e0e0e0;
}
html[data-theme="dark"] body #site .apks #apkmodal .modal-body ul li {
  color: #e0e0e0;
}

/* --- #apk sectie tekst --- */
html[data-theme="dark"] body #site #apk .tekst h3 {
  color: #f0f0f0;
}
html[data-theme="dark"] body #site #apk .tekst p {
  color: #e0e0e0;
}
html[data-theme="dark"] body #site #apk .tekst ul li span,
html[data-theme="dark"] body #site #apk .tekst ul li strong {
  color: #e0e0e0;
}

/* --- Bootstrap modal-content (buiten #site) --- */
html[data-theme="dark"] .modal-content {
  background-color: #0e0e0e;
  border-color: #3a3a5c;
}
html[data-theme="dark"] .modal-header {
  border-bottom-color: #3a3a5c;
}
html[data-theme="dark"] .modal-header .close {
  color: #e0e0e0;
  text-shadow: none;
}

/* --- Footer .footbottom --- */
html[data-theme="dark"] body #site footer .footbottom {
  background-color: #0e0e0e;
}
html[data-theme="dark"] body #site footer .footbottom p {
  color: #e0e0e0;
}
html[data-theme="dark"] body #site footer .footbottom a {
  color: #e0e0e0;
}
html[data-theme="dark"] body #site footer .footbottom a:hover {
  color: #fcbc0f;
}

/* ============================================
   Theme Toggle Knop
   ============================================ */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
  vertical-align: middle;
  margin-left: 15px;
}
.theme-toggle:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: #fff;
}
.theme-toggle:focus {
  outline: 2px solid #fcbc0f;
  outline-offset: 2px;
}

/* Icoon tonen op basis van thema */
.theme-toggle .fa-moon {
  display: none;
}
.theme-toggle .fa-sun {
  display: inline-block;
}

html[data-theme="dark"] .theme-toggle .fa-moon {
  display: inline-block;
}
html[data-theme="dark"] .theme-toggle .fa-sun {
  display: none;
}

/* --- Navbar toggle (naast hamburger, alleen mobiel) --- */
.theme-toggle-navbar {
  display: none;
}
@media (max-width: 991px) {
  .theme-toggle-navbar {
    display: inline-flex;
    width: 34px;
    height: 34px;
    font-size: 1.4rem;
    margin-left: 10px;
    margin-top: 35px;
    border-color: rgba(1, 50, 117, 0.5);
    color: #013275;
  }
  .theme-toggle-navbar:hover {
    background-color: rgba(1, 50, 117, 0.1);
    border-color: #013275;
  }
  html[data-theme="dark"] .theme-toggle-navbar {
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
  }
  html[data-theme="dark"] .theme-toggle-navbar:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: #fff;
  }
}
