/* SR Site Search — Frontend Styles
   Brand: Navy #1B3A5C · Gold #C8973A · Font: DM Sans / Playfair Display
   -------------------------------------------------------------------- */

/* ── Trigger button (floating bottom-right) ── */
#srss-trigger {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9990;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #1B3A5C;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 18px rgba(27,58,92,.35);
    transition: background .2s, transform .15s;
}
#srss-trigger:hover {
    background: #C8973A;
    transform: scale(1.07);
}
#srss-trigger:focus-visible {
    outline: 3px solid #C8973A;
    outline-offset: 2px;
}

/* ── Overlay backdrop ── */
#srss-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(10, 20, 35, .72);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
    padding-inline: 16px;
    /* hidden via [hidden] attribute — JS removes the attribute to open */
}
#srss-overlay[hidden] {
    display: none;
}

/* ── Modal card ── */
#srss-modal {
    width: 100%;
    max-width: 640px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 24px 64px rgba(10,20,35,.4);
    overflow: hidden;
    font-family: 'DM Sans', sans-serif;
    animation: srss-drop .18s ease-out;
}
@keyframes srss-drop {
    from { opacity: 0; transform: translateY(-14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Input row ── */
#srss-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid #e8edf2;
    background: #f8f9fb;
}
.srss-icon-search {
    flex-shrink: 0;
    color: #7a8fa6;
}
#srss-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 17px;
    font-family: inherit;
    color: #1B3A5C;
    outline: none;
    line-height: 1.4;
}
#srss-input::placeholder {
    color: #a0b0c0;
}
/* Remove the native 'x' in WebKit */
#srss-input::-webkit-search-cancel-button { display: none; }

#srss-close {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border: none;
    background: none;
    cursor: pointer;
    color: #7a8fa6;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background .15s, color .15s;
    padding: 0;
}
#srss-close:hover { background: #eef2f7; color: #1B3A5C; }

/* ── Results list ── */
#srss-results {
    max-height: 420px;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.srss-result {
    display: block;
    padding: 14px 20px;
    text-decoration: none;
    border-bottom: 1px solid #f0f3f7;
    transition: background .12s;
    outline: none;
}
.srss-result:last-child { border-bottom: none; }
.srss-result:hover,
.srss-result:focus,
.srss-result[aria-selected="true"] {
    background: #f2f7fd;
}
.srss-result-type {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #C8973A;
    background: #fdf4e7;
    border-radius: 4px;
    padding: 2px 7px;
    margin-bottom: 5px;
}
.srss-result-title {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #1B3A5C;
    line-height: 1.35;
    margin-bottom: 4px;
}
.srss-result-excerpt {
    display: block;
    font-size: 13px;
    color: #5a6e82;
    line-height: 1.5;
}

/* ── Status messages (loading / no results) ── */
.srss-status {
    padding: 22px 20px;
    text-align: center;
    font-size: 14px;
    color: #7a8fa6;
}
.srss-loading-dots::after {
    content: '';
    display: inline-block;
    animation: srss-dots 1.2s steps(4, end) infinite;
    width: 1.4em;
    text-align: left;
}
@keyframes srss-dots {
    0%  { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
}

/* ── Footer ── */
#srss-footer {
    padding: 8px 18px;
    border-top: 1px solid #f0f3f7;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    background: #f8f9fb;
}
#srss-powered {
    font-size: 11px;
    color: #a0b0c0;
    letter-spacing: .03em;
}

/* ── Keyboard hint chips ── */
.srss-keys {
    margin-left: auto;
    display: flex;
    gap: 6px;
}
kbd {
    display: inline-block;
    font-size: 10px;
    background: #eef2f7;
    border: 1px solid #d0dae5;
    border-radius: 4px;
    padding: 1px 5px;
    color: #5a6e82;
    font-family: monospace;
}

/* ── Mobile ── */
@media (max-width: 600px) {
    #srss-overlay { padding-top: 0; align-items: flex-end; }
    #srss-modal {
        border-radius: 16px 16px 0 0;
        max-height: 80vh;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    #srss-results { flex: 1; }
    #srss-trigger { bottom: 20px; right: 16px; }
}
