/* ============================================
   SEARCH STYLES
   ============================================ */

/* Search Container */
.search-container {
    position: relative;
}

.search-container-mobile {
    position: relative;
}

/* Search Input */
#search-input,
#search-input-mobile {
    transition: all 0.3s ease;
    background-color: #ffffff;
}

#search-input:focus,
#search-input-mobile:focus {
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#search-input::placeholder,
#search-input-mobile::placeholder {
    color: #cbd5e1;
}

/* Search Button */
#search-btn,
#search-btn-mobile {
    transition: all 0.2s ease;
}

#search-btn:hover,
#search-btn-mobile:hover {
    transform: scale(1.1);
}

/* Suggestions Dropdown */
#search-suggestions,
#search-suggestions-mobile {
    animation: slideDown 0.2s ease;
    backdrop-filter: blur(4px);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Suggestion Item */
.suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: inherit;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: #f0f9ff;
    color: #1e40af;
}

.suggestion-item.active {
    background-color: #dbeafe;
    color: #1e40af;
}

/* Suggestion Thumbnail */
.suggestion-thumbnail {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    background-color: #e2e8f0;
    flex-shrink: 0;
}

/* Suggestion Content */
.suggestion-content {
    flex: 1;
    min-width: 0;
}

.suggestion-title {
    font-weight: 500;
    font-size: 13px;
    color: #1e293b;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.suggestion-title:hover {
    color: #1e40af;
}

.suggestion-source {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
    opacity: 0.6;
}

.suggestion-source.program {
    color: #dc2626;
}

.suggestion-source.akd {
    color: #2563eb;
}

/* View All Button */
.view-all-suggestion {
    text-align: center;
    padding: 12px;
    background-color: #f8fafc;
    color: #3b82f6;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    text-decoration: none;
    display: block;
}

.view-all-suggestion:hover {
    background-color: #f1f5f9;
    color: #1e40af;
}

/* No Results */
.no-results {
    padding: 24px 16px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
}

.no-results-icon {
    font-size: 24px;
    margin-bottom: 8px;
    opacity: 0.5;
}

/* Loading State */
.suggestion-loading {
    padding: 12px 16px;
    text-align: center;
    color: #64748b;
    font-size: 12px;
}

.suggestion-loading::after {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: #64748b;
    margin-left: 4px;
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20%, 50%, 80%, 100% {
        opacity: 0.5;
    }
    40% {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .search-container {
        width: 100%;
    }

    #search-input {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .suggestion-item {
        padding: 10px 12px;
        gap: 10px;
    }

    .suggestion-thumbnail {
        width: 36px;
        height: 36px;
    }

    .suggestion-title {
        font-size: 12px;
    }

    #search-suggestions,
    #search-suggestions-mobile {
        max-height: 70vh;
    }
}
