/* BH Theme Toggle — segmented Dark/White switch + dark-mode overrides.
   Default ("white") = the site's existing look: no overrides apply.
   Dark overrides are scoped under html[data-theme="dark"].
   Palette (dark): bg #121212, surface #1d1d1d, raised #242424,
   text #f5f5f5 (17.2:1 on bg), muted #c9c9c9 (11.4:1 on bg),
   accent link #ff7a70 (6.4:1 on bg), borders #3a3a3a. */

/* ---------- the switch itself ---------- */
.bh-theme-toggle {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid #151515;
  border-radius: 999px;
  overflow: hidden;
  background-color: #ffffff;
  font-family: "Open Sans", sans-serif;
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
}
/* fallback spot (only if header anchors are missing): fixed top-right */
.bh-theme-toggle:not(.is-placed) {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 99999;
}
body.admin-bar .bh-theme-toggle:not(.is-placed) { top: 46px; }
.bh-theme-toggle .bh-tt-seg {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  margin: 0;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #333333;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.bh-theme-toggle .bh-tt-seg + .bh-tt-seg { border-left: 1px solid rgba(0,0,0,.18); }
.bh-theme-toggle .bh-tt-seg.is-active { background-color: #151515; color: #ffffff; }
.bh-theme-toggle .bh-tt-seg:focus-visible { outline: 2px solid #f93834; outline-offset: -2px; }
.bh-theme-toggle .bh-tt-moon { flex: 0 0 auto; }
/* placed spots */
.bottom-header .header-icons .bh-theme-toggle { margin-right: 12px; }
.site-header .top-header.has-bh-toggle { position: relative; min-height: 36px; }
.site-header .top-header .bh-theme-toggle { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); z-index: 5; }
@media (max-width: 575px) {
  .bh-theme-toggle .bh-tt-seg { padding: 6px 9px; font-size: 10px; }
}

/* switch colours while in dark mode */
html[data-theme="dark"] .bh-theme-toggle { background-color: #1d1d1d; border-color: #f5f5f5; }
html[data-theme="dark"] .bh-theme-toggle .bh-tt-seg { color: #e8e8e8; }
html[data-theme="dark"] .bh-theme-toggle .bh-tt-seg + .bh-tt-seg { border-left-color: rgba(255,255,255,.25); }
html[data-theme="dark"] .bh-theme-toggle .bh-tt-seg.is-active { background-color: #f5f5f5; color: #121212; }

/* ---------- DARK MODE ---------- */
html[data-theme="dark"] body {
  background-color: #121212 !important;
  color: #f5f5f5;
}
html[data-theme="dark"] h1, html[data-theme="dark"] h2, html[data-theme="dark"] h3,
html[data-theme="dark"] h4, html[data-theme="dark"] h5, html[data-theme="dark"] h6 {
  color: #f5f5f5;
}
html[data-theme="dark"] a { color: #ff7a70; }
html[data-theme="dark"] .entry-content a, html[data-theme="dark"] .post-content a { color: #ff7a70; }

/* header */
html[data-theme="dark"] .site-header .top-header {
  background-color: #1d1d1d !important;
  border-bottom-color: #3a3a3a;
  color: #f5f5f5;
}
html[data-theme="dark"] .site-header .top-header a { color: #f5f5f5; }
html[data-theme="dark"] .header-three .bottom-header,
html[data-theme="dark"] .site-header .bottom-header {
  background-color: #0d0d0d !important;
}
html[data-theme="dark"] .main-navigation ul li a { color: #ffffff; }
html[data-theme="dark"] .main-navigation ul ul,
html[data-theme="dark"] .main-navigation .sub-menu {
  background-color: #1d1d1d;
}
html[data-theme="dark"] .main-navigation ul ul li a { color: #f5f5f5; }
html[data-theme="dark"] .main-navigation ul ul li a:hover { background-color: #242424; }
html[data-theme="dark"] .header-icons, html[data-theme="dark"] .header-icons a,
html[data-theme="dark"] .header-search-wrap .search-icon { color: #ffffff; }
html[data-theme="dark"] .header-search { background-color: #1d1d1d; }
html[data-theme="dark"] #offcanvas-menu,
html[data-theme="dark"] .offcanvas-menu-wrap { background-color: #1d1d1d; color: #f5f5f5; }
html[data-theme="dark"] #offcanvas-menu a, html[data-theme="dark"] .offcanvas-menu-wrap a { color: #f5f5f5; }
html[data-theme="dark"] .mobile-menu-container, html[data-theme="dark"] .slicknav_menu { background-color: #1d1d1d; }
html[data-theme="dark"] .slicknav_nav a { color: #f5f5f5; }
html[data-theme="dark"] .slicknav_btn { background-color: #242424; }

/* main surfaces, post cards / listings */
html[data-theme="dark"] .site-content, html[data-theme="dark"] #primary,
html[data-theme="dark"] .content-area { background-color: transparent; }
html[data-theme="dark"] article.post, html[data-theme="dark"] .post,
html[data-theme="dark"] .blog-post, html[data-theme="dark"] .hentry {
  background-color: #1d1d1d;
  color: #f5f5f5;
}
html[data-theme="dark"] .entry-title, html[data-theme="dark"] .entry-title a,
html[data-theme="dark"] .post-title, html[data-theme="dark"] .post-title a {
  color: #f5f5f5 !important;
}
html[data-theme="dark"] .entry-content, html[data-theme="dark"] .entry-summary,
html[data-theme="dark"] .post-content { color: #f5f5f5; }
html[data-theme="dark"] .entry-meta, html[data-theme="dark"] .entry-meta a,
html[data-theme="dark"] .posted-on, html[data-theme="dark"] .cat-links,
html[data-theme="dark"] .tags-links, html[data-theme="dark"] .byline { color: #c9c9c9; }
html[data-theme="dark"] .main-slider, html[data-theme="dark"] .banner-slider,
html[data-theme="dark"] .slider-content { background-color: #121212; }
html[data-theme="dark"] blockquote {
  background-color: #242424; color: #f5f5f5; border-left-color: #f93834;
}
html[data-theme="dark"] hr { border-color: #3a3a3a; }
html[data-theme="dark"] .pagination .page-numbers,
html[data-theme="dark"] .nav-links a {
  background-color: #1d1d1d; color: #f5f5f5; border-color: #3a3a3a;
}
html[data-theme="dark"] .pagination .page-numbers.current { background-color: #f93834; color: #ffffff; }

/* sidebar widgets */
html[data-theme="dark"] .widget { background-color: #1d1d1d; color: #f5f5f5; }
html[data-theme="dark"] .widget a { color: #f5f5f5; }
html[data-theme="dark"] .widget-title, html[data-theme="dark"] .widget h2,
html[data-theme="dark"] .widget h3 { color: #f5f5f5; }
html[data-theme="dark"] .widget .post-date { color: #c9c9c9; }

/* footer */
html[data-theme="dark"] .site-footer {
  background-color: #0d0d0d !important;
  color: #c9c9c9;
}
html[data-theme="dark"] .site-footer a { color: #f5f5f5; }
html[data-theme="dark"] .site-footer .widget { background-color: transparent; }
html[data-theme="dark"] .site-info { color: #c9c9c9; }

/* forms */
html[data-theme="dark"] input[type="text"], html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="search"], html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] input[type="number"], html[data-theme="dark"] input[type="tel"],
html[data-theme="dark"] input[type="url"], html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
  background-color: #1d1d1d; color: #f5f5f5; border-color: #3a3a3a;
}
html[data-theme="dark"] table { color: #f5f5f5; }
html[data-theme="dark"] th, html[data-theme="dark"] td { border-color: #3a3a3a; }
html[data-theme="dark"] th { background-color: #242424; color: #f5f5f5; }

/* WooCommerce */
html[data-theme="dark"] .woocommerce, html[data-theme="dark"] .woocommerce-page { color: #f5f5f5; }
html[data-theme="dark"] .woocommerce ul.products li.product,
html[data-theme="dark"] .woocommerce-page ul.products li.product {
  background-color: #1d1d1d; color: #f5f5f5;
}
html[data-theme="dark"] .woocommerce ul.products li.product .woocommerce-loop-product__title,
html[data-theme="dark"] .woocommerce ul.products li.product h2,
html[data-theme="dark"] .woocommerce div.product .product_title { color: #f5f5f5; }
html[data-theme="dark"] .woocommerce ul.products li.product .price,
html[data-theme="dark"] .woocommerce div.product p.price,
html[data-theme="dark"] .woocommerce div.product span.price,
html[data-theme="dark"] .woocommerce .price { color: #a5d6a7; }
html[data-theme="dark"] .woocommerce-message, html[data-theme="dark"] .woocommerce-info,
html[data-theme="dark"] .woocommerce-error, html[data-theme="dark"] .woocommerce .woocommerce-notice {
  background-color: #1d1d1d; color: #f5f5f5;
}
html[data-theme="dark"] .woocommerce table.shop_table,
html[data-theme="dark"] .woocommerce table.shop_table td,
html[data-theme="dark"] .woocommerce table.shop_table th { border-color: #3a3a3a; color: #f5f5f5; }
html[data-theme="dark"] .woocommerce .woocommerce-breadcrumb { color: #c9c9c9; }
html[data-theme="dark"] .woocommerce .woocommerce-breadcrumb a { color: #f5f5f5; }
html[data-theme="dark"] .woocommerce div.product .woocommerce-tabs ul.tabs li {
  background-color: #242424; border-color: #3a3a3a;
}
html[data-theme="dark"] .woocommerce div.product .woocommerce-tabs ul.tabs li a { color: #f5f5f5; }
html[data-theme="dark"] .woocommerce div.product .woocommerce-tabs .panel { color: #f5f5f5; }
html[data-theme="dark"] .woocommerce .cart-collaterals .cart_totals,
html[data-theme="dark"] .woocommerce .col2-set, html[data-theme="dark"] .woocommerce form.checkout {
  color: #f5f5f5;
}
html[data-theme="dark"] .woocommerce form .form-row label,
html[data-theme="dark"] .woocommerce-page form .form-row label { color: #f5f5f5; }
html[data-theme="dark"] #add_payment_method #payment, html[data-theme="dark"] .woocommerce-cart #payment,
html[data-theme="dark"] .woocommerce-checkout #payment { background-color: #1d1d1d; color: #f5f5f5; }
html[data-theme="dark"] .woocommerce nav.woocommerce-pagination ul li a,
html[data-theme="dark"] .woocommerce nav.woocommerce-pagination ul li span {
  background-color: #1d1d1d; color: #f5f5f5;
}
html[data-theme="dark"] .select2-container--default .select2-selection--single {
  background-color: #1d1d1d; color: #f5f5f5; border-color: #3a3a3a;
}
html[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered { color: #f5f5f5; }

/* homepage main slider: customizer paints it light (#fafafa) — darken in dark mode */
html[data-theme="dark"] .main-slider-wrap,
html[data-theme="dark"] .main-slider,
html[data-theme="dark"] .main-slider .slide-inner,
html[data-theme="dark"] .main-slider .slide-item {
  background-color: #121212 !important;
}
html[data-theme="dark"] .main-slider-wrap .banner-content,
html[data-theme="dark"] .main-slider-wrap .banner-content .entry-content,
html[data-theme="dark"] .main-slider-wrap .banner-content p { color: #f5f5f5; }
html[data-theme="dark"] .main-slider-wrap .banner-content .entry-meta,
html[data-theme="dark"] .main-slider-wrap .banner-content .entry-meta a,
html[data-theme="dark"] .main-slider-wrap .banner-content .posted-on { color: #c9c9c9; }
html[data-theme="dark"] .main-slider-wrap a { color: #ff7a70; }
html[data-theme="dark"] .main-slider-wrap .banner-content .entry-title,
html[data-theme="dark"] .main-slider-wrap .banner-content .entry-title a { color: #f5f5f5 !important; }
html[data-theme="dark"] .main-slider-wrap .slick-dots li button:before { color: #f5f5f5; }

/* slider overlay panel (customizer paints it #fafafa) + excerpt/body paragraphs
   (theme paints .entry-content p directly, beating inherited colour) */
html[data-theme="dark"] .main-slider .overlay,
html[data-theme="dark"] .section-banner .overlay { background-color: #121212 !important; }
html[data-theme="dark"] .entry-content p,
html[data-theme="dark"] .entry-summary p,
html[data-theme="dark"] .post-excerpt p { color: #f5f5f5 !important; }
html[data-theme="dark"] .entry-meta, html[data-theme="dark"] .entry-meta a,
html[data-theme="dark"] .entry-meta span, html[data-theme="dark"] .entry-footer,
html[data-theme="dark"] .entry-footer a { color: #c9c9c9; }

/* article body copy is pasted with inline color:#000000 spans — in dark mode
   force readable colours inside post content (links keep the accent colour) */
html[data-theme="dark"] .entry-content :where(p, span, li, td, th, div, strong, em, b, i, h1, h2, h3, h4, h5, h6) {
  color: #f5f5f5 !important;
}
html[data-theme="dark"] .entry-content a { color: #ff7a70 !important; }
html[data-theme="dark"] .entry-content a span { color: #ff7a70 !important; }
