/* ============================================
   SocialPage.css - کادر لیست کانال‌های هر شبکه اجتماعی
   ============================================ */

/* ===== کادر لیست کانال‌ها ===== */
.social-page-box {
    position: fixed;
    top: 50%;
    left: 4rem;
    transform: translateY(-50%) translateX(-20px) scale(0.95);
    z-index: 1001;
    width: 90%;
    max-width: 420px;
    max-height: 70vh;
    overflow-y: auto;
    background: rgba(26, 42, 58, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-light, #ffffff);
    border: var(--border-md, 2px) solid var(--elam-gold, #d4a847);
    border-radius: var(--radius-lg, 16px);
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.45);
    padding: 1.5rem 1.5rem 1.2rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all var(--transition-bounce, 0.35s cubic-bezier(0.4, 0, 0.2, 1));
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
}

.social-page-box.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0) scale(1);
}

/* ===== هدر کادر ===== */
.social-page-box .social-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: var(--border-thin, 1px) solid rgba(212, 168, 71, 0.35);
}

.social-page-box .social-box-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--elam-gold, #d4a847);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.social-page-box .social-box-title img {
    width: 1.6rem;
    height: 1.6rem;
    object-fit: contain;
}

.social-page-box .social-box-close {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: var(--text-light, #ffffff);
    font-size: 1.4rem;
    width: 2.2rem;
    height: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-fast, 0.2s ease);
    flex-shrink: 0;
    line-height: 1;
}

.social-page-box .social-box-close:hover {
    background: rgba(228, 64, 95, 0.3);
    transform: rotate(90deg);
}

/* ===== لیست کانال‌ها ===== */
.channel-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

/* ===== آیتم کانال ===== */
.channel-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 0.9rem;
    background: rgba(255, 255, 255, 0.05);
    border: var(--border-thin, 1px) solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md, 12px);
    text-decoration: none;
    color: var(--text-light, #ffffff);
    transition: all var(--transition-md, 0.3s ease);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.channel-item::before {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    transition: right 0.6s ease;
    pointer-events: none;
}

.channel-item:hover::before {
    right: 100%;
}

.channel-item:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(-4px);
    border-color: rgba(212, 168, 71, 0.4);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* ===== آیکون کانال ===== */
.channel-item .channel-icon {
    width: 2.2rem;
    height: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    font-size: 1.2rem;
    transition: all var(--transition-md, 0.3s ease);
}

.channel-item:hover .channel-icon {
    transform: scale(1.15);
    background: rgba(212, 168, 71, 0.2);
}

/* ===== متن کانال ===== */
.channel-item .channel-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
    min-width: 0;
}

.channel-item .channel-name {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.channel-item .channel-desc {
    font-size: 0.75rem;
    opacity: 0.65;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== فلش انتهایی ===== */
.channel-item .channel-arrow {
    font-size: 1rem;
    opacity: 0.4;
    transition: all var(--transition-md, 0.3s ease);
    flex-shrink: 0;
}

.channel-item:hover .channel-arrow {
    opacity: 1;
    transform: translateX(-4px);
    color: var(--elam-gold, #d4a847);
}

/* ===== رنگ‌بندی اختصاصی هر شبکه ===== */
.social-page-box.eitaa {
    border-color: #00A693;
}
.social-page-box.eitaa .social-box-title {
    color: #00A693;
}
.social-page-box.eitaa .social-box-header {
    border-bottom-color: rgba(0, 166, 147, 0.35);
}
.social-page-box.eitaa .channel-item:hover {
    border-color: #00A693;
    background: rgba(0, 166, 147, 0.12);
}
.social-page-box.eitaa .channel-item:hover .channel-icon {
    background: rgba(0, 166, 147, 0.25);
}
.social-page-box.eitaa::-webkit-scrollbar-thumb {
    background: #00A693;
}

.social-page-box.whatsapp {
    border-color: #25D366;
}
.social-page-box.whatsapp .social-box-title {
    color: #25D366;
}
.social-page-box.whatsapp .social-box-header {
    border-bottom-color: rgba(37, 211, 102, 0.35);
}
.social-page-box.whatsapp .channel-item:hover {
    border-color: #25D366;
    background: rgba(37, 211, 102, 0.12);
}
.social-page-box.whatsapp .channel-item:hover .channel-icon {
    background: rgba(37, 211, 102, 0.25);
}
.social-page-box.whatsapp::-webkit-scrollbar-thumb {
    background: #25D366;
}

.social-page-box.instagram {
    border-color: #E4405F;
}
.social-page-box.instagram .social-box-title {
    color: #E4405F;
}
.social-page-box.instagram .social-box-header {
    border-bottom-color: rgba(228, 64, 95, 0.35);
}
.social-page-box.instagram .channel-item:hover {
    border-color: #E4405F;
    background: rgba(228, 64, 95, 0.12);
}
.social-page-box.instagram .channel-item:hover .channel-icon {
    background: rgba(228, 64, 95, 0.25);
}
.social-page-box.instagram::-webkit-scrollbar-thumb {
    background: #E4405F;
}

.social-page-box.rubika {
    border-color: #FF6B35;
}
.social-page-box.rubika .social-box-title {
    color: #FF6B35;
}
.social-page-box.rubika .social-box-header {
    border-bottom-color: rgba(255, 107, 53, 0.35);
}
.social-page-box.rubika .channel-item:hover {
    border-color: #FF6B35;
    background: rgba(255, 107, 53, 0.12);
}
.social-page-box.rubika .channel-item:hover .channel-icon {
    background: rgba(255, 107, 53, 0.25);
}
.social-page-box.rubika::-webkit-scrollbar-thumb {
    background: #FF6B35;
}

.social-page-box.telegram {
    border-color: #0088CC;
}
.social-page-box.telegram .social-box-title {
    color: #0088CC;
}
.social-page-box.telegram .social-box-header {
    border-bottom-color: rgba(0, 136, 204, 0.35);
}
.social-page-box.telegram .channel-item:hover {
    border-color: #0088CC;
    background: rgba(0, 136, 204, 0.12);
}
.social-page-box.telegram .channel-item:hover .channel-icon {
    background: rgba(0, 136, 204, 0.25);
}
.social-page-box.telegram::-webkit-scrollbar-thumb {
    background: #0088CC;
}

/* ===== اسکرول‌بار ===== */
.social-page-box::-webkit-scrollbar {
    width: 6px;
}
.social-page-box::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}
.social-page-box::-webkit-scrollbar-thumb {
    background: var(--elam-gold, #d4a847);
    border-radius: 3px;
}

/* ============================================
   واکنش‌گرایی
   ============================================ */

@media(max-width: 767px) {
    .social-page-box {
        left: 3.2rem;
        width: calc(100% - 3.8rem);
        max-width: none;
        max-height: 65vh;
        padding: 1.2rem 1.1rem 1rem;
    }
    .social-page-box .social-box-title {
        font-size: 1rem;
    }
    .social-page-box .social-box-title img {
        width: 1.4rem;
        height: 1.4rem;
    }
    .channel-item {
        padding: 0.6rem 0.7rem;
        gap: 0.7rem;
    }
    .channel-item .channel-icon {
        width: 1.9rem;
        height: 1.9rem;
        font-size: 1rem;
    }
    .channel-item .channel-name {
        font-size: 0.85rem;
    }
    .channel-item .channel-desc {
        font-size: 0.7rem;
    }
}

@media(min-width: 768px) and (max-width: 1023px) {
    .social-page-box {
        left: 3.8rem;
        width: 380px;
        max-height: 68vh;
    }
}

@media(min-width: 1024px) {
    .social-page-box {
        left: 4.2rem;
        max-width: 460px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .social-page-box,
    .channel-item {
        transition: none;
    }
}