/* plugin/noonserv-iptv-widget/assets/css/noonserv-iptv-styles.css */

/* استيراد خط Google Fonts (Tajawal) */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;700&display=swap');

/* تنسيق عام للويدجت (مشترك بين الاثنين) */
.noonserv-adv-channel-list-widget {
    padding: 1.5rem;
    background: #F5F5DC;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    max-width: 1280px;
    margin: 1rem auto;
    font-family: 'Tajawal', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    direction: rtl;
    text-align: right;
}

.noonserv-adv-channel-list-widget h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1E3A8A;
    margin-bottom: 1rem;
    text-align: center;
}

/* حاوية لتوزيع البحث وعدد القنوات والتصنيفات */
.noonserv-filter-search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
    width: 100%;
    flex-wrap: wrap;
    direction: rtl;
}

.noonserv-filter-search-container input,
.noonserv-filter-search-container select,
.noonserv-channel-count-container {
    width: 100%;
    max-width: 200px;
    padding: 0.75rem 1rem;
    border: 1px solid #1E3A8A;
    border-radius: 8px;
    font-size: 0.95rem;
    box-sizing: border-box;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    font-family: 'Tajawal', 'Arial', sans-serif;
}

/* تخصيصات الويدجت العادية (Regular) */
.regular-widget .noonserv-filter-search-container input,
.regular-widget .noonserv-channel-count-container {
    background: #FFFFFF;
}

.regular-widget #noonserv-adv-channel-search {
    color: #4B5563;
}

.regular-widget .noonserv-channel-count {
    color: #1E3A8A;
}

.regular-widget .noonserv-channel-count-label {
    color: #4B5563;
}

/* تخصيصات الويدجت المميزة (VIP) */
.vip-widget .noonserv-filter-search-container input,
.vip-widget .noonserv-channel-count-container {
    background: #FFD700;
}

.vip-widget #noonserv-adv-vip-channel-search {
    color: #1E3A8A;
}

.vip-widget .noonserv-channel-count,
.vip-widget .noonserv-channel-count-label {
    color: #1E3A8A;
}

.vip-widget #noonserv-adv-channel-category-filter {
    background: #FFD700;
}

/* تأثير التركيز */
.noonserv-filter-search-container input:focus,
.noonserv-filter-search-container select:focus {
    border-color: #FFD700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
    outline: none;
}

/* حاوية عدد القنوات */
.noonserv-channel-count-container {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.noonserv-channel-count-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.noonserv-channel-count {
    font-size: 1rem;
    font-weight: 700;
    margin-right: 0.5rem;
    white-space: nowrap;
}

.noonserv-channel-count-label {
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
}

/* عناصر التحكم في عدد القنوات */
.noonserv-channel-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    background: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    direction: rtl;
}

.noonserv-channel-count.hidden {
    display: none;
}

.noonserv-toggle-channel-count {
    padding: 0.5rem 1rem;
    background: #FFD700;
    color: #1E3A8A;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.noonserv-toggle-channel-count:hover {
    background: #1E3A8A;
    color: #FFFFFF;
    transform: scale(1.05);
}

/* تنسيق الشبكة باستخدام Flex */
.noonserv-adv-channel-content {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 0;
    margin: 0;
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
}

.noonserv-adv-channel-item {
    flex: 0 0 calc(25% - 20px);
    max-width: calc(25% - 20px);
    background: #FFFFFF;
    border-radius: 12px;
    padding: 0.75rem;
    text-align: center;
    cursor: pointer;
    border: 1px solid #1E3A8A;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    font-family: 'Tajawal', 'Arial', sans-serif;
    box-sizing: border-box;
}

.regular-widget .noonserv-adv-channel-item {
    min-height: auto;
}

.vip-widget .vip-channel-item {
    flex: 1 1 calc(25% - 20px);
    max-width: calc(25% - 20px);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid;
}

.noonserv-adv-channel-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    border-color: #FFD700;
}

.vip-widget .vip-channel-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.noonserv-adv-channel-item img,
.vip-widget .vip-channel-item img {
    width: 100%;
    max-width: 100px;
    height: auto;
    max-height: 60px;
    object-fit: contain;
    border-radius: 8px;
    margin: 0 auto 0.5rem;
    background: none;
    border: none;
    padding: 0;
    display: block;
}

.vip-widget .vip-channel-item img {
    border-radius: 50%;
    border: 2px solid;
    transition: transform 0.3s ease;
}

.vip-widget .vip-channel-item:hover img {
    transform: scale(1.1);
}

.noonserv-adv-channel-item span {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1E3A8A;
    display: block;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.vip-widget .vip-channel-item span {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.noonserv-adv-channel-item small {
    font-size: 0.75rem;
    color: #4B5563;
    font-weight: 400;
    line-height: 1.2;
}

/* تنسيق الجدول */
.noonserv-adv-channel-table {
    width: 100% !important;
    border-collapse: collapse !important;
    background: #FFFFFF;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    direction: rtl !important;
    text-align: center !important;
}

.noonserv-adv-channel-table th,
.noonserv-adv-channel-table td {
    padding: 1rem !important;
    border-bottom: 1px solid #1E3A8A !important;
    text-align: center !important;
    vertical-align: middle !important;
}

.noonserv-adv-channel-table th {
    background: #1E3A8A !important;
    color: #FFFFFF !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
}

.noonserv-adv-channel-table td {
    color: #1E3A8A !important;
    font-size: 0.95rem !important;
}

.noonserv-adv-channel-table td:empty {
    background: transparent !important;
    border: none !important;
    min-width: 50px !important;
}

.noonserv-adv-channel-table td img {
    width: 50px !important;
    height: auto !important;
    max-height: 50px !important;
    object-fit: contain !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    vertical-align: middle !important;
}

.noonserv-adv-channel-table tr:last-child td {
    border-bottom: none !important;
}

.noonserv-adv-channel-table tr:hover {
    background: #F5F5DC !important;
}

/* تحديد أعمدة الجدول (Category, Channel Name, Icon) */
.noonserv-adv-channel-table th:nth-child(1),
.noonserv-adv-channel-table td:nth-child(1) {
    width: 30% !important; /* عرض لعمود الفئة */
}

.noonserv-adv-channel-table th:nth-child(2),
.noonserv-adv-channel-table td:nth-child(2) {
    width: 40% !important; /* عرض لعمود اسم القناة */
}

.noonserv-adv-channel-table th:nth-child(3),
.noonserv-adv-channel-table td:nth-child(3) {
    width: 30% !important; /* عرض لعمود الأيقونة */
}

/* زر Load More */
.noonserv-adv-load-more {
    display: block;
    margin: 1.5rem auto 0;
    padding: 0.75rem 2rem;
    background: #FFD700;
    color: #1E3A8A;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    font-family: 'Tajawal', 'Arial', sans-serif;
}

.noonserv-adv-load-more:hover {
    background: #1E3A8A;
    color: #FFFFFF;
    transform: scale(1.05);
}

/* تنسيق النافذة المنبثقة (Modal) */
.noonserv-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 58, 138, 0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeInModal 0.3s ease;
}

.noonserv-modal-content {
    background: #F5F5DC;
    padding: 2rem;
    border-radius: 16px;
    max-width: 700px;
    width: 90%;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: slideUpModal 0.3s ease;
    direction: rtl;
    font-family: 'Tajawal', 'Arial', sans-serif;
}

.noonserv-modal-close {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 1.75rem;
    color: #4B5563;
    cursor: pointer;
    transition: color 0.2s ease;
}

.noonserv-modal-close:hover {
    color: #1E3A8A;
}

.noonserv-modal-content h3 {
    font-size: 1.625rem;
    font-weight: 700;
    color: #1E3A8A;
    margin-bottom: 1rem;
}

.noonserv-epg-content {
    font-size: 1rem;
    color: #4B5563;
    line-height: 1.625;
    background: #FFFFFF;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #1E3A8A;
}

.noonserv-modal-content a {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.625rem 1.5rem;
    background: #FFD700;
    color: #1E3A8A;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.3s ease;
    font-family: 'Tajawal', 'Arial', sans-serif;
}

.noonserv-modal-content a:hover {
    background: #1E3A8A;
    color: #FFFFFF;
}

/* الرسوم المتحركة */
@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUpModal {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* التصميم المتجاوب */
@media (max-width: 1024px) {
    .noonserv-adv-channel-item {
        flex: 0 0 calc(20% - 20px);
        max-width: calc(20% - 20px);
    }

    .noonserv-adv-channel-item img {
        max-height: 50px;
    }

    .noonserv-adv-channel-table th,
    .noonserv-adv-channel-table td {
        padding: 0.75rem !important;
    }
}

@media (max-width: 768px) {
    .noonserv-adv-channel-list-widget {
        padding: 1rem;
        margin: 0.5rem;
    }

    .noonserv-adv-channel-item {
        flex: 0 0 calc(50% - 20px);
        max-width: calc(50% - 20px);
    }

    .vip-widget .vip-channel-item {
        flex: 1 1 calc(50% - 20px);
        max-width: calc(50% - 20px);
    }

    .noonserv-adv-channel-item {
        padding: 0.5rem;
    }

    .noonserv-adv-channel-item span {
        font-size: 0.9rem;
    }

    .noonserv-adv-channel-item small {
        font-size: 0.7rem;
    }

    .noonserv-adv-channel-table {
        font-size: 0.85rem !important;
    }

    .noonserv-adv-channel-table th,
    .noonserv-adv-channel-table td {
        padding: 0.5rem !important;
    }

    .noonserv-adv-channel-table td img {
        width: 40px !important;
        max-height: 40px !important;
    }

    .noonserv-modal-content {
        padding: 1.5rem;
    }

    .noonserv-filter-search-container {
        flex-direction: column;
        align-items: center;
    }

    .noonserv-filter-search-container input,
    .noonserv-filter-search-container select,
    .noonserv-channel-count-container {
        max-width: 100%;
        margin: 0.5rem 0;
    }

    .noonserv-channel-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .noonserv-adv-channel-item {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .vip-widget .vip-channel-item {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .noonserv-adv-channel-item img {
        max-height: 40px;
    }

    .noonserv-adv-channel-list-widget h2 {
        font-size: 1.5rem;
    }

    .noonserv-filter-search-container input,
    .noonserv-filter-search-container select,
    .noonserv-channel-count-container {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    .noonserv-channel-count {
        font-size: 0.9rem;
    }

    .noonserv-channel-count-label {
        font-size: 0.85rem;
    }

    .noonserv-modal-content {
        padding: 1rem;
        width: 95%;
    }

    .noonserv-modal-content h3 {
        font-size: 1.25rem;
    }

    .noonserv-epg-content {
        font-size: 0.875rem;
    }

    .noonserv-modal-content a {
        padding: 0.5rem 1rem;
    }

    .noonserv-adv-channel-table {
        font-size: 0.75rem !important;
    }

    .noonserv-adv-channel-table th,
    .noonserv-adv-channel-table td {
        padding: 0.3rem !important;
    }

    .noonserv-adv-channel-table td img {
        width: 30px !important;
        max-height: 30px !important;
    }

    /* تحسين التصميم المتجاوب للجدول */
    .noonserv-adv-channel-table th:nth-child(1),
    .noonserv-adv-channel-table td:nth-child(1) {
        width: 25% !important; /* عرض لعمود الفئة */
    }

    .noonserv-adv-channel-table th:nth-child(2),
    .noonserv-adv-channel-table td:nth-child(2) {
        width: 50% !important; /* عرض لعمود اسم القناة */
    }

    .noonserv-adv-channel-table th:nth-child(3),
    .noonserv-adv-channel-table td:nth-child(3) {
        width: 25% !important; /* عرض لعمود الأيقونة */
    }
}


