/**
 * Enhanced Search Overlay Styles
 * Full-site search with filters and popular terms
 */

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.search-overlay-inner {
    width: 90%;
    max-width: 800px;
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.search-overlay-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 5px 10px;
    transition: color 0.3s ease;
    z-index: 10;
}

.search-overlay-close:hover {
    color: #333;
}

.search-overlay-content {
    margin-top: 10px;
}

.search-overlay-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 25px;
    color: #333;
}

/* Search Form */
.search-form {
    margin-bottom: 30px;
}

.search-form-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 50px;
    padding: 5px;
    transition: background 0.3s ease;
}

.search-form-wrapper:focus-within {
    background: #e8e8e8;
}

.search-field {
    flex: 1;
    border: none;
    background: transparent;
    padding: 15px 25px;
    font-size: 16px;
    color: #333;
    outline: none;
}

.search-field::placeholder {
    color: #999;
}

.search-submit {
    background: #007bff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #fff;
}

.search-submit:hover {
    background: #0056b3;
    transform: scale(1.05);
}

.search-submit svg {
    width: 20px;
    height: 20px;
}

/* Search Filters */
.search-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.search-filter-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 16px;
    background: #f5f5f5;
    border-radius: 20px;
    transition: all 0.3s ease;
    user-select: none;
}

.search-filter-label:hover {
    background: #e0e0e0;
}

.search-filter-label input[type="radio"] {
    margin-right: 8px;
    cursor: pointer;
}

.search-filter-label input[type="radio"]:checked + span {
    font-weight: 600;
    color: #007bff;
}

.search-filter-label span {
    font-size: 14px;
    color: #666;
    transition: color 0.3s ease;
}

/* Popular Search Terms */
.search-popular-terms {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.search-popular-terms h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.popular-terms-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.popular-term {
    display: inline-block;
    padding: 8px 16px;
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.popular-term:hover {
    background: #007bff;
    color: #fff;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-overlay-inner {
        width: 95%;
        padding: 30px 20px;
        max-height: 95vh;
    }
    
    .search-overlay-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .search-field {
        padding: 12px 20px;
        font-size: 15px;
    }
    
    .search-submit {
        width: 45px;
        height: 45px;
    }
    
    .search-filters {
        gap: 10px;
    }
    
    .search-filter-label {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .popular-term {
        padding: 6px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .search-overlay-inner {
        padding: 25px 15px;
    }
    
    .search-overlay-title {
        font-size: 20px;
    }
    
    .search-overlay-close {
        font-size: 28px;
        top: 10px;
        right: 10px;
    }
    
    .search-field {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .search-submit {
        width: 40px;
        height: 40px;
    }
    
    .search-filters {
        flex-direction: column;
        gap: 8px;
    }
    
    .search-filter-label {
        width: 100%;
        justify-content: center;
    }
}

/* Animation */
@keyframes searchOverlayIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.search-overlay.active .search-overlay-inner {
    animation: searchOverlayIn 0.3s ease;
}

/* Loading State */
.search-form.loading .search-submit {
    pointer-events: none;
    opacity: 0.6;
}

.search-form.loading .search-submit svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Focus States */
.search-field:focus {
    outline: none;
}

.search-submit:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.search-filter-label:focus-within {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.popular-term:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

