﻿/* ==========================================================================
   header-search.css
   Styles for the shared SEARCH OVERLAY (_SearchOverlay.cshtml), used by both
   the landing header and the site-wide Horizontal header.

   - Base rules: the dark look (landing header).
   - .sp-search-overlay--light rules (bottom of file): the white look
     (site-wide header).

   Only overlay styles belong here. The search ICON is styled separately in
   each header's own CSS (header.css / site-header.css).
   ========================================================================== */


/* ----- Overlay: full-screen dimmed backdrop, hidden until .is-open ----- */
.sp-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 1060;
    font-family: 'Inter', sans-serif;
    background: rgba(10, 15, 13, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}

    .sp-search-overlay.is-open {
        opacity: 1;
        visibility: visible;
    }

    .sp-search-overlay svg {
        fill: none;
        stroke: currentColor;
    }


/* ----- Sheet: the panel that slides down from the top ----- */
.sp-search-sheet {
    padding: 28px 0 40px;
    color: var(--sp-white, #fff);
    background: var(--sp-ink, #12211D);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3);
    transform: translateY(-16px);
    transition: transform .3s ease;
}

.sp-search-overlay.is-open .sp-search-sheet {
    transform: translateY(0);
}

.sp-search-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}


/* ----- Top row: "Search" label + close (X) button ----- */
.sp-search-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.sp-search-eyebrow {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--sp-gold-light, #E0A84B);
}

.sp-search-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    color: inherit;
    background: none;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color .2s ease;
}

    .sp-search-close:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .sp-search-close svg {
        width: 22px;
        height: 22px;
    }


/* ----- Form row: icon + input + submit, with an underline ----- */
.sp-search-form {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 10px;
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.35);
    transition: border-color .2s ease;
}

    .sp-search-form:focus-within {
        border-color: var(--sp-white, #fff);
    }

.sp-search-form-icon {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    opacity: 0.7;
}


/* ----- Input: reset browser defaults ----- */
.sp-search-input {
    flex: 1;
    min-width: 0;
    padding: 0;
    font: inherit;
    color: var(--sp-white, #fff);
    background: transparent;
    border: 0;
    outline: 0;
}

    .sp-search-input::placeholder {
        color: rgba(255, 255, 255, 0.5);
    }

    .sp-search-input::-webkit-search-cancel-button {
        -webkit-appearance: none;
    }


/* ----- Input (dark): two classes so global input styles can't override the font ----- */
.sp-search-form .sp-search-input {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
}


/* ----- Submit button (dark): round arrow; the "Search" text label is hidden ----- */
.sp-search-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    padding: 0;
    color: var(--sp-white, #fff);
    background: var(--sp-terracotta, #B8613E);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color .2s ease;
}

    .sp-search-submit:hover {
        background: var(--sp-terracotta-dark, #9E4F31);
    }

    .sp-search-submit svg {
        width: 18px;
        height: 18px;
    }

.sp-search-submit-text {
    display: none;
}

/* ----- Mobile (dark): full-screen sheet, smaller input ----- */
@media (max-width: 600px) {
    .sp-search-sheet {
        min-height: 100vh;
        min-height: 100dvh;
        padding: 16px 0 32px;
    }

    .sp-search-form .sp-search-input {
        height: 48px;
        font-size: 17px;
    }
}


/* ----- Accessibility: no slide/fade for users who prefer reduced motion ----- */
@media (prefers-reduced-motion: reduce) {
    .sp-search-overlay,
    .sp-search-sheet {
        transition: none;
    }
}


/* ==========================================================================
   LIGHT VARIANT (.sp-search-overlay--light) — site-wide Horizontal header
   Overrides colors, borders, and button style only; layout comes from above.
   ========================================================================== */

/* ----- Backdrop + white sheet ----- */
.sp-search-overlay--light {
    font-family: 'Montserrat', sans-serif;
    background: rgba(20, 30, 45, 0.45);
}

    .sp-search-overlay--light .sp-search-sheet {
        color: #23395B;
        background: #fff;
        border-bottom: 1px solid #E5E7EA;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
    }

    .sp-search-overlay--light .sp-search-eyebrow {
        color: #5F6B78;
    }

    .sp-search-overlay--light .sp-search-close:hover {
        background: #F2F3F5;
    }


    /* ----- Form: bordered box instead of underline ----- */
    .sp-search-overlay--light .sp-search-form {
        gap: 10px;
        padding: 4px 4px 4px 14px;
        border: 1px solid #C1C5C8;
        border-radius: 4px;
    }

        .sp-search-overlay--light .sp-search-form:focus-within {
            border-color: #23395B;
        }

    .sp-search-overlay--light .sp-search-form-icon {
        width: 20px;
        height: 20px;
        color: #8A95A1;
        opacity: 1;
    }

    .sp-search-overlay--light .sp-search-form .sp-search-input {
        height: 44px;
        font-family: 'Montserrat', sans-serif;
        font-size: 17px;
        color: #23395B;
    }

    .sp-search-overlay--light .sp-search-input::placeholder {
        color: #8A95A1;
    }


    /* ----- Submit button: square navy with "Search" text, arrow hidden ----- */
    .sp-search-overlay--light .sp-search-submit {
        width: auto;
        height: 44px;
        padding: 0 22px;
        font-family: 'Montserrat', sans-serif;
        font-size: 14px;
        font-weight: 600;
        background: #23395B;
        border-radius: 3px;
    }

        .sp-search-overlay--light .sp-search-submit:hover {
            background: #1A2B45;
        }

        .sp-search-overlay--light .sp-search-submit svg {
            display: none;
        }

    .sp-search-overlay--light .sp-search-submit-text {
        display: inline;
    }

/* ----- Mobile (light): 16px input to avoid iOS zoom; arrow replaces "Search" text ----- */
@media (max-width: 600px) {
    .sp-search-overlay--light .sp-search-form .sp-search-input {
        font-size: 16px;
    }

    .sp-search-overlay--light .sp-search-submit {
        width: 40px;
        height: 40px;
        padding: 0;
    }

        .sp-search-overlay--light .sp-search-submit svg {
            display: block;
        }

    .sp-search-overlay--light .sp-search-submit-text {
        display: none;
    }
}
