/**
 * SOBRESCRITURA NUCLEAR PARA EL BUSCADOR EN MODO OSCURO
 * Cargado al final para asegurar prioridad absoluta.
 */

[data-theme="dark"] .universal-header__search-input,
body.dark-mode .universal-header__search-input,
html.dark-mode .universal-header__search-input,
[data-theme="dark"] #universal-search,
body.dark-mode #universal-search,
html.dark-mode #universal-search {
    background-color: #1a1a1a !important;
    border-color: #333333 !important;
    color: #ffffff !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] .universal-header__search-input::placeholder,
body.dark-mode .universal-header__search-input::placeholder,
html.dark-mode .universal-header__search-input::placeholder {
    color: #888888 !important;
}

[data-theme="dark"] .universal-header__search-input:focus,
body.dark-mode .universal-header__search-input:focus,
html.dark-mode .universal-header__search-input:focus {
    background-color: #000000 !important;
    border-color: #53fc1b !important;
    box-shadow: 0 0 0 2px rgba(83, 252, 27, 0.2) !important;
}

/* Iconos dentro del buscador */
[data-theme="dark"] .universal-header__search-icon,
body.dark-mode .universal-header__search-icon,
html.dark-mode .universal-header__search-icon {
    color: #888888 !important;
}

[data-theme="dark"] .universal-header__search-clear,
body.dark-mode .universal-header__search-clear,
html.dark-mode .universal-header__search-clear {
    color: #888888 !important;
    background: transparent !important;
}

[data-theme="dark"] .universal-header__search-clear:hover,
body.dark-mode .universal-header__search-clear:hover,
html.dark-mode .universal-header__search-clear:hover {
    color: #ffffff !important;
    background-color: #333333 !important;
}

/* =========================================
   MOBILE SEARCH BAR OVERRIDES (NUCLEAR LEVEL 2)
   ========================================= */

/* Contenedor principal de la barra móvil */
html.dark-mode #universal-header-wrapper .universal-header__mobile-search-bar,
body.dark-mode #universal-header-wrapper .universal-header__mobile-search-bar,
[data-theme="dark"] #universal-header-wrapper .universal-header__mobile-search-bar {
    background: #0f0f0f !important;
    background-color: #0f0f0f !important;
    border-bottom: 1px solid #2d2d2d !important;
    box-shadow: none !important;
}

/* Input del buscador móvil - INCREASED SPECIFICITY */
html.dark-mode #universal-header-wrapper .mobile-search-input,
body.dark-mode #universal-header-wrapper .mobile-search-input,
[data-theme="dark"] #universal-header-wrapper .mobile-search-input {
    background: #1a1a1a !important;
    background-color: #1a1a1a !important;
    border: 1px solid #333333 !important;
    color: #ffffff !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5) !important;
    -webkit-text-fill-color: #ffffff !important;
}

html.dark-mode #universal-header-wrapper .mobile-search-input::placeholder,
body.dark-mode #universal-header-wrapper .mobile-search-input::placeholder,
[data-theme="dark"] #universal-header-wrapper .mobile-search-input::placeholder {
    color: #888888 !important;
    opacity: 1 !important;
}

html.dark-mode #universal-header-wrapper .mobile-search-icon,
body.dark-mode #universal-header-wrapper .mobile-search-icon,
[data-theme="dark"] #universal-header-wrapper .mobile-search-icon {
    color: #888888 !important;
}
/* =========================================
   SEARCH LIMIT MESSAGE BUTTON FIX (NUCLEAR)
   ========================================= */

[data-theme="dark"] .mobile-search-modal__signup-btn-primary,
body.dark-mode .mobile-search-modal__signup-btn-primary,
html.dark-mode .mobile-search-modal__signup-btn-primary {
    background-color: #53fc1b !important;
    color: #111827 !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(83, 252, 27, 0.2) !important;
}

[data-theme="dark"] .mobile-search-modal__signup-btn-primary:hover,
body.dark-mode .mobile-search-modal__signup-btn-primary:hover,
html.dark-mode .mobile-search-modal__signup-btn-primary:hover {
    background-color: #45d816 !important;
    transform: translateY(-1px) !important;
}

/* Ensure secondary button is also visible and nice */
[data-theme="dark"] .mobile-search-modal__signup-btn-secondary,
body.dark-mode .mobile-search-modal__signup-btn-secondary,
html.dark-mode .mobile-search-modal__signup-btn-secondary {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* =========================================
   DESKTOP SEARCH LIMIT BUTTON FIX (NUCLEAR)
   ========================================= */

[data-theme="dark"] .search-results-signup-btn-primary,
body.dark-mode .search-results-signup-btn-primary,
html.dark-mode .search-results-signup-btn-primary {
    background-color: #53fc1b !important;
    color: #111827 !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(83, 252, 27, 0.2) !important;
}

[data-theme="dark"] .search-results-signup-btn-primary:hover,
body.dark-mode .search-results-signup-btn-primary:hover,
html.dark-mode .search-results-signup-btn-primary:hover {
    background-color: #45d816 !important;
    transform: translateY(-1px) !important;
}

[data-theme="dark"] .search-results-signup-btn-secondary,
body.dark-mode .search-results-signup-btn-secondary,
html.dark-mode .search-results-signup-btn-secondary {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}
