/**
 * Search Overlay Styles
 */

/* Search Overlay */
#search-overlay {
    animation: fadeIn 0.3s ease-in-out;
}

#search-overlay.hidden {
    animation: fadeOut 0.3s ease-in-out;
}

/* Search Input Animation */
#search-input {
    transition: all 0.3s ease;
}

#search-input:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* Search Suggestions Container */
#search-suggestions {
    animation: slideDown 0.3s ease-in-out;
}

#search-suggestions.hidden {
    display: none;
}

/* Search Results Items */
#search-results a {
    position: relative;
}

#search-results a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--color-primary, #4F46E5);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

#search-results a:hover::before {
    transform: scaleY(1);
}

/* Text Highlighting */
mark {
    background-color: #fef3c7;
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

/* Line Clamp Utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Loading Spinner Animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Fade Out Animation */
@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Slide Down Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar Styling for Search Suggestions */
#search-suggestions::-webkit-scrollbar {
    width: 8px;
}

#search-suggestions::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0 8px 8px 0;
}

#search-suggestions::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

#search-suggestions::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    #search-overlay {
        padding-top: 60px;
    }

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