/* FindFPV public dark theme. Toggle sets data-theme on <html>. */
html[data-theme="dark"] { color-scheme: dark; }

html[data-theme="dark"] body {
  background: #121212;
  color: #e8e8e8;
}

html[data-theme="dark"] .text-dark,
html[data-theme="dark"] .text-black,
html[data-theme="dark"] .text-body { color: #e8e8e8 !important; }
html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .text-secondary { color: #a8a8a8 !important; }

html[data-theme="dark"] a:not(.btn):not(.nav-link):not(.dropdown-item):not(.badge) { color: #9ec1ff; }
html[data-theme="dark"] a:not(.btn):not(.nav-link):not(.dropdown-item):not(.badge):hover { color: #c5d9ff; }

html[data-theme="dark"] .bg-light,
html[data-theme="dark"] .bg-white,
html[data-theme="dark"] .card,
html[data-theme="dark"] .card-body,
html[data-theme="dark"] .card-header,
html[data-theme="dark"] .card-footer,
html[data-theme="dark"] .list-group-item,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .therow {
  background-color: #1c1c1c !important;
  color: #e8e8e8 !important;
  border-color: #333 !important;
}

html[data-theme="dark"] .navbar.navbar-light,
html[data-theme="dark"] .navbar.bg-light,
html[data-theme="dark"] .navbar {
  background-color: #161616 !important;
  border-color: #2a2a2a !important;
}
html[data-theme="dark"] .navbar .nav-link,
html[data-theme="dark"] .navbar .navbar-brand,
html[data-theme="dark"] .navbar .fpv-theme-btn,
html[data-theme="dark"] .navbar .navbar-toggler,
html[data-theme="dark"] .navbar .fa-bars { color: #f2f2f2 !important; }
html[data-theme="dark"] .navbar .dropdown-menu { background: #242424 !important; }
html[data-theme="dark"] .navbar .dropdown-item { color: #f2f2f2 !important; }
html[data-theme="dark"] .navbar .dropdown-item:hover,
html[data-theme="dark"] .navbar .dropdown-item:focus,
html[data-theme="dark"] .dropdown-item:hover,
html[data-theme="dark"] .dropdown-item:focus {
  background: #333 !important;
  color: #fff !important;
}
html[data-theme="dark"] .dropdown-divider { border-color: #3a3a3a; }

footer.bg-light {
  background: linear-gradient(180deg, #f7f7f8 0%, #e6e8ec 100%) !important;
  border-top: 3px solid #3d5a99;
  color: #2b2b2b;
}
footer h5 {
  letter-spacing: 0.06em;
  font-size: 0.85rem;
  padding-bottom: 0.4rem;
  margin-bottom: 0.8rem;
  border-bottom: 1px solid rgba(61, 90, 153, 0.35);
}
footer .list-unstyled li { margin: 0.28rem 0; }
footer .list-unstyled a { text-decoration: none; }
footer .list-unstyled a:hover { text-decoration: underline; }
footer .text-center.p-3 {
  background: #2c3344 !important;
  color: #e7ebf3 !important;
}
footer .text-center.p-3 a { color: #fff !important; }

html[data-theme="dark"] footer,
html[data-theme="dark"] footer.bg-light {
  background: linear-gradient(180deg, #242833 0%, #171a22 100%) !important;
  border-top: 3px solid #6d8fe0;
  color: #e8e8e8 !important;
}
html[data-theme="dark"] footer h5 {
  color: #f2f2f2;
  border-bottom-color: rgba(157, 184, 255, 0.35);
}
html[data-theme="dark"] footer a,
html[data-theme="dark"] footer .text-dark { color: #d7d7d7 !important; }
html[data-theme="dark"] footer a:hover { color: #fff !important; }
html[data-theme="dark"] footer .text-center.p-3 {
  background: #10131a !important;
  color: #c9d0de !important;
}

html[data-theme="dark"] .border,
html[data-theme="dark"] .border-bottom,
html[data-theme="dark"] .border-top,
html[data-theme="dark"] hr { border-color: #333 !important; }
html[data-theme="dark"] .shadow-sm,
html[data-theme="dark"] .hover-shadow { box-shadow: none !important; }

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .form-outline .form-control {
  background-color: #1a1a1a !important;
  color: #f2f2f2 !important;
  border-color: #3a3a3a !important;
}
html[data-theme="dark"] .form-control::placeholder { color: #8d8d8d; }
html[data-theme="dark"] .form-label,
html[data-theme="dark"] .form-outline .form-label { color: #c8c8c8 !important; }
html[data-theme="dark"] .form-outline .form-notch-leading,
html[data-theme="dark"] .form-outline .form-notch-middle,
html[data-theme="dark"] .form-outline .form-notch-trailing {
  border-color: #3a3a3a !important;
}
html[data-theme="dark"] .form-control:focus {
  border-color: #6d9bff !important;
  box-shadow: 0 0 0 0.15rem rgba(109, 155, 255, 0.25);
}

html[data-theme="dark"] .btn-light,
html[data-theme="dark"] .btn-outline-dark {
  background: #2a2a2a !important;
  color: #f2f2f2 !important;
  border-color: #444 !important;
}
html[data-theme="dark"] .btn-light:hover,
html[data-theme="dark"] .btn-outline-dark:hover { background: #363636 !important; color: #fff !important; }
html[data-theme="dark"] .btn-primary { color: #fff !important; }

html[data-theme="dark"] .table,
html[data-theme="dark"] .table td,
html[data-theme="dark"] .table th {
  color: #e8e8e8;
  border-color: #333;
}
html[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * { background: #1a1a1a; color: #e8e8e8; }

html[data-theme="dark"] .page-link {
  background: #1c1c1c;
  color: #d7d7d7;
  border-color: #333;
}
html[data-theme="dark"] .page-item.active .page-link { background: #3d5a99; border-color: #3d5a99; color: #fff; }

html[data-theme="dark"] .badge.bg-secondary { background: #3a3a3a !important; color: #eee !important; }
html[data-theme="dark"] .alert { background: #1c1c1c; color: #e8e8e8; border-color: #333; }
html[data-theme="dark"] .modal-header .btn-close { filter: invert(1); }

.fpv-theme-btn { background: transparent; border: 0; cursor: pointer; }

.fpv-mega-menu {
  border: 0;
  border-top: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 .5rem 1.2rem rgba(0,0,0,.08);
  padding: .25rem 0 1rem;
  left: 0;
  right: 0;
}
.fpv-mega.position-static { position: static; }
.fpv-mega-menu .fpv-mega-col h6 {
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #6c757d;
  margin: 0 0 .45rem;
}
.fpv-mega-menu a.fpv-catlink {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .35rem .4rem;
  border-radius: .35rem;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.fpv-mega-menu a.fpv-catlink:hover { background: rgba(18,102,241,.08); }
.fpv-mega-menu a.fpv-catlink img { width: 18px; height: 18px; object-fit: contain; flex: 0 0 18px; }
html[data-theme="dark"] .fpv-mega-menu {
  background: #1c1c1c !important;
  border-top-color: #333;
  box-shadow: 0 .5rem 1.2rem rgba(0,0,0,.35);
}
html[data-theme="dark"] .fpv-mega-menu .fpv-mega-col h6 { color: #a8a8a8; }
html[data-theme="dark"] .fpv-mega-menu a.fpv-catlink { color: #e8e8e8 !important; }
html[data-theme="dark"] .fpv-mega-menu a.fpv-catlink:hover { background: rgba(255,255,255,.06); }

body.fpv-search-lock { overflow: hidden; }
#fpvSearchOverlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(12, 16, 24, 0.55);
  padding: 12vh 1rem 2rem;
}
#fpvSearchOverlay.is-open { display: block; }
.fpv-search-panel {
  max-width: 640px;
  margin: 0 auto;
  background: #fff;
  border-radius: .6rem;
  box-shadow: 0 1rem 2.4rem rgba(0,0,0,.2);
  padding: 1rem;
}
.fpv-search-hint { color: #6c757d; font-size: .8rem; margin: .45rem 0 .2rem; }
.fpv-search-list { max-height: 50vh; overflow: auto; }
.fpv-search-item {
  display: block;
  padding: .55rem .4rem;
  color: #222;
  text-decoration: none;
  border-top: 1px solid #eee;
}
.fpv-search-item:hover { background: #f3f6fb; }
html[data-theme="dark"] .fpv-search-panel { background: #1c1c1c; color: #eee; }
html[data-theme="dark"] .fpv-search-item { color: #eee; border-top-color: #333; }
html[data-theme="dark"] .fpv-search-item:hover { background: #2a2a2a; }
html[data-theme="dark"] .fpv-search-hint { color: #aaa; }

footer .text-center.p-3,
footer .text-center.p-3 a,
footer .text-center.p-3 a small,
footer .text-center.p-3 .text-dark,
footer .text-center.p-3 .text-muted,
html[data-theme="dark"] footer .text-center.p-3,
html[data-theme="dark"] footer .text-center.p-3 a,
html[data-theme="dark"] footer .text-center.p-3 a small,
html[data-theme="dark"] footer .text-center.p-3 .text-muted {
  color: #ffffff !important;
}
footer .text-center.p-3 a small,
html[data-theme="dark"] footer .text-center.p-3 a small {
  color: #d5e2ff !important;
}
#fpvSearchOverlay { display: none !important; position: fixed; inset: 0; }
#fpvSearchOverlay.is-open { display: block !important; }
