/* ═══════════════════════════════════════════════════════
   SKYLINE GLOBAL SEARCH — Command Palette
   ═══════════════════════════════════════════════════════ */

/* Overlay */
.sgs-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 53, 71, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12vh;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s, visibility .2s;
}
.sgs-overlay.sgs-visible {
    opacity: 1;
    visibility: visible;
}

/* Palette card */
.sgs-palette {
    width: 580px;
    max-width: 94vw;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(15, 53, 71, 0.3);
    overflow: hidden;
    transform: translateY(-20px) scale(0.97);
    transition: transform .25s ease;
}
.sgs-overlay.sgs-visible .sgs-palette {
    transform: translateY(0) scale(1);
}

/* Search header */
.sgs-header {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #fafbfc;
}
.sgs-search-icon {
    color: #14b8a6;
    font-size: 16px;
    margin-right: 12px;
    flex-shrink: 0;
}
.sgs-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    font-weight: 500;
    color: #1e293b;
    background: transparent;
    font-family: inherit;
}
.sgs-input::placeholder {
    color: var(--sk-text-3, #66727f);
    font-weight: 400;
}
.sgs-esc-badge {
    background: #f1f5f9;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 5px;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
    margin-left: 10px;
}

/* Results */
.sgs-results {
    max-height: 360px;
    overflow-y: auto;
    padding: 8px;
}
/* scrollbar painting moved to sk-scrollbar.css (app-wide Signature Line standard) */

.sgs-result {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: #1e293b;
    transition: background .12s;
    gap: 12px;
}
.sgs-result:hover,
.sgs-result:focus {
    text-decoration: none;
    color: #1e293b;
}
.sgs-result.sgs-active {
    background: linear-gradient(135deg, #ecfdf5, #f0fdfa);
}
.sgs-result-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, #1e3a5f, #0f3547);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sgs-result-icon i {
    color: #14b8a6;
    font-size: 14px;
}
.sgs-result-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.sgs-result-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sgs-result-path {
    font-size: 12px;
    color: var(--sk-text-3, #66727f);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sgs-empty {
    text-align: center;
    padding: 32px 20px;
    color: var(--sk-text-3, #66727f);
    font-size: 14px;
}
.sgs-empty i {
    margin-right: 6px;
}

/* Footer */
.sgs-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 20px;
    border-top: 1px solid #e2e8f0;
    background: #fafbfc;
    font-size: 12px;
    color: var(--sk-text-3, #66727f);
}
.sgs-footer-count {
    margin-right: auto;
}
.sgs-footer kbd {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 12px;
    color: #64748b;
    font-family: inherit;
}

/* Header search button */
.sgs-header-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    /* teal-700 -> teal-800: white on the old #14b8a6 stop measured 2.49:1, well under the
       4.5:1 WCAG 1.4.3 requires for this 13px label. Both new stops clear it (5.47 / 7.58). */
    background: linear-gradient(135deg, #0f766e, #115e59);
    color: #fff !important;
    border: none;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
    text-decoration: none !important;
}
.sgs-header-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(20, 184, 166, 0.3);
    color: #fff !important;
}
/* A translucent WHITE chip on a teal button lightens the surface under the label:
   rgba(255,255,255,.85) text on it measures 3.14:1. Darkening the chip instead of the
   text keeps the shortcut legible (8.29:1) and the button's colour unchanged.
   2026-08-25: re-verified by sampling the RENDERED pixels -- the chip's real fill is
   rgb(12,49,55), i.e. 13.91:1 under white. A computed-style model briefly put this at
   4.17:1 by resolving the backdrop to the teal button; the chip actually sits over the
   dark header. Translucent fills stacked over a gradient cannot be judged from
   getComputedStyle -- rasterise and read the pixels. */
.sgs-header-btn kbd {
    background: rgba(0,0,0,.25);
    border: none;
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 12px;
    color: #fff;
    font-family: inherit;
}

/* RTL */
[dir="rtl"] .sgs-search-icon {
    margin-right: 0;
    margin-left: 12px;
}
[dir="rtl"] .sgs-esc-badge {
    margin-left: 0;
    margin-right: 10px;
}
[dir="rtl"] .sgs-empty i {
    margin-right: 0;
    margin-left: 6px;
}
[dir="rtl"] .sgs-footer-count {
    margin-right: 0;
    margin-left: auto;
}

/* Responsive */
@media (max-width: 767px) {
    .sgs-overlay {
        padding-top: 5vh;
    }
    .sgs-palette {
        border-radius: 12px;
    }
    .sgs-header-btn span.hidden-xs {
        display: none;
    }
}
