/* css/search.css */

.search-results-container {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 1rem;
    padding-right: 5px;
    /* Custom Scrollbar for sleekness */
    scrollbar-width: thin;
    scrollbar-color: #20c997 #f1f1f1;
}

.search-results-container::-webkit-scrollbar {
    width: 6px;
}
.search-results-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
.search-results-container::-webkit-scrollbar-thumb {
    background: #20c997;
    border-radius: 10px;
}
.search-results-container::-webkit-scrollbar-thumb:hover {
    background: #198754;
}

.search-result-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 16px;
    margin-bottom: 10px;
    border-radius: 12px;
    background-color: #fff;
    border: 1px solid #eaeaea;
    transition: all 0.3s ease;
    text-decoration: none !important;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.search-result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.05);
    border-color: #20c997;
}

.search-result-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
    color: #20c997;
    font-size: 1.5rem;
}

.search-result-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.search-result-content {
    flex-grow: 1;
}

.search-result-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 4px;
    transition: color 0.2s ease;
}

.search-result-item:hover .search-result-title {
    color: #198754;
}

.search-result-excerpt {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-meta {
    margin-top: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-program {
    background-color: #e8f5e9;
    color: #2e7d32;
    padding: 3px 8px;
    border-radius: 4px;
}

.badge-news {
    background-color: #e3f2fd;
    color: #1565c0;
    padding: 3px 8px;
    border-radius: 4px;
}

.badge-event {
    background-color: #fff3e0;
    color: #e65100;
    padding: 3px 8px;
    border-radius: 4px;
}

.badge-page {
    background-color: #f3e5f5;
    color: #6a1b9a;
    padding: 3px 8px;
    border-radius: 4px;
}

/* AI Sparkle Icon */
.ai-sparkle {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
    color: #f37021;
    animation: sparkle 2s infinite ease-in-out;
    z-index: 10;
}

@keyframes sparkle {
    0% { opacity: 0.7; transform: translateY(-50%) scale(1); }
    50% { opacity: 1; transform: translateY(-50%) scale(1.1); color: #20c997; }
    100% { opacity: 0.7; transform: translateY(-50%) scale(1); }
}

#searchModalInput {
    padding-left: 55px !important;
}

/* Skeleton Loading State */
.skeleton-loader {
    display: flex;
    align-items: flex-start;
    padding: 12px 16px;
    margin-bottom: 10px;
    border-radius: 12px;
    background-color: #fff;
    border: 1px solid #eaeaea;
}

.skeleton-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background-color: #e9ecef;
    margin-right: 15px;
    flex-shrink: 0;
    animation: pulse 1.5s infinite ease-in-out;
}

.skeleton-text {
    flex-grow: 1;
}

.skeleton-line {
    height: 14px;
    background-color: #e9ecef;
    border-radius: 4px;
    margin-bottom: 8px;
    animation: pulse 1.5s infinite ease-in-out;
}

.skeleton-line.short {
    width: 60%;
}

.skeleton-line.title {
    height: 18px;
    width: 80%;
    margin-bottom: 12px;
}

@keyframes pulse {
    0% { background-color: #e9ecef; }
    50% { background-color: #f8f9fa; }
    100% { background-color: #e9ecef; }
}

.no-results {
    text-align: center;
    padding: 30px 20px;
    color: #6c757d;
}

.no-results i {
    font-size: 3rem;
    color: #dee2e6;
    margin-bottom: 15px;
}

.no-results h4 {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

/* Highlighted text */
.highlight {
    background-color: rgba(32, 201, 151, 0.2);
    font-weight: 600;
    padding: 0 2px;
    border-radius: 2px;
}
