/* Search Button Styles */
.search-button-container {
    display: inline-block;
    position: relative;
}

.search-button {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.3s ease;
}

.search-button:hover {
    color: #e50914;
}

/* Search Popup */
.search-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.search-popup-content {
    /* position: relative; */
    width: 90%;
    max-width: 800px;
    background-color: #1a1a1a;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
}

.search-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
    transition: all 0.3s ease;
    background-color: transparent!important;
}

.search-popup-close:hover {
    color: #e50914;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Search Form */
.search-form {
    width: 100%;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-field {
    width: 100%;
    height: 60px;
    background-color: #333;
    border: 2px solid #444;
    border-radius: 6px;
    padding: 0 60px 0 20px;
    font-size: 18px;
    color: #fff;
    transition: all 0.3s;
}

.search-field:focus {
    border-color: #e50914;
    outline: none;
    box-shadow: 0 0 0 2px rgba(229, 9, 20, 0.3);
}

.search-submit {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: all 0.3s;
}

.search-submit:hover {
    color: #e50914;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Loading Indicator */
.search-loading {
    display: none;
    text-align: center;
    padding: 20px 0;
}

.search-loading .spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #e50914;
    animation: spin 1s ease-in-out infinite;
}

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

/* Search Results */
.search-results {
    margin-top: 20px;
    max-height: 60vh;
    overflow-y: auto;
    color: #fff;
}

.search-results::-webkit-scrollbar {
    width: 8px;
}

.search-results::-webkit-scrollbar-track {
    background: #333;
    border-radius: 10px;
}

.search-results::-webkit-scrollbar-thumb {
    background: #666;
    border-radius: 10px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: #888;
}

.search-result-item {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
    transition: all 0.3s;
}

.search-result-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.search-result-image {
    width: 80px;
    min-width: 80px;
    height: 120px;
    border-radius: 4px;
    overflow: hidden;
    margin-right: 15px;
}

.search-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-info {
    flex: 1;
}

.search-result-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.search-result-title a {
    color: #fff;
    text-decoration: none;
    transition: all 0.3s;
}

.search-result-title a:hover {
    color: #e50914;
}

.search-result-meta {
    display: flex;
    flex-wrap: wrap;
    font-size: 14px;
    color: #999;
    margin-bottom: 10px;
}

.search-result-meta span {
    margin-right: 15px;
}

.search-result-meta span:last-child {
    margin-right: 0;
}

.search-result-excerpt {
    font-size: 14px;
    color: #bbb;
    line-height: 1.5;
}

.search-result-error {
    text-align: center;
    padding: 20px;
    color: #bbb;
    font-size: 16px;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .search-popup-content {
        width: 95%;
        margin: 50px auto;
        padding: 25px 15px 15px;
    }
    
    .search-results {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .search-result-image {
        height: 180px;
    }
    
    .search-field {
        padding: 12px;
        font-size: 16px;
    }
} 