/* Cubakilos - search suggestions panel (cubakilos-buscador-sugerencias.php / .js).
   Colours from the Kit 8 roles: ink text #0F172A, soft grey #F1F5F9, border #E3E8EE,
   secondary text #54595F, keyboard focus #1B6FB5. */

.elementor-widget-search.ck-bs-on,
.elementor-widget-search .ck-bs-host {
    position: relative;
}

.elementor-widget-search .ck-bs {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 1001;
    box-sizing: border-box;
    max-height: min(70vh, 480px);
    max-height: min(70svh, 480px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px;
    background: #FFFFFF;
    border: 1px solid #E3E8EE;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    text-align: left;
    color: var(--e-global-color-text, #0F172A);
}

.elementor-widget-search .ck-bs[hidden] {
    display: none;
}

.elementor-widget-search .ck-bs-sec + .ck-bs-sec {
    margin-top: 16px;
}

.elementor-widget-search .ck-bs-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 32px;
    margin-bottom: 8px;
}

.elementor-widget-search .ck-bs-tit {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--e-global-color-text, #0F172A);
}

.elementor-widget-search .ck-bs-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.elementor-widget-search .ck-bs-chips li {
    margin: 0;
    padding: 0;
    max-width: 100%;
}

.elementor-widget-search .ck-bs a.ck-bs-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-sizing: border-box;
    max-width: 100%;
    min-height: 40px;
    padding: 4px 14px 4px 5px;
    border-radius: 999px;
    background: #F1F5F9;
    color: #0F172A;
    font-size: 15px;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.elementor-widget-search .ck-bs a.ck-bs-chip:hover {
    background: #E3E8EE;
    color: #0F172A;
}

.elementor-widget-search .ck-bs a.ck-bs-chip:focus-visible,
.elementor-widget-search .ck-bs button.ck-bs-borrar:focus-visible {
    outline: 2px solid #1B6FB5;
    outline-offset: 2px;
}

.elementor-widget-search .ck-bs-chip img,
.elementor-widget-search .ck-bs-ico {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #FFFFFF;
}

.elementor-widget-search .ck-bs-chip img {
    object-fit: cover;
}

.elementor-widget-search .ck-bs-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #54595F;
}

.elementor-widget-search .ck-bs-txt {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* The Kit styles every <button> on hover/focus (dark fill, border, shadow): reset it here
   with more weight (E-pendientes #53 b). */
.elementor-widget-search .ck-bs button.ck-bs-borrar,
.elementor-widget-search .ck-bs button.ck-bs-borrar:hover,
.elementor-widget-search .ck-bs button.ck-bs-borrar:focus,
.elementor-widget-search .ck-bs button.ck-bs-borrar:active {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    margin: -4px -8px -4px 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
    color: #54595F;
    cursor: pointer;
}

.elementor-widget-search .ck-bs button.ck-bs-borrar:hover,
.elementor-widget-search .ck-bs button.ck-bs-borrar:active {
    background: #F1F5F9;
    color: #0F172A;
}

/* Tablet and mobile: the field shares its row with the currency switcher, so the panel
   takes the header width (same gutters as the header: 32 px tablet, 16 px mobile). */
@media (max-width: 1024px) {
    .elementor-widget-search .ck-bs {
        right: auto;
        width: max(100%, min(620px, calc(100vw - 64px)));
    }
}
@media (max-width: 767px) {
    .elementor-widget-search .ck-bs {
        width: calc(100vw - 32px);
        padding: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .elementor-widget-search .ck-bs a.ck-bs-chip {
        transition: none;
    }
}
