/*
 * Spotlight-style global search modal — a translucent, blurred overlay
 * centered high on the screen (macOS Spotlight convention), not the
 * small inline filter-dd popup used elsewhere. See global-search.js.
 */

.gs-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e0e5eb;
    border-radius: 8px;
    padding: 7px 12px;
    background: #fff;
    color: #8a94a6;
    font-size: 13.5px;
    cursor: pointer;
}
.gs-trigger i {
    font-size: 15px;
}
.gs-trigger span {
    white-space: nowrap;
}
.gs-trigger kbd {
    margin-left: 6px;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 4px;
    background: #f1f2f6;
    color: #67748e;
    border: 1px solid #e2e5eb;
}

.gs-overlay {
    display: none;
    position: fixed;
    inset: 0;
    /* Comfortably above every z-index already in use in this theme
       (sidebar 1001, mobile sidebar 1041, assorted dropdowns/modals) —
       the overlay was rendering underneath the sidebar at 2000. */
    z-index: 99999;
    /* Real Spotlight dims AND blurs the desktop behind it — a light
       scrim alone (the previous blur(3px)) barely reads as glass since
       there's so little contrast to blur against a mostly-white app. */
    background: rgba(15, 18, 30, .28);
    backdrop-filter: blur(9px) saturate(120%);
    -webkit-backdrop-filter: blur(9px) saturate(120%);
    padding-top: 12vh;
}
.gs-overlay.open {
    display: block;
}

.gs-modal {
    width: min(640px, 92vw);
    max-height: 66vh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, .55);
    backdrop-filter: blur(40px) saturate(190%);
    -webkit-backdrop-filter: blur(40px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, .6);
    border-radius: 20px;
    /* Inset top highlight is what sells the "glass edge" look — a thin
       bright line where light would catch a physical pane of glass. */
    box-shadow:
        0 24px 70px rgba(15, 20, 40, .4),
        0 2px 8px rgba(15, 20, 40, .12),
        inset 0 1px 0 rgba(255, 255, 255, .8);
    overflow: hidden;
}

.gs-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(20, 24, 38, .08);
    flex-shrink: 0;
}
.gs-input-icon {
    color: #67748e;
    font-size: 20px;
    flex-shrink: 0;
}
.gs-input {
    flex: 1;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 18px;
    color: #1a2438;
}
.gs-input::placeholder {
    color: #9aa4b8;
}
.gs-esc-hint {
    flex-shrink: 0;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 5px;
    background: rgba(20, 24, 38, .06);
    color: #67748e;
    border: 1px solid rgba(20, 24, 38, .1);
}

.gs-loading {
    position: relative;
    height: 3px;
    margin: 0 18px;
    background: rgba(47, 90, 223, .12);
    border-radius: 2px;
    overflow: hidden;
    flex-shrink: 0;
}
.gs-loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: -40%;
    width: 40%;
    height: 100%;
    background: #2f5adf;
    border-radius: 2px;
    animation: gs-progress 1s ease-in-out infinite;
}
@keyframes gs-progress {
    0%   { left: -40%; }
    100% { left: 100%; }
}

.gs-results {
    overflow-y: auto;
    padding: 8px;
}
.gs-type-heading {
    padding: 8px 10px 4px;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #8a94a6;
}
.gs-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px;
    border-radius: 8px;
    cursor: pointer;
}
.gs-item:hover,
.gs-item.active {
    background: #eaf1fd;
}
.gs-item-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef1f6;
    color: #2f5adf;
    font-size: 15px;
}
.gs-item-text {
    min-width: 0;
    flex: 1;
}
.gs-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a2438;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gs-item-subtitle {
    font-size: 12px;
    color: #67748e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gs-item-type {
    flex-shrink: 0;
    font-size: 11px;
    color: #9aa4b8;
}

.gs-empty,
.gs-hint {
    padding: 28px 18px;
    text-align: center;
    color: #8a94a6;
    font-size: 13.5px;
}
