/* =========================================================
   SHARED SITE SEARCH
   Loaded after page CSS so every page, including Careers, uses
   the same search-box dimensions and suggestion styling.
   ========================================================= */

.search-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    width: auto;
    min-width: 140px;
    max-width: 300px;
    z-index: 100;
}

.search-wrapper .search-box {
    flex: 0 0 auto;
    width: 100%;
    min-width: 140px;
    max-width: 300px;
    height: auto;
    padding: 0.55rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 0.9rem;
    outline: none;
    box-sizing: border-box;
    transition: background-color 0.2s, border-color 0.2s;
}

.search-wrapper .search-box::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

.search-wrapper .search-box:focus {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

.search-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(360px, 80vw);
    max-height: 420px;
    overflow-y: auto;
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #d9e2e8;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
    padding: 6px;
    z-index: 1000;
}

.search-suggestion {
    display: flex;
    flex-direction: column;
    padding: 10px 12px;
    border-radius: 7px;
    color: #1e293b;
    text-decoration: none;
}

.search-suggestion:hover,
.search-suggestion:focus,
.search-suggestion.keyboard-focus {
    background: #f0f7f7;
    outline: none;
}

.search-suggestion-title {
    font-size: 0.92rem;
    font-weight: 650;
    line-height: 1.25;
}

.search-loading,
.search-no-results {
    padding: 12px;
    color: #64748b;
    font-size: 0.86rem;
}

@media (max-width: 760px) {
    .search-wrapper {
        width: 100%;
        max-width: 300px;
        min-width: 0;
    }

    .search-wrapper .search-box {
        width: 100%;
        min-width: 0;
        max-width: 300px;
    }

    .search-suggestions {
        width: min(330px, 90vw);
        right: auto;
        left: 0;
    }
}
