﻿
/* ─── Search Panel ──────────────────────────────── */
.navbar-search {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #F7F7F7;
    z-index: 9999;
    padding: 32px 25.6px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    animation: slideDown 0.2s ease;
    height: auto;
    gap: 25.6px;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 600px) {
    .navbar-search {
        max-height: 85vh;
        padding: 16px 12.8px;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.search-bar__input-container {
    position: relative;
}

.search-bar__input-group {
    display: flex;
    align-items: center;
    border: 1.07px solid #CCCCCC;
    border-radius: 8px;
    padding: 8px 12px;
    background: #FFFFFF;
}

    .search-bar__input-group:focus-within {
        border-color: #003366;
        background: #fff;
    }

.search-bar__icon {
    color: #888;
    margin-inline-end: 10px;
}

.search-bar__input {
    flex:1;
    font-family: Co Headline;
    font-weight: 400;
    font-size: 14px;
    line-height: 100%;
    letter-spacing: 0%;
    color: #C3C3C3;
}

.search-bar__button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    color: #888;
}

.search-bar__close {
    font-size: 20px;
}

/* ─── Autocomplete ──────────────────────────────── */
.search-bar__autocomplete {
    /* keep autocomplete inside the flow so the panel height follows content */
    position: static;
    margin-top: 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

@media (max-width: 900px) {
    .search-bar__autocomplete {
        max-height: 500px;
    }
}

@media (max-width: 600px) {
    .search-bar__autocomplete {
        max-height: 300px;
    }
}

.search-bar__ac-item {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 80px;
    padding: 16px 24px;
    background: #FFFFFF;
    color: #003B70;
    text-decoration: none;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.2;
    border-radius: 8px;
    gap: 8px;
    opacity: 1;
    box-shadow: 0px 4.27px 8.53px 0px #00000014;
    flex: 0 0 calc((100% - 80px) / 5);
    max-width: calc((100% - 80px) / 5);
}

    .search-bar__ac-item:hover {
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
        transform: translateY(-1px);
    }

    .search-bar__ac-item i {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 72px;
        height: 72px;
        border-radius: 16px;
        background: #EEF1F5;
        color: #0A4B84;
        font-size: 34px;
        flex-shrink: 0;
    }

@media (max-width: 1600px) {
    .search-bar__ac-item {
        flex-basis: calc((100% - 60px) / 4);
        max-width: calc((100% - 60px) / 4);
    }
}

@media (max-width: 1200px) {
    .search-bar__ac-item {
        flex-basis: calc((100% - 40px) / 3);
        max-width: calc((100% - 40px) / 3);
    }
}

@media (max-width: 900px) {
    .search-bar__ac-item {
        flex-basis: calc((100% - 20px) / 2);
        max-width: calc((100% - 20px) / 2);
    }
}

@media (max-width: 600px) {
    .search-bar__ac-item i {
        width: 60px;
        height: 60px;
        font-size: 30px;
    }
    .search-bar__ac-item {
        flex-basis: 100%;
        max-width: 100%;
    }
}

.search-bar__ac-title {
    font-family: Co Headline;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.2;
    color: #003B70;
    display: block;
}

.search-bar__ac-desc {
    font-family: Co Headline;
    font-weight: 400;
    font-size: 14px;
    line-height: 100%;
    letter-spacing: 0%;
    color: #003B70;
    margin-top: 0;
    display: block;
}

/* ─── Quick Links / Recent ──────────────────────── */
.search-bar__block {
    padding-top: 20px;
}

.search-bar__section {
    margin-bottom: 20px;
}

.search-bar__title {
    color: #003B70;
    text-transform: uppercase;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    font-family: Co Headline;
    font-weight: 400;
    font-size: 14.93px;
    line-height: 100%;
    letter-spacing: 0%;
}

.search-bar__suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.search-bar__suggestions-item {
    flex: 0 0 calc((100% - 80px) / 5);
    max-width: calc((100% - 80px) / 5);
}

@media (max-width: 1600px) {
    .search-bar__suggestions-item {
        flex-basis: calc((100% - 60px) / 4);
        max-width: calc((100% - 60px) / 4);
    }
}

@media (max-width: 1200px) {
    .search-bar__suggestions-item {
        flex-basis: calc((100% - 40px) / 3);
        max-width: calc((100% - 40px) / 3);
    }
}

@media (max-width: 900px) {
    .search-bar__suggestions-item {
        flex-basis: calc((100% - 20px) / 2);
        max-width: calc((100% - 20px) / 2);
    }
}

@media (max-width: 600px) {
    .search-bar__suggestions-item {
        flex-basis: 100%;
        max-width: 100%;
    }
}

.search-bar__suggestions-item a {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 80px;
    padding: 18px 20px;
    background: #FFFFFF;
    color: #003B70;
    text-decoration: none;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.2;
    border-radius: 8px;
    gap: 8px;
    opacity: 1;
    padding-top: 16px;
    padding-right: 24px;
    padding-bottom: 16px;
    padding-left: 24px;
    box-shadow: 0px 4.27px 8.53px 0px #00000014;
}

    .search-bar__suggestions-item a i {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 72px;
        height: 72px;
        border-radius: 16px;
        background: #EEF1F5;
        color: #0A4B84;
        font-size: 34px;
        flex-shrink: 0;
    }

    .search-bar__suggestion-icon {
        width: 60px;
        height: 60px;
        border-radius: 16px;
        background: #EEF1F5;
        object-fit: contain;
        padding: 12px;
        flex-shrink: 0;
    }

.search-bar__suggestions-item span {
    font-family: Co Headline;
    font-weight: 400;
    font-size: 14px;
    line-height: 100%;
    letter-spacing: 0%;
    color: #003B70;
}

    .search-bar__suggestions-item a:hover {
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
        transform: translateY(-1px);
    }

.tab-item__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    background: #f0f4f8;
    color: #003366;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
}

    .tab-item__link:hover {
        background: #003366;
        color: #fff;
    }

.search-bar__recent {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.js-recent-clear {
    font-size: 12px;
    color: #888;
    cursor: pointer;
}

body.search-open {
    overflow-y: auto;
}
