/* =========================
   BUSCADOR WIDGET — BASE
========================= */

.buscador {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 800px;
    max-width: 100%;
    margin: 0 auto 16px;
}

.buscador__field-wrap {
    position: relative;
    flex: 0 0 584px;
    width: 584px;
    min-width: 584px;
    max-width: 584px;
}

.buscador__field-wrap .buscador__input,
.buscador__field-wrap input,
.buscador input {
    display: block;
    width: 100%;
    height: 48px;
    box-sizing: border-box;
    padding: 0 16px;
    border: 1px solid #E5E3E3;
    border-radius: 8px;
    outline: none;
    background: #FFFFFF;
    font-family: 'IBM Plex Sans', 'Segoe UI', Arial, sans-serif;
    font-weight: 400;
    font-size: var(--text-body-md-size);
    line-height: 24px;
    color: #726969;
}

.buscador__field-wrap .buscador__input::placeholder,
.buscador__field-wrap input::placeholder,
.buscador input::placeholder {
    color: #726969;
    opacity: 1;
}

.buscador > .buscador__submit {
    flex: 0 0 200px;
    width: 200px;
    min-width: 200px;
    max-width: 200px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border: none;
    border-radius: 8px;
    background: #2B7DE5;
    color: #FFFFFF;
    font-family: 'IBM Plex Sans', 'Segoe UI', Arial, sans-serif;
    font-weight: 700;
    font-size: var(--text-body-md-size);
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.buscador > .buscador__submit:hover {
    background: #246dca;
}

/* =========================
   PASTILLA DE EXTENSIÓN
========================= */

.buscador__selected-ext {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 74px;
    max-width: 92px;
    height: 36px;
    padding: 0 18px 0 12px;
    border-radius: 8px;
    white-space: nowrap;
    z-index: 3;
    background: #F3F3F3;
    border: 1px solid #E6E6E6;
    color: #1F1F1F;
    box-sizing: border-box;
}

.buscador__selected-ext[hidden] {
    display: none !important;
}

.buscador__selected-ext-text {
    font-family: 'IBM Plex Sans', 'Segoe UI', Arial, sans-serif;
    font-weight: 700;
    font-size: var(--text-body-secondary-size);
    line-height: 24px;
    color: #1F1F1F;
}

.buscador__selected-ext-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 14px;
    height: 14px;
    min-width: 14px;
    margin: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent !important;
    color: #8A8A8A;
    font-weight: 700;
    font-size: var(--text-body-secondary-size);
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: none;
}

.buscador__selected-ext-remove:hover {
    color: #5F5F5F;
    background: transparent !important;
}

/* =========================
   EXTENSIONES
========================= */

.extensiones__label {
    display: block;
    margin-bottom: 16px;
    font-family: 'IBM Plex Sans', 'Segoe UI', Arial, sans-serif;
    font-size: var(--text-body-md-size);
    font-weight: 700;
    line-height: 24px;
    text-align: center;
}

.extensiones__list {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    width: 800px;
    max-width: 100%;
    margin: 0 auto;
}

a.extensiones__badge {
    text-decoration: none !important;
}

/* =========================
   TEMA SOFT
   Seguridad / Nosotros / FAQs
========================= */
.buscador-widget--soft .extensiones__label {
    color: #000000;
    opacity: 1;
    font-weight: 700;
}

.buscador-widget--soft .buscador__field-wrap .buscador__input,
.buscador-widget--soft .buscador input {
    background: #FFFFFF;
    border: 1px solid #E5E3E3;
}

.buscador-widget--soft .extensiones__list .extensiones__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 86px;
    min-width: 86px;
    max-width: 86px;
    height: 60px;
    padding: 10px 16px;
    border-radius: 8px;
    box-sizing: border-box;
    font-family: 'IBM Plex Sans', 'Segoe UI', Arial, sans-serif;
    font-weight: 700;
    font-size: var(--text-body-md-size);
    line-height: 45px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #F5F5F5;
    border: 1px solid #D9D9D9;
    color: #726969;
}

/* .cr = resaltado principal visual */
.buscador-widget--soft .extensiones__list .extensiones__badge[data-ext="cr"] {
    background: #EAF2FF;
    border: 1px solid #86B6FF;
    color: #2B7DE5;
}

/* .co.cr = resaltado secundario visual */
.buscador-widget--soft .extensiones__list .extensiones__badge[data-ext="co.cr"] {
    background: #F5F5F5;
    border: 1px solid #D9D9D9;
    color: #2B7DE5;
}

/* hover general */
.buscador-widget--soft .extensiones__list .extensiones__badge:hover {
    border-color: #BFD6F8;
    color: #2B7DE5;
    background: #F8FBFF;
}

/* cuando el usuario selecciona de verdad */
.buscador-widget--soft .extensiones__list .extensiones__badge.extensiones__badge--active {
    background: #EAF2FF !important;
    border: 1px solid #2B7DE5 !important;
    color: #2B7DE5 !important;
    box-shadow: inset 0 0 0 1px #2B7DE5;
}

.buscador-widget--soft .buscador__selected-ext {
    background: #F3F3F3 !important;
    color: #1F1F1F !important;
    border: 1px solid #ECECEC !important;
}

/* =========================
   TEMA DARK
========================= */

.buscador-widget--dark .extensiones__label {
    color: #FFFFFF;
    opacity: 1;
}

.buscador-widget--dark .extensiones__list .extensiones__badge {
    display: inline-flex;
    flex: 0 0 86px;
    align-items: center;
    justify-content: center;
    width: 86px;
    min-width: 86px;
    max-width: 86px;
    height: 60px;
    min-height: 60px;
    max-height: 60px;
    padding: 10px 16px;
    gap: 10px;
    border-radius: 8px;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    border: none;
    outline: none;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.20);
    color: #FFFFFF;
    cursor: pointer;
    white-space: nowrap;
    text-align: center;
    font-family: 'IBM Plex Sans', 'Segoe UI', Arial, sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: var(--text-body-md-size);
    line-height: 24px;
    letter-spacing: 0;
    transition: background 0.2s ease, border 0.2s ease, color 0.2s ease;
}
.buscador-widget--dark .extensiones__list .extensiones__badge[data-ext="cr"] {
    background: #FFFFFF !important;
    color: #2B7DE5 !important;
    border: 1px solid #FFFFFF !important;
}

.buscador-widget--dark .extensiones__list .extensiones__badge:hover {
    background: rgba(255, 255, 255, 0.28) !important;
    color: #FFFFFF !important;
    border: 1px solid transparent;
}

.buscador-widget--dark .extensiones__list .extensiones__badge.extensiones__badge--active {
    background: rgba(255, 255, 255, 0.34) !important;
    color: #FFFFFF !important;
    border: 1px solid #2B7DE5 !important;
    box-shadow: 0 0 0 1px rgba(43, 125, 229, 0.35);
}
/* =========================
   TEMA LIGHT / WHITE
========================= */

.buscador-widget--light .extensiones__label,
.buscador-widget--white .extensiones__label {
    color: #000000;
    opacity: 1;
}

.buscador-widget--light .extensiones__list .extensiones__badge,
.buscador-widget--white .extensiones__list .extensiones__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 86px;
    min-width: 86px;
    max-width: 86px;
    height: 60px;
    padding: 10px 16px;
    border-radius: 8px;
    box-sizing: border-box;
    font-family: 'IBM Plex Sans', 'Segoe UI', Arial, sans-serif;
    font-weight: 700;
    font-size: var(--text-body-md-size);
    line-height: 45px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #9DBFD9;
    border: none;
    color: #FFFFFF;
}

.buscador-widget--light .extensiones__list .extensiones__badge:hover,
.buscador-widget--light .extensiones__list .extensiones__badge.extensiones__badge--active,
.buscador-widget--white .extensiones__list .extensiones__badge:hover,
.buscador-widget--white .extensiones__list .extensiones__badge.extensiones__badge--active {
    background: #2B7DE5 !important;
    color: #FFFFFF !important;
}

.buscador-widget--white {
    margin-top: 0;
}

.buscador-widget--white .buscador__field-wrap .buscador__input,
.buscador-widget--white .buscador input,
.buscador-widget--light .buscador__field-wrap .buscador__input,
.buscador-widget--light .buscador input {
    background: #FFFFFF;
    border: 1px solid #E5E3E3;
}

/* =========================
   PASTILLA SELECCIONADA
========================= */

.buscador-widget--dark .buscador__selected-ext,
.hero .buscador__selected-ext,
.buscador-widget--light .buscador__selected-ext,
.buscador-widget--white .buscador__selected-ext {
    background: #F3F3F3 !important;
    color: #1F1F1F !important;
    border: 1px solid #ECECEC !important;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {
    .user-menu__dropdown {
        right: -20px !important;
        width: 200px !important;
    }

    .user-menu__header {
        font-size: var(--text-body-md-size) !important;
        padding: 16px 20px !important;
    }

    .user-menu__item,
    .user-menu__logout-btn {
        font-size: var(--text-body-secondary-size) !important;
        padding: 12px 20px !important;
    }

    header.site-header .site-header__inner {
        padding: 12px 16px !important;
    }

    header.site-header a.site-header__btn--outline,
    header.site-header a.site-header__btn--solid {
        font-size: var(--text-body-secondary-size) !important;
        padding: 0 12px !important;
        height: 34px !important;
    }

    .buscador {
        width: 100% !important;
        max-width: 100% !important;
        gap: 12px !important;
    }

    .buscador__field-wrap {
        flex: 1 1 auto !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
    }

    .buscador__field-wrap .buscador__input,
    .buscador__field-wrap input,
    .buscador input {
        width: 100% !important;
        min-width: 0 !important;
        height: 48px !important;
        padding: 0 14px !important;
        font-size: var(--text-body-secondary-size) !important;
        line-height: 20px !important;
        border-radius: 8px !important;
        box-sizing: border-box !important;
    }

    .buscador > .buscador__submit {
        flex: 0 0 140px !important;
        width: 140px !important;
        min-width: 140px !important;
        max-width: 140px !important;
        height: 48px !important;
        padding: 0 16px !important;
        font-size: var(--text-body-secondary-size) !important;
        line-height: 24px !important;
        border-radius: 8px !important;
    }

    .buscador__selected-ext {
        height: 30px !important;
        min-width: 62px !important;
        max-width: 78px !important;
        padding: 0 14px 0 10px !important;
    }

    .buscador__selected-ext-text {
        font-size: var(--text-body-secondary-size) !important;
        line-height: 18px !important;
    }

    .extensiones__list {
        width: 100%;
        flex-wrap: wrap;
        gap: 10px;
    }

    .buscador-widget--dark .extensiones__list .extensiones__badge,
    .buscador-widget--light .extensiones__list .extensiones__badge,
    .buscador-widget--white .extensiones__list .extensiones__badge {
        width: 70px !important;
        min-width: 70px !important;
        max-width: 70px !important;
        height: 45px !important;
        font-size: var(--text-body-md-size) !important;
        line-height: 28px !important;
    }

    .extensiones__label {
        font-size: var(--text-body-secondary-size);
        line-height: 20px;
    }
}
