/* Search Overlay Styles */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    /* Highest priority */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.close-search-btn {
    position: absolute;
    top: 40px;
    right: 60px;
    background: none;
    border: none;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    line-height: 1;
    z-index: 2001;
}

.search-container {
    width: 80%;
    max-width: 1200px;
    text-align: center;
    position: relative;
    height: 80%;
    display: flex;
    flex-direction: column;
}

.search-input {
    background: transparent;
    border: none;
    border-bottom: 2px solid #808080;
    font-size: 3rem;
    color: #fff;
    width: 100%;
    padding: 10px 0;
    outline: none;
    text-align: center;
    font-weight: bold;
    transition: border-color 0.3s;
    margin-bottom: 30px;
}

.search-input:focus {
    border-color: #fff;
}

.search-input::placeholder {
    color: #333;
}

/* Live Search Results container */
#live-search-results {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
    text-align: left;
}

/* Scrollbar for results */
#live-search-results::-webkit-scrollbar {
    width: 8px;
}

#live-search-results::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

#live-search-results::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Mobile Adjustments */
@media (max-width: 767px) {
    .close-search-btn {
        top: 20px;
        right: 20px;
        font-size: 2.5rem;
    }

    .search-input {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }

    .search-container {
        width: 90%;
    }
}