/* Adroit Theme Mode base layer */
html[data-theme="dark"] {
  color-scheme: dark;
  background-color: #0f1217;
  --adroit-tm-bg: #0f1217;
  --adroit-tm-surface: #171b22;
  --adroit-tm-text: #e7e9ee;
  --adroit-tm-muted: #a4abb8;
  --adroit-tm-border: #2b313b;
  --adroit-tm-brand: #ef7b7b;
  /* Elementor globals */
  --e-global-color-primary: #f1f2f5;
  --e-global-color-text: #e7e9ee;
  /* Tutor LMS tokens */
  --tutor-body-color: #e7e9ee;
  --tutor-color-secondary: #c9ced8;
  --tutor-color-subdued: #a4abb8;
  --tutor-color-muted: #98a0ae;
  --tutor-color-hints: #98a0ae;
  --tutor-color-gray: #3a414d;
  --tutor-color-gray-10: #1d222a;
  --tutor-color-gray-rgb: 58, 65, 77;
  --tutor-border-color: #2b313b;
  /* WordPress presets */
  --wp--preset--color--black: #f1f2f5;
  --wp--preset--color--white: #0f1217;
}
html[data-theme="light"] { color-scheme: light; }
html[data-theme="dark"] body { background-color: #0f1217; color: #e7e9ee; }

/* links that would vanish */
html[data-theme="dark"] a:not([class]) { color: #f29a9a; }

/* black line-art logos flip to white, red stays red */
html[data-theme="dark"] .custom-logo,
html[data-theme="dark"] .elementor-widget-theme-site-logo img,
html[data-theme="dark"] img[src*="adroit" i][src*="logo" i]:not(.adroit-tm-keep) {
  filter: invert(1) hue-rotate(180deg) brightness(1.08) !important;
}
/* opt-in white plate for images that should not flip */
html[data-theme="dark"] img.adroit-tm-plate,
html[data-theme="dark"] .adroit-tm-plate img {
  background-color: #ffffff;
  border-radius: 10px;
  padding: 4px 8px;
  box-sizing: content-box;
}

/* media stays true to colour, a touch softer at night */
html[data-theme="dark"] img:not(.custom-logo):not(.adroit-tm-plate):not([src*="adroit" i][src*="logo" i]),
html[data-theme="dark"] video { filter: brightness(.92); }
html[data-theme="dark"] .adroit-tm-noflt img,
html[data-theme="dark"] img.adroit-tm-noflt { filter: none; }

/* form fields */
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="range"]),
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
  border-color: #353c48;
}
html[data-theme="dark"] ::placeholder { color: #7f8796; opacity: 1; }

html.adroit-tm-switching,
html.adroit-tm-switching *,
html.adroit-tm-switching *::before,
html.adroit-tm-switching *::after {
  transition: background-color .25s ease, color .25s ease, border-color .25s ease !important;
}

html.adroit-tm-notrans *,
html.adroit-tm-notrans *::before,
html.adroit-tm-notrans *::after { transition: none !important; }

/* ---------- switch ---------- */
.adroit-tm-switch {
  display: inline-flex !important;
  gap: 2px !important;
  padding: 3px !important;
  border-radius: 999px !important;
  background: #f1f1f3 !important;
  border: 1px solid #e1e1e6 !important;
  font: 500 13px/1 Roboto, system-ui, sans-serif !important;
}
.adroit-tm-opt {
  all: unset;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 7px 11px !important;
  border-radius: 999px !important;
  cursor: pointer !important;
  color: #4a4f59 !important;
  white-space: nowrap !important;
}
.adroit-tm-opt svg { width: 16px !important; height: 16px !important; fill: none !important; stroke: currentColor !important; stroke-width: 1.8 !important; stroke-linecap: round !important; stroke-linejoin: round !important; }
.adroit-tm-opt[data-mode="dark"] svg { fill: currentColor !important; stroke: none !important; }
.adroit-tm-opt:hover { color: #830606 !important; }
.adroit-tm-opt.is-active { background: #830606 !important; color: #ffffff !important; }
.adroit-tm-opt:focus-visible { outline: 2px solid #830606 !important; outline-offset: 2px !important; }

html[data-theme="dark"] .adroit-tm-switch { background: #1d222a !important; border-color: #2f3540 !important; }
html[data-theme="dark"] .adroit-tm-opt { color: #c3c8d2 !important; }
html[data-theme="dark"] .adroit-tm-opt:hover { color: #ffffff !important; }
html[data-theme="dark"] .adroit-tm-opt.is-active { background: #a31515 !important; color: #ffffff !important; }

.adroit-tm-fab {
  position: fixed !important;
  bottom: 18px !important;
  z-index: 99990 !important;
}
.adroit-tm-fab.adroit-tm-pos-left { left: 18px !important; }
.adroit-tm-fab.adroit-tm-pos-right { right: 18px !important; }
.adroit-tm-fab-btn {
  all: unset;
  box-sizing: border-box !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  display: grid !important;
  place-items: center !important;
  cursor: pointer !important;
  background: #ffffff !important;
  color: #830606 !important;
  border: 1px solid #e3e3e8 !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .14) !important;
}
.adroit-tm-fab-btn svg { width: 20px !important; height: 20px !important; fill: none !important; stroke: currentColor !important; stroke-width: 1.8 !important; stroke-linecap: round !important; stroke-linejoin: round !important; }
html[data-theme="dark"] .adroit-tm-fab-btn svg path:only-child { fill: currentColor !important; stroke: none !important; }
html[data-theme="dark"] .adroit-tm-fab-btn { background: #1d222a !important; color: #f3b0b0 !important; border-color: #333a46 !important; box-shadow: 0 6px 18px rgba(0, 0, 0, .5) !important; }
.adroit-tm-fab-btn:focus-visible { outline: 2px solid #830606 !important; outline-offset: 3px !important; }
.adroit-tm-menu {
  position: absolute !important;
  bottom: 54px !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .18) !important;
  background: #ffffff !important;
}
.adroit-tm-pos-left .adroit-tm-menu { left: 0 !important; }
.adroit-tm-pos-right .adroit-tm-menu { right: 0 !important; }
.adroit-tm-menu[hidden] { display: none !important; }
html[data-theme="dark"] .adroit-tm-menu { background: #1d222a !important; box-shadow: 0 10px 28px rgba(0, 0, 0, .55) !important; }
@media print { .adroit-tm-fab { display: none !important; } }
