/* wwwroot/css/search-styles.css */

/* تحسينات البحث */
.search-highlight {
    background-color: #fff3cd;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
}

.device-card {
    transition: all 0.3s ease;
    border-left: 4px solid #007bff;
}

    .device-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }

.search-stats {
    font-size: 0.875rem;
}

/* تحسينات التصفية */
.filter-group {
    background: #f8f9fa;
    border-radius: 5px;
    padding: 15px;
}

/* تحسينات الـ input */
.search-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

/* تصميم العدادات */
.counter-card {
    transition: transform 0.2s ease-in-out;
    border: none;
}

    .counter-card:hover {
        transform: translateY(-2px);
    }

/* شريط البحث */
.search-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* زر البحث المتقدم */
.advanced-search-btn {
    border: 1px solid #dee2e6;
    background: white;
}

    .advanced-search-btn:hover {
        background: #f8f9fa;
    }

/* رسائل البحث */
.no-results {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
}

/* تحسينات الـ dropdown */
.enhanced-dropdown {
    max-height: 300px;
    overflow-y: auto;
}

/* تأثيرات للبحث النشط */
.search-active {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}

/* تصميم متجاوب */
@media (max-width: 768px) {
    .search-advanced {
        font-size: 0.875rem;
    }

    .filter-buttons .btn {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }

    .counter-card .card-body {
        padding: 1rem 0.5rem;
    }

    .counter-card h4 {
        font-size: 1.2rem;
    }
}

/* أنيميشن للبحث */
@keyframes searchPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}

.search-pulse {
    animation: searchPulse 0.5s ease-in-out;
}

/* تلميحات البحث */
.search-tooltip {
    position: relative;
    cursor: help;
}

    .search-tooltip:hover::after {
        content: attr(data-tooltip);
        position: absolute;
        bottom: 100%;
        left: 50%;
        transform: translateX(-50%);
        background: #333;
        color: white;
        padding: 5px 10px;
        border-radius: 4px;
        font-size: 0.8rem;
        white-space: nowrap;
        z-index: 1000;
    }

/* تحسين الظلال */
.card.search-card {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: none;
}

/* ألوان للفلاتر المختلفة */
.filter-brand {
    border-left: 3px solid #007bff;
}

.filter-category {
    border-left: 3px solid #28a745;
}

.filter-sort {
    border-left: 3px solid #ffc107;
    /* تظليل النتائج في البحث */
    .search-highlight

{
    background-color: #fff3cd;
    color: #856404;
    padding: 0.1em 0.2em;
    border-radius: 3px;
    font-weight: bold;
}

/* بطاقات مظللة عند البحث */
.search-highlight-card {
    border-left: 4px solid #ffc107 !important;
    background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
}

/* ألوان مختلفة لأنواع البطاقات */
.device-card-new {
    border-left: 4px solid #28a745 !important;
}

.device-card-warning {
    border-left: 4px solid #ffc107 !important;
}

.device-card-danger {
    border-left: 4px solid #dc3545 !important;
}

/* تدرج ألوان بناءً على عدد السيريالات */
.device-card-high-serials {
    border-left: 4px solid #007bff !important;
}

.device-card-medium-serials {
    border-left: 4px solid #6f42c1 !important;
}

.device-card-low-serials {
    border-left: 4px solid #e83e8c !important;
}

/* تأثيرات hover مع ألوان */
.device-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

/* ألوان للبادجات بناءً على المحتوى */
.badge-brand {
    background-color: #6f42c1 !important;
}

.badge-category {
    background-color: #20c997 !important;
}

.badge-model {
    background-color: #fd7e14 !important;
}

/* تلوين النتائج بناءً على المطابقة */
.match-exact {
    background-color: #d4edda !important;
    border-color: #c3e6cb !important;
}

.match-partial {
    background-color: #fff3cd !important;
    border-color: #ffeaa7 !important;
}

/* تدرج لوني للعدادات */
.counter-card-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
}

.counter-card-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%) !important;
}

.counter-card-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%) !important;
}

.counter-card-info {
    background: linear-gradient(135deg, #17a2b8 0%, #117a8b 100%) !important;
    /* تظليل السيريالات المطابقة */
    .serial-highlight

{
    background-color: #d4edda !important;
    color: #155724 !important;
    padding: 0.1em 0.3em;
    border-radius: 3px;
    font-weight: bold;
}

.serial-search-highlight {
    border-left: 4px solid #28a745 !important;
    background: linear-gradient(135deg, #f8fff9 0%, #ffffff 100%);
}

.serial-card-match {
    border-left: 3px solid #28a745 !important;
    background-color: #f8fff9 !important;
}

.accessory-item-match {
    border-left: 3px solid #20c997 !important;
    background-color: #f8fefd !important;
}

/* تظليل عام للبحث */
.search-highlight {
    background-color: #fff3cd;
    color: #856404;
    padding: 0.1em 0.2em;
    border-radius: 3px;
    font-weight: bold;
    /* تظليل البحث */
    .search-highlight

{
    background-color: #fff3cd;
    color: #856404;
    padding: 0.1em 0.2em;
    border-radius: 3px;
    font-weight: bold;
}

.serial-highlight {
    background-color: #d4edda !important;
    color: #155724 !important;
    padding: 0.1em 0.3em;
    border-radius: 3px;
    font-weight: bold;
}

.serial-search-highlight {
    border-left: 4px solid #28a745 !important;
}

.serial-card-match {
    border-left: 3px solid #28a745 !important;
}

.accessory-item-match {
    border-left: 3px solid #20c997 !important;
}

/* تحسينات الطي والتوسيع */
.toggle-serial-btn {
    transition: all 0.3s ease;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .toggle-serial-btn:hover {
        transform: scale(1.05);
        background-color: #e7f3ff;
    }

.device-card {
    transition: all 0.2s ease;
}

    .device-card:hover {
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
}
