:root {
    --nwdm-bg: #ffffff;
    --nwdm-text: #222222;
    --nwdm-muted-text: #555555;
    --nwdm-card: #f7f7f7;
    --nwdm-border: rgba(0, 0, 0, 0.12);
    --nwdm-link: #7ab8ff;
}

html.nwdm-dark {
    --nwdm-bg: #111111;
    --nwdm-text: #f5f5f5;
    --nwdm-muted-text: #d0d0d0;
    --nwdm-card: #1b1b1b;
    --nwdm-border: rgba(255, 255, 255, 0.18);
}

html.nwdm-dark body {
    background-color: var(--nwdm-bg) !important;
    color: var(--nwdm-text) !important;
}

html.nwdm-dark body,
html.nwdm-dark p,
html.nwdm-dark li,
html.nwdm-dark span,
html.nwdm-dark div {
    color: inherit;
}

html.nwdm-dark h1,
html.nwdm-dark h2,
html.nwdm-dark h3,
html.nwdm-dark h4,
html.nwdm-dark h5,
html.nwdm-dark h6,
html.nwdm-dark .elementor-widget-heading .elementor-heading-title {
    color: var(--nwdm-text);
}

html.nwdm-dark a {
    color: var(--nwdm-link);
}

html.nwdm-dark input,
html.nwdm-dark textarea,
html.nwdm-dark select,
html.nwdm-dark .elementor-field,
html.nwdm-dark .woocommerce-input-wrapper input,
html.nwdm-dark .woocommerce-input-wrapper textarea,
html.nwdm-dark .woocommerce-input-wrapper select {
    background-color: #181818 !important;
    color: var(--nwdm-text) !important;
    border-color: var(--nwdm-border) !important;
}

html.nwdm-dark table,
html.nwdm-dark .elementor-widget-container,
html.nwdm-dark .elementor-column,
html.nwdm-dark .elementor-container,
html.nwdm-dark .elementor-section,
html.nwdm-dark .elementor-element.nwdm-dark-card,
html.nwdm-dark .wp-block-group,
html.nwdm-dark .wp-block-cover.nwdm-dark-card {
    border-color: var(--nwdm-border);
}

html.nwdm-dark .nwdm-force-card,
html.nwdm-dark .card,
html.nwdm-dark .box,
html.nwdm-dark .site-content,
html.nwdm-dark .entry-content,
html.nwdm-dark .woocommerce div.product,
html.nwdm-dark .woocommerce-cart-form,
html.nwdm-dark .woocommerce-checkout-review-order {
    background-color: var(--nwdm-card);
    color: var(--nwdm-text);
}

html.nwdm-dark.nwdm-use-invert {
    filter: invert(1) hue-rotate(180deg);
}

html.nwdm-dark.nwdm-use-invert img,
html.nwdm-dark.nwdm-use-invert picture,
html.nwdm-dark.nwdm-use-invert video,
html.nwdm-dark.nwdm-use-invert iframe,
html.nwdm-dark.nwdm-use-invert canvas,
html.nwdm-dark.nwdm-use-invert svg,
html.nwdm-dark.nwdm-use-invert [style*="background-image"],
html.nwdm-dark.nwdm-use-invert .elementor-background-overlay,
html.nwdm-dark.nwdm-use-invert .nwdm-no-invert,
html.nwdm-dark.nwdm-use-invert .gm-style,
html.nwdm-dark.nwdm-use-invert .google-map,
html.nwdm-dark.nwdm-use-invert .leaflet-container {
    filter: invert(1) hue-rotate(180deg) !important;
}

.nwdm-switch,
#nwdm-switch {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 999999;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: #222222;
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
    font-size: 20px;
    line-height: 1;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

html.nwdm-dark .nwdm-switch,
html.nwdm-dark #nwdm-switch {
    background: #ffffff;
    color: #222222;
}

.nwdm-switch:hover,
.nwdm-switch:focus,
#nwdm-switch:hover,
#nwdm-switch:focus {
    transform: translateY(-2px) scale(1.03);
    outline: none;
}

.nwdm-switch:focus-visible,
#nwdm-switch:focus-visible {
    outline: 3px solid rgba(122, 184, 255, 0.9);
    outline-offset: 3px;
}

@media (max-width: 767px) {
    .nwdm-switch,
    #nwdm-switch {
        right: 16px;
        bottom: 16px;
        width: 46px;
        height: 46px;
    }
}

/* Switch position options */
.nwdm-switch.nwdm-position-left,
#nwdm-switch.nwdm-position-left {
    left: 20px;
    right: auto;
}

.nwdm-switch.nwdm-position-center,
#nwdm-switch.nwdm-position-center {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
}

.nwdm-switch.nwdm-position-right,
#nwdm-switch.nwdm-position-right {
    right: 20px;
    left: auto;
}

.nwdm-switch.nwdm-position-center:hover,
.nwdm-switch.nwdm-position-center:focus,
#nwdm-switch.nwdm-position-center:hover,
#nwdm-switch.nwdm-position-center:focus {
    transform: translateX(-50%) translateY(-2px) scale(1.03);
}

@media (max-width: 767px) {
    .nwdm-switch.nwdm-position-left,
    #nwdm-switch.nwdm-position-left {
        left: 16px;
        right: auto;
    }

    .nwdm-switch.nwdm-position-right,
    #nwdm-switch.nwdm-position-right {
        right: 16px;
        left: auto;
    }
}

.nwdm-switch.nwdm-inline-toggle {
    position: static;
    width: 42px;
    height: 42px;
    vertical-align: middle;
}

.nwdm-switch.nwdm-inline-toggle:hover,
.nwdm-switch.nwdm-inline-toggle:focus {
    transform: translateY(-1px) scale(1.03);
}

/* v0.8.1 - Elementor compatibility layer: stronger text/readability overrides without changing media colors. */
html.nwdm-dark {
    --e-global-color-text: var(--nwdm-text) !important;
    --e-global-color-secondary: var(--nwdm-muted-text) !important;
}

html.nwdm-dark body,
html.nwdm-dark .elementor,
html.nwdm-dark .elementor-section,
html.nwdm-dark .elementor-container,
html.nwdm-dark .e-con,
html.nwdm-dark .e-con-inner {
    color: var(--nwdm-text) !important;
}

html.nwdm-dark p,
html.nwdm-dark li,
html.nwdm-dark blockquote,
html.nwdm-dark figcaption,
html.nwdm-dark .entry-content,
html.nwdm-dark .site-content,
html.nwdm-dark .elementor-widget-text-editor,
html.nwdm-dark .elementor-widget-text-editor p,
html.nwdm-dark .elementor-widget-text-editor li,
html.nwdm-dark .elementor-widget-image-box .elementor-image-box-description,
html.nwdm-dark .elementor-widget-icon-box .elementor-icon-box-description,
html.nwdm-dark .elementor-widget-toggle .elementor-tab-content,
html.nwdm-dark .elementor-widget-toggle .elementor-tab-content p,
html.nwdm-dark .elementor-widget-accordion .elementor-tab-content,
html.nwdm-dark .elementor-widget-accordion .elementor-tab-content p,
html.nwdm-dark .elementor-widget-tabs .elementor-tab-content,
html.nwdm-dark .elementor-widget-tabs .elementor-tab-content p,
html.nwdm-dark .woocommerce,
html.nwdm-dark .woocommerce p {
    color: var(--nwdm-text) !important;
}

html.nwdm-dark h1,
html.nwdm-dark h2,
html.nwdm-dark h3,
html.nwdm-dark h4,
html.nwdm-dark h5,
html.nwdm-dark h6,
html.nwdm-dark .elementor-heading-title,
html.nwdm-dark .elementor-widget-heading .elementor-heading-title,
html.nwdm-dark .elementor-widget-image-box .elementor-image-box-title,
html.nwdm-dark .elementor-widget-icon-box .elementor-icon-box-title,
html.nwdm-dark .elementor-widget-toggle .elementor-tab-title,
html.nwdm-dark .elementor-widget-accordion .elementor-tab-title,
html.nwdm-dark .elementor-widget-tabs .elementor-tab-title {
    color: var(--nwdm-text) !important;
}

html.nwdm-dark .elementor-widget-toggle .elementor-toggle-icon,
html.nwdm-dark .elementor-widget-accordion .elementor-accordion-icon {
    color: var(--nwdm-text) !important;
}

html.nwdm-dark label,
html.nwdm-dark legend,
html.nwdm-dark .elementor-field-label,
html.nwdm-dark .elementor-field-subgroup label,
html.nwdm-dark .woocommerce form .form-row label {
    color: var(--nwdm-text) !important;
}

html.nwdm-dark .elementor-widget-button .elementor-button,
html.nwdm-dark button,
html.nwdm-dark input[type="button"],
html.nwdm-dark input[type="submit"] {
    color: inherit;
}
