/*
 * Fabify3D Light Mode Lock v2.0.0 — ALL DEVICES
 * Strong, intentionally scoped white-surface rules. They do not blanket-repaint
 * every div, product image, CTA, styled blue slider, or intentionally dark panel.
 * The CSS applies with or without a matching OS prefers-color-scheme value.
 */

/* Browser controls and document canvas: no media gate, including desktop. */
html.fabify-light-lock--force-all-white,
html.fabify-light-lock--force-all-white body {
    color-scheme: light !important;
    color-scheme: only light !important;
    background-color: #fff !important;
    color: #253447 !important;
    background-image: linear-gradient(#fff, #fff) !important;
    -webkit-filter: none !important;
    filter: none !important;
}

/* Site page shells are normally white and must remain white under CSS dark-mode plugins. */
html.fabify-light-lock--force-all-white body :is(
    #page, #wrapper, #wrap, #site, #app, #outer-wrap, #content, #primary,
    #main, #main-content, #site-content, .site, .site-wrapper,
    .site-container, .site-content, .content-area, .site-main,
    .main-content, .entry-content, .wp-site-blocks
) {
    background-color: #fff !important;
    color-scheme: only light !important;
}

/* Navigation, mobile menus, search panels and cart drawers: keep light surfaces. */
html.fabify-light-lock--force-all-white body :is(
    #masthead, #header, #site-header, .site-header, .main-header,
    .header-wrapper, .header-inner, .site-header-inner,
    .mobile-header, .mobile-header-bar, .navbar, .navbar-header,
    .nav-header, .elementor-location-header,
    .header-main, .header-container,
    .woocommerce-mini-cart__empty-message,
    .woocommerce-mini-cart,
    .woocommerce-cart-form,
    .woocommerce-cart .cart-collaterals,
    .woocommerce-checkout #payment,
    .woocommerce-checkout-review-order,
    .woocommerce-account .woocommerce-MyAccount-content,
    .woocommerce-account .woocommerce-MyAccount-navigation,
    .woocommerce form.checkout_coupon,
    .woocommerce form.login,
    .woocommerce form.register,
    .wc-block-cart,
    .wc-block-cart__main,
    .wc-block-components-sidebar,
    .wc-block-components-order-summary,
    .wc-block-components-totals-wrapper,
    .select2-dropdown,
    .select2-results__options
) {
    background-color: #fff !important;
    color-scheme: only light !important;
}

/* Wrappers inside the HEADER, not arbitrary Elementor sections or product sliders. */
html.fabify-light-lock--force-all-white body :is(.site-header, .elementor-location-header, #masthead, #site-header)
:is(.elementor-section, .elementor-container, .elementor-widget-wrap, .e-con, .e-con-inner) {
    background-color: #fff !important;
}

/* Homepage introduction: white base and readable text. JS also marks the actual
 * introduction when custom layout classes are used (data-fabify-white-intro).
 */
html.fabify-light-lock--force-all-white body.home :is(
    #hero, #home-hero, .hero-section, .home-hero, .homepage-hero,
    .home-intro, .intro-section, [data-fabify-white-intro="1"]
) {
    background-color: #fff !important;
    color-scheme: only light !important;
}
html.fabify-light-lock--force-all-white body.home [data-fabify-white-intro="1"]
:is(.e-con-inner, .elementor-container, .elementor-widget-wrap,
    .elementor-widget-heading, .elementor-widget-text-editor) {
    background-color: #fff !important;
}
html.fabify-light-lock--force-all-white body.home :is(
    .hero-section, .home-hero, .home-intro, .intro-section,
    [data-fabify-white-intro="1"]
) :is(p, .lead, .description, .hero-description, .hero-subtitle) {
    color: #1d2d43 !important;
    -webkit-text-fill-color: #1d2d43 !important;
}
html.fabify-light-lock--force-all-white body.home [data-fabify-white-intro="1"]
:is(h1, h2, h3, .elementor-heading-title) {
    color: #073573 !important;
    -webkit-text-fill-color: #073573 !important;
}

/* Inputs and native widgets in WooCommerce, Elementor and Fabify custom forms. */
html.fabify-light-lock--force-all-white body :is(
    .woocommerce form input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]),
    .woocommerce form select,
    .woocommerce form textarea,
    .elementor-form input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]),
    .elementor-form select,
    .elementor-form textarea,
    .wp-block-search__input,
    .wc-block-components-text-input input,
    .wc-block-components-combobox input,
    .wc-block-components-textarea,
    .select2-container--default .select2-selection--single,
    .select2-container--default .select2-selection--multiple,
    .select2-dropdown
) {
    background-color: #fff !important;
    color: #243444 !important;
    -webkit-text-fill-color: #243444 !important;
    color-scheme: only light !important;
}
html.fabify-light-lock--force-all-white body :is(
    .woocommerce form input,
    .woocommerce form select,
    .woocommerce form textarea,
    .elementor-form input,
    .elementor-form textarea,
    .elementor-form select
)::placeholder {
    color: #66768a !important;
    -webkit-text-fill-color: #66768a !important;
    opacity: 1;
}

/* WooCommerce information and item rows should never receive dark text-on-dark
 * from a separate night theme; do not override their prices or sale badges. */
html.fabify-light-lock--force-all-white body :is(
    .woocommerce table.shop_table,
    .woocommerce .cart_totals,
    .woocommerce-checkout-review-order-table,
    .wc-block-components-order-summary,
    .wc-block-components-sidebar
) {
    background-color: #fff !important;
    color: #253447;
}

/* Disable only dark overlays installed by dark-mode switchers. Do not touch the
 * site's own overlays, modal shadows, image masks, slider transitions or filters. */
html.fabify-light-lock--no-auto-dark body :is(
    .darkmode-layer, .darkmode-toggle-layer,
    .wp-dark-mode-overlay, .wp-dark-mode-dark-overlay,
    .dark-mode-overlay
) {
    display: none !important;
}

/* A site-origin CSS rule cannot override browser/extension compositor-level
 * force darkening, nor can it alter a third-party preview site's wrapper. */

/* v1.9: A white canvas must not inherit white text from a dark theme.
 * Only headings, menu navigation and form text in known white regions are
 * affected; logos, colored CTAs, prices, banners, sliders remain untouched.
 */
html.fabify-light-lock--force-all-white body :is(
    .site-header, #masthead, #site-header, .main-header,
    .elementor-location-header, .navbar, .main-navigation,
    .mobile-header, .mobile-header-bar
) :is(
    .menu-item > a, .nav-menu a, .elementor-nav-menu a,
    .elementor-item:not(.elementor-button),
    .menu-toggle:not(.button), .navbar-nav a,
    .site-title, .site-description
):not(.button):not(.btn):not(.elementor-button):not(.wp-block-button__link) {
    color: #253447 !important;
    -webkit-text-fill-color: #253447 !important;
}
html.fabify-light-lock--force-all-white body :is(
    .woocommerce form, .woocommerce-checkout, .woocommerce-cart,
    .woocommerce-account, .wc-block-checkout, .wc-block-cart,
    .wc-block-components-sidebar
) :is(label, legend, .form-row > span, .woocommerce-form__label, .wc-block-components-text-input label) {
    color: #253447 !important;
    -webkit-text-fill-color: #253447 !important;
}
html.fabify-light-lock--force-all-white body :is(
    .site-header, #masthead, #site-header, .main-header,
    .elementor-location-header, .mobile-header, .mobile-header-bar,
    .header-inner, .header-wrapper
) {
    background-image: linear-gradient(#fff, #fff) !important;
}
/* Do not mask logo images, icons, SVG fills or a purposeful colored button. */

/* v2.0: nested navigation, modal and drawer shells loaded after initial render.
 * Only common light site UI is targeted. Blue CTAs, art and product visuals
 * are intentionally excluded from all selectors below. */
html.fabify-light-lock--force-all-white body :is(
    .mobile-menu, .mobile-nav, .mobile-nav-wrapper,
    .offcanvas-menu, .off-canvas-menu, .menu-modal,
    .dropdown-menu, .mega-menu, .sub-menu,
    .elementor-nav-menu--dropdown, .elementor-menu-toggle,
    .elementor-popup-modal .dialog-widget-content,
    .elementor-popup-modal .dialog-message,
    .wc-block-components-drawer__content,
    .wc-block-components-modal__content,
    .wc-block-components-combobox-control__listbox,
    .woocommerce-mini-cart__buttons,
    .woocommerce-message, .woocommerce-info,
    .select2-container .select2-dropdown
) {
    color-scheme: only light !important;
    background-color: #fff !important;
}
html.fabify-light-lock--force-all-white body :is(
    .mobile-menu, .mobile-nav, .offcanvas-menu,
    .off-canvas-menu, .menu-modal, .dropdown-menu,
    .mega-menu, .sub-menu, .elementor-nav-menu--dropdown,
    .wc-block-components-drawer__content
) :is(a:not(.button):not(.btn):not(.elementor-button), .menu-item, .menu-item > span, .elementor-item) {
    color: #253447 !important;
    -webkit-text-fill-color: #253447 !important;
}
html.fabify-light-lock--force-all-white body :is(
    .elementor-popup-modal .dialog-message,
    .wc-block-components-drawer__content,
    .woocommerce-message, .woocommerce-info
) :is(p, label, legend, input:not([type="submit"]):not([type="button"]), textarea) {
    color: #253447 !important;
    -webkit-text-fill-color: #253447 !important;
}
/* Also close the gap in older user agents that apply dark styles through
 * descendant-specific color-scheme declarations. */
html.fabify-light-lock--force-all-white body :is(
    dialog, input, textarea, select, option, optgroup, button,
    .wc-block-components-drawer, .select2-results
) {
    color-scheme: light !important;
    color-scheme: only light !important;
}
