/**
 * ===============================================================================
 * TripTiles - Spotlight Search (Cmd+K)
 * Eine Suche fuer alle Scopes: global, vault, knowhow, freunde
 * Developed by Toni Sciacca - mail@tonisciacca.com
 * ===============================================================================
 */

.spt-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(15, 18, 22, 0.45);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    display: none; align-items: flex-start; justify-content: center;
    padding-top: 12vh;
    animation: sptFadeIn 0.16s ease-out;
}
.spt-overlay.open { display: flex; }
@keyframes sptFadeIn { from { opacity: 0; } to { opacity: 1; } }

.spt-shell {
    width: 100%; max-width: 680px;
    background: var(--sh-card, #fff);
    border-radius: 18px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.32), 0 4px 16px rgba(0,0,0,0.18);
    overflow: hidden;
    font-family: 'Outfit', sans-serif;
    animation: sptPop 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex; flex-direction: column;
    max-height: 76vh;
}
@keyframes sptPop { from { transform: translateY(-12px) scale(0.98); opacity: 0; } to { transform: none; opacity: 1; } }

.spt-input-row {
    display: flex; align-items: center; gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--sh-border, #e8e8e8);
}
.spt-input-row [data-lucide] { width: 20px; height: 20px; color: var(--sh-text3, #9a9a9a); flex-shrink: 0; }
.spt-input {
    flex: 1; border: none; outline: none;
    font: inherit; font-size: 17px; font-weight: 400;
    color: var(--sh-text, #1a1a1a); background: transparent;
}
.spt-input::placeholder { color: var(--sh-text3, #9a9a9a); }
.spt-scope-tag {
    font-size: 11px; font-weight: 600; letter-spacing: 0.4px; text-transform: uppercase;
    color: var(--sh-pink, #FF385C);
    padding: 4px 10px; border-radius: 999px;
    background: var(--sh-pink-lt, rgba(255,56,92,0.08));
    flex-shrink: 0;
}
.spt-kbd {
    font-size: 11px; font-weight: 600;
    color: var(--sh-text3, #9a9a9a);
    padding: 3px 7px; border-radius: 5px;
    border: 1px solid var(--sh-border, #e8e8e8);
    background: var(--sh-bg, #f5f5f5);
    flex-shrink: 0;
}

.spt-scopes {
    display: flex; gap: 4px; padding: 8px 16px;
    border-bottom: 1px solid var(--sh-border, #e8e8e8);
    overflow-x: auto;
}
.spt-scope {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: 999px;
    background: transparent; border: 1px solid transparent;
    font: inherit; font-size: 12px; font-weight: 500;
    color: var(--sh-text2, #6b6b6b);
    cursor: pointer; white-space: nowrap;
    transition: all 0.12s;
}
.spt-scope [data-lucide] { width: 13px; height: 13px; }
.spt-scope:hover { background: var(--sh-bg, #f5f5f5); }
.spt-scope.active { background: var(--sh-pink-lt, rgba(255,56,92,0.08)); color: var(--sh-pink, #FF385C); border-color: var(--sh-pink, #FF385C); }

.spt-results {
    overflow-y: auto; flex: 1;
    padding: 8px 0;
}
.spt-empty {
    padding: 48px 24px; text-align: center;
    color: var(--sh-text3, #9a9a9a); font-size: 13px;
}
.spt-empty [data-lucide] { width: 32px; height: 32px; opacity: 0.4; margin-bottom: 8px; }
.spt-group-title {
    padding: 8px 20px 4px; font-size: 10px; font-weight: 700;
    letter-spacing: 0.6px; text-transform: uppercase;
    color: var(--sh-text3, #9a9a9a);
}
.spt-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 20px; cursor: pointer;
    transition: background 0.08s;
}
.spt-item:hover, .spt-item.focused { background: var(--sh-bg, #f5f5f5); }
.spt-item-icon {
    width: 36px; height: 36px; border-radius: 10px;
    background: var(--sh-bg, #f5f5f5);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; overflow: hidden;
}
.spt-item-icon img { width: 100%; height: 100%; object-fit: cover; }
.spt-item-icon [data-lucide] { width: 16px; height: 16px; color: var(--sh-text2, #6b6b6b); }
.spt-item-body { flex: 1; min-width: 0; }
.spt-item-title {
    font-size: 14px; font-weight: 500; color: var(--sh-text, #1a1a1a);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.spt-item-meta {
    font-size: 12px; color: var(--sh-text3, #9a9a9a);
    margin-top: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.spt-item-meta b { color: var(--sh-text2, #6b6b6b); font-weight: 500; }
.spt-item-trust {
    font-size: 10px; font-weight: 600;
    padding: 2px 6px; border-radius: 4px;
    background: var(--sh-pink-lt, rgba(255,56,92,0.08));
    color: var(--sh-pink, #FF385C);
    flex-shrink: 0;
}
.spt-item-trust.t-low  { background: rgba(245, 158, 11, 0.1); color: #b45309; }
.spt-item-trust.t-mid  { background: rgba(59, 130, 246, 0.1); color: #1d4ed8; }
.spt-item-trust.t-high { background: rgba(16, 185, 129, 0.1); color: #047857; }
.spt-item-action {
    font-size: 11px; color: var(--sh-text3, #9a9a9a); font-weight: 500;
    text-transform: uppercase; letter-spacing: 0.4px;
    flex-shrink: 0; padding-left: 8px;
}

.spt-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 20px;
    border-top: 1px solid var(--sh-border, #e8e8e8);
    background: var(--sh-bg, #f5f5f5);
    font-size: 11px; color: var(--sh-text3, #9a9a9a);
}
.spt-footer-hints { display: flex; gap: 14px; }
.spt-hint { display: inline-flex; align-items: center; gap: 4px; }
.spt-hint .spt-kbd { padding: 1px 5px; font-size: 10px; }

@media (max-width: 640px) {
    .spt-overlay { padding-top: 6vh; padding-left: 12px; padding-right: 12px; }
    .spt-shell { max-height: 88vh; }
    .spt-input { font-size: 16px; }
}
