/* hari-search.css - minimal styling for autocomplete and dropdown */
.header-search { position: relative; display:inline-block; margin-right:.6rem; vertical-align:middle; }
#header-search-input { padding:9px 12px; width:260px; border-radius:6px; border:1px solid #d0d7dd; }
#header-course-select { padding:9px 10px; border-radius:6px; border:1px solid #d0d7dd; margin-right:.6rem; }
.autocomplete-box { position:absolute; top:44px; left:0; width:320px; background:#fff; border:1px solid #eee; border-radius:6px; box-shadow:0 8px 24px rgba(0,0,0,0.08); z-index:9999; display:none; max-height:320px; overflow:auto; }
.autocomplete-item { padding:9px 12px; cursor:pointer; border-bottom:1px solid #f6f6f6; }
.autocomplete-item:hover { background:#f0f8ff; color:#0047b3; }
.autocomplete-item img { border-radius:6px; }
.hari-live-results {
    display:none;
    position:absolute;
    background:#fff;
    width:100%;
    border:1px solid #ddd;
    border-radius:6px;
    z-index:9999;
    max-height:250px;
    overflow-y:auto;
}

.hari-search-suggestion {
    padding:10px;
    cursor:pointer;
    border-bottom:1px solid #f1f1f1;
}

.hari-search-suggestion:hover {
    background:#eef7ff;
    color:#004b9a;
}

.hari-autocomplete-results {
    position: absolute;
    background: #fff;
    border: 1px solid #ddd;
    width: 100%;
    z-index: 9999;
    display: none;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.hari-ac-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.hari-ac-item:hover {
    background: #f0f7ff;
}

.hari-search-wrapper {
    position: relative;
}

.hari-ac-item {
    padding: 6px 10px;
    cursor: pointer;
}
.hari-ac-item.selected {
    background-color: #f0f0f0;
}




/* Search Form Container */
.hari-search-form {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

/* Search Input Styling */
.hari-search-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    outline: none;
    background: #fff;
}

.hari-search-input:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* Focused State for Parent Container */
.hari-search-focused .hari-search-input {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* Category Dropdown */
.hari-search-category {
    padding: 10px 14px;
    font-size: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    outline: none;
    background: #fff;
    cursor: pointer;
}

.hari-search-category:focus {
    border-color: #F8E6C2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* Autocomplete Results Container */
.hari-autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 2px solid #F8E6C2;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    animation: slideDown 0.2s ease;
}

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

/* Custom Scrollbar */
.hari-autocomplete-results::-webkit-scrollbar {
    width: 8px;
}

.hari-autocomplete-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0 0 8px 0;
}

.hari-autocomplete-results::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.hari-autocomplete-results::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Autocomplete Items */
.hari-ac-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

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

.hari-ac-item:hover,
.hari-ac-item.selected {
    background: #f5f9ff;
    padding-left: 20px;
}

.hari-ac-item.selected {
    background: #e8f2ff;
}

/* Icons */
.hari-ac-icon {
    flex-shrink: 0;
    color: #4a90e2;
    opacity: 0.7;
}

.hari-ac-title {
    flex: 1;
    font-size: 15px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hari-ac-arrow {
    flex-shrink: 0;
    color: #999;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.hari-ac-item:hover .hari-ac-arrow,
.hari-ac-item.selected .hari-ac-arrow {
    opacity: 1;
}

/* Loading State */
.hari-ac-loading {
    padding: 16px;
    text-align: center;
    color: #666;
    font-size: 14px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* No Results State */
.hari-ac-no-results {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* Error State */
.hari-ac-error {
    padding: 16px;
    text-align: center;
    color: #e74c3c;
    font-size: 14px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hari-search-input {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 10px 14px;
    }
    
    .hari-autocomplete-results {
        max-height: 300px;
    }
    
    .hari-ac-item {
        padding: 10px 14px;
    }
    
    .hari-ac-title {
        font-size: 14px;
    }
}





/* -------------------------------
   TWO DROPDOWNS SIDE BY SIDE
--------------------------------*/
.hari-search-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Course Dropdown (left) */
.hari-search-category {
    width: 50%;
    max-width: 50%;
}

/* Tutorial Dropdown (right) */
.hari-search-tutorial {
    width: 50%;
    max-width: 50%;
    padding: 10px 14px;
    font-size: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    transition: 0.3s ease;
}

/* Search box grows full width after dropdowns */
.hari-search-input {
    flex: 1;
}

/* Responsive: stack on mobile */
@media (max-width: 768px) {
    .hari-search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .hari-search-category,
    .hari-search-tutorial,
    .hari-search-input {
        width: 100%;
        max-width: 100%;
    }
}

