/**
 * AiDalil Unified Search Styles
 */


/* ==========================================
   🔍 أيقونة البحث في الهيدر
========================================== */

/* ديسكتوب */
.ai-search-wrapper {
    display: flex;
    align-items: center;
}

.ai-search-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #fff;
}

.ai-search-btn:hover {
    background: rgba(88, 243, 255, 0.1);
    border-color: #58f3ff;
    color: #58f3ff;
    transform: scale(1.05);
}

/* موبايل */
.mobile-search-wrapper {
    margin-bottom: 15px;
}

.mobile-search-btn {
    width: 100%;
    background: #15191e;
    padding: 20px;
    border-radius: 8px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-search-btn:hover {
    background: rgba(88, 243, 255, 0.1);
}

.mobile-search-btn i {
    font-size: 18px;
    color: #58f3ff;
}

.mobile-search-btn span {
    flex: 1;
    text-align: right;
    font-size: 14px;
}

/* ==========================================
   🔍 Modal البحث
========================================== */
#aiDalilSearchModal .modal-content {
    background: #1a222e;
    border: 1px solid rgba(88, 243, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

#aiDalilSearchModal .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#aiDalilSearchModal .modal-title {
    font-size: 20px;
    font-weight: 700;
}

#aiDalilSearchModal .modal-title i {
    color: #58f3ff;
}

/* Input Group */
.ai-modal-search-form .input-group {
    box-shadow: 0 4px 20px rgba(88, 243, 255, 0.1);
}

.ai-modal-search-form .form-control {
    border: 2px solid rgba(88, 243, 255, 0.2);
    padding: 15px 20px;
    font-size: 16px;
}

.ai-modal-search-form .form-control:focus {
    border-color: #58f3ff;
    box-shadow: 0 0 0 0.2rem rgba(88, 243, 255, 0.15);
    background: #0f141f;
}

.ai-modal-search-form .btn-primary {
    background: #58f3ff;
    color: #1a222e;
    border: none;
    padding: 0 25px;
    font-weight: 700;
}

.ai-modal-search-form .btn-primary:hover {
    background: #fff;
}

/* Suggestions */
.search-suggestion-tag {
    background: rgba(88, 243, 255, 0.1);
    color: #58f3ff;
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    border: 1px solid rgba(88, 243, 255, 0.2);
    transition: all 0.3s ease;
}

.search-suggestion-tag:hover {
    background: rgba(88, 243, 255, 0.2);
    border-color: #58f3ff;
    color: #58f3ff;
}

/* Search Types Badges */
.search-type-badge {
    padding: 12px 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.search-type-badge:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.search-type-badge i {
    font-size: 22px;
}

.search-type-badge small {
    font-size: 11px;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 576px) {
    .search-type-badge i {
        font-size: 18px;
    }
    
    .search-type-badge small {
        font-size: 10px;
    }
    
    .ai-modal-search-form .form-control {
        font-size: 14px;
        padding: 12px 15px;
    }
    
    .ai-modal-search-form .btn-primary {
        padding: 0 15px;
    }
}

/* Live Search Dropdown */
#ai-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a222e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-top: 10px;
    max-height: 500px;
    overflow-y: auto;
    z-index: 9999;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.search-loading,
.search-no-results,
.search-error {
    padding: 30px;
    text-align: center;
    color: #a0a0a0;
}

.search-loading i {
    color: #58f3ff;
    margin-left: 8px;
}

.live-search-section {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.live-search-section:last-child {
    border-bottom: none;
}

.live-search-type {
    font-size: 13px;
    font-weight: 700;
    color: #58f3ff;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.live-search-item {
    display: flex;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-bottom: 8px;
}

.live-search-item:hover {
    background: rgba(88, 243, 255, 0.05);
}

.live-search-thumb {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.live-search-content {
    flex-grow: 1;
    min-width: 0;
}

.live-search-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.live-search-desc {
    font-size: 12px;
    color: #a0a0a0;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.live-search-view-all {
    display: block;
    padding: 15px;
    text-align: center;
    background: rgba(88, 243, 255, 0.1);
    color: #58f3ff;
    text-decoration: none;
    font-weight: 600;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.live-search-view-all:hover {
    background: rgba(88, 243, 255, 0.2);
    color: #58f3ff;
}

/* Scrollbar */
#ai-search-results::-webkit-scrollbar {
    width: 8px;
}

#ai-search-results::-webkit-scrollbar-track {
    background: #0f141f;
}

#ai-search-results::-webkit-scrollbar-thumb {
    background: #58f3ff;
    border-radius: 4px;
}