/**
 * تنسيقات فلتر الماركات باللوجوهات
 * تصميم حديث وجذاب لعرض لوجوهات الماركات
 */

/* بطاقة اللوجو */
.brand-logo-card {
    display: block;
    position: relative;
}

/* إطار اللوجو */
.brand-logo-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70px;
    padding: 0.75rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

/* تأثيرات التمرير */
.brand-logo-card:hover .brand-logo-wrapper {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

/* الحالة المحددة */
.brand-logo-wrapper.brand-logo-selected {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* حاوية الصورة */
.brand-logo-image {
    width: 100%;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.brand-logo-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(20%);
    transition: filter 0.3s ease;
}

.brand-logo-card:hover .brand-logo-image img {
    filter: grayscale(0%);
}

.brand-logo-selected .brand-logo-image img {
    filter: grayscale(0%) brightness(1.05);
}

/* حاوية النص (للماركات بدون لوجو) */
.brand-logo-text {
    width: 100%;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.5rem;
}

/* عداد الإعلانات */
.brand-count {
    position: absolute;
    top: 4px;
    left: 4px;
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

/* علامة الاختيار */
.brand-checkmark {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: #3b82f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
    z-index: 10;
}

.brand-checkmark-visible {
    opacity: 1;
    transform: scale(1);
}

/* تأثير النبض للعنصر المحدد */
@keyframes brand-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(59, 130, 246, 0);
    }
}

.brand-logo-selected {
    animation: brand-pulse 2s ease-in-out infinite;
}

/* تحسين الاستجابة */
@media (min-width: 640px) {
    .brand-logo-wrapper {
        min-height: 80px;
    }
    
    .brand-logo-image,
    .brand-logo-text {
        height: 50px;
    }
}

@media (min-width: 1024px) {
    .brand-logo-wrapper {
        min-height: 75px;
    }
    
    .brand-logo-image,
    .brand-logo-text {
        height: 48px;
    }
}

/* تحسين الطباعة */
.brand-logo-text span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

/* تأثير التحميل للصور */
.brand-logo-image img {
    opacity: 0;
    animation: fadeIn 0.5s ease-in forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* تحسين إمكانية الوصول */
.brand-radio:focus + .brand-logo-wrapper {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* حالة التعطيل */
.brand-logo-card.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* تأثير الضغط */
.brand-logo-card:active .brand-logo-wrapper {
    transform: scale(0.98);
}

