.buscador-global-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.buscador-global-overlay {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 12vh 20px 40px;
    background: rgba(17, 24, 39, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: buscadorGlobalFade 0.18s ease-out;
}

.buscador-global-overlay[hidden] {
    display: none !important;
}

@keyframes buscadorGlobalFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.buscador-global-card {
    width: 100%;
    max-width: 580px;
    max-height: min(72vh, 640px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
    overflow: hidden;
    animation: buscadorGlobalSlide 0.2s ease-out;
}

@keyframes buscadorGlobalSlide {
    from { opacity: 0; transform: translateY(8px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.buscador-global-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 18px;
    border-bottom: 1px solid #f3f4f6;
}

.buscador-global-input-row > svg {
    flex-shrink: 0;
    color: #9ca3af;
}

.buscador-global-input-row input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: 17px;
    line-height: 1.3;
    color: #111827;
    font-family: inherit;
}

.buscador-global-input-row input::placeholder {
    color: #9ca3af;
}

.buscador-global-kbd {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: #9ca3af;
    background: #f3f4f6;
    border-radius: 6px;
    padding: 3px 7px;
    font-family: inherit;
}

.buscador-global-results {
    overflow-y: auto;
    padding: 8px 8px 12px;
}

.buscador-global-empty,
.buscador-global-loading {
    padding: 28px 20px 32px;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
}

.buscador-global-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.buscador-global-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #e5e7eb;
    border-top-color: #6b7280;
    border-radius: 50%;
    animation: buscadorGlobalSpin 0.7s linear infinite;
}

@keyframes buscadorGlobalSpin {
    to { transform: rotate(360deg); }
}

.buscador-global-group + .buscador-global-group {
    margin-top: 6px;
}

.buscador-global-group-title {
    padding: 8px 12px 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #9ca3af;
}

.buscador-global-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    padding: 9px 12px;
    border-radius: 10px;
    cursor: pointer;
    color: inherit;
    font-family: inherit;
}

.buscador-global-item:hover,
.buscador-global-item.is-active {
    background: #f3f4f6;
}

.buscador-global-item-icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: #f3f4f6;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
}

.buscador-global-item.is-active .buscador-global-item-icon,
.buscador-global-item:hover .buscador-global-item-icon {
    background: #fff;
}

.buscador-global-item-icon svg {
    width: 18px;
    height: 18px;
}

.buscador-global-item-body {
    min-width: 0;
    flex: 1;
}

.buscador-global-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.buscador-global-item-sub {
    margin-top: 2px;
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.buscador-global-item-snippet {
    margin-top: 2px;
    font-size: 12px;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .buscador-global-overlay {
        padding: 8vh 12px 24px;
    }

    .buscador-global-card {
        max-height: 80vh;
        border-radius: 14px;
    }
}
