/* White remains white for text on brand buttons, covers and footers. */
html[data-se-theme="light"] { color-scheme: light; }
html[data-se-theme="dark"] {
    color-scheme: dark;
    --se-primary: #ffac7a;
    --se-primary-dark: #ffc09b;
    --se-dark: #eef2f6;
    --se-text: #e2e8f0;
    --se-muted: #b0bdcc;
    --se-bg: #18222f;
    --se-border: #364354;
    --se-color-surface-2: #202d3d;
    --se-color-surface-warm: #302820;
    --se-color-footer: #0b1018;
    --se-color-ink: #eef2f6;
    --wp--preset--color--primary: #ffac7a;
    --wp--preset--color--contrast: #eef2f6;
    --wp--preset--color--text: #e2e8f0;
    --wp--preset--color--muted: #b0bdcc;
    --wp--preset--color--base: #111923;
    --wp--preset--color--surface: #18222f;
    --wp--preset--color--surface-2: #202d3d;
    --wp--preset--color--surface-warm: #302820;
}
html[data-se-theme="dark"] body { background: #111923; color: var(--se-text); }
html[data-se-theme="dark"] :is(.se-card, .se-hero-home__panel, .se-site-header .wp-block-search__inside-wrapper, .se-contact-form, .site-header-shadow,
    .se-home-service, .se-quick-action, .se-contact-aside, .se-catalog-tab.is-active, .se-process__index,
    .se-block-carrusel-slide, .se-block-ficha, .se-destacado-item, .se-services-carousel .se-carousel-btn) {
    background-color: var(--se-bg);
}
html[data-se-theme="dark"] .has-ti-bg-alt-background-color .wp-block-columns.alignwide > .wp-block-column {
    background: var(--se-bg);
}
html[data-se-theme="dark"] .has-white-background-color:not(.wp-block-cover__background) {
    background-color: var(--se-bg) !important;
}
html[data-se-theme="dark"] .se-block-carrusel-btn {
    --se-nav-bg: #202d3d;
    --se-nav-fg: #eef2f6;
}
html[data-se-theme="dark"] :is(.se-site-header, header.wp-block-template-part, .se-congreso-menu) {
    background: rgb(17 25 35 / 96%);
    border-color: var(--se-border);
}
html[data-se-theme="dark"] :is(.se-hero, .se-hero-home, main.wp-block-group > .wp-block-cover:first-child) {
    background-color: #111923;
}
html[data-se-theme="dark"] :is(.se-section--cta, .se-final-cta, .wp-block-navigation__responsive-container.is-menu-open,
    main.wp-block-group > .wp-block-cover:last-child:not(:first-child)) {
    background: #18222f;
}
html[data-se-theme="dark"] :is(.wp-block-button__link, .wp-element-button) {
    color: #111923;
}
html[data-se-theme="dark"] :is(input:not([type="submit"]):not([type="button"]), textarea, select) {
    background-color: #18222f !important;
    color: #e2e8f0 !important;
    border-color: #526276;
}
html[data-se-theme="dark"] .wsf-wrap.ws-form-contact .wsf-btn-secondary {
    background: #202d3d;
    color: #eef2f6;
}
html[data-se-theme="dark"] :is(.woocommerce, .wc-block-checkout, .wc-block-cart) {
    --wc-form-color-background: #18222f;
    --wc-form-color-text: #e2e8f0;
    --wc-form-color-border: #526276;
}
.se-theme-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    width: 44px;
    padding: 10px;
    border: 1px solid #526276;
    border-radius: 999px;
    background: #fff;
    color: #1f2933;
    font: 600 14px/1.3 system-ui, sans-serif;
    cursor: pointer;
    flex-shrink: 0;
}
.se-theme-toggle[hidden] { display: none; }
.se-theme-toggle--inline { position: static; }
.se-theme-toggle__sun { display: none; }
.se-theme-toggle[aria-pressed="true"] .se-theme-toggle__moon { display: none; }
.se-theme-toggle[aria-pressed="true"] .se-theme-toggle__sun { display: block; }
.se-theme-toggle:focus-visible { outline: 3px solid #b9470b; outline-offset: 4px; }
.se-theme-toggle[aria-pressed="true"] { background: #202d3d; color: #f1f5f9; border-color: #94a3b8; }
html[data-se-theme="dark"] .se-theme-toggle:focus-visible { outline-color: #ffac7a; }
@media print { .se-theme-toggle { display: none !important; } }
