body {
    font-family: Arial, sans-serif; /* Or your preferred font */
    direction: rtl; /* Right-to-left for Arabic */
}

.wrap {
    max-width: 100%; /* Or your preferred max-width */
    margin: 0 auto;
}

.success-message {
    color: green;
    margin-top: 10px;
}
.success-message a{
    color: green;
    text-decoration: underline;
}




/*--------------------------------------------------------------
# Styles for Btolat Manage Matches Admin Page - V5 (Forcing Visibility)
--------------------------------------------------------------*/

/* --- General Wrapper & Notice --- */
.btolat-manage-matches-wrap { margin-top: 1em; }
.btolat-notice { margin-bottom: 15px; }

/* --- Filters/Actions Bar Styles --- */
.btolat-filters-actions {
    background: #fff;
    padding: 10px;
    border: 1px solid #dcdcde;
    border-bottom: none;
}
.btolat-filters-actions .bulkactions {
    display: flex; /* ★ التأكد من وجودها */
    flex-wrap: wrap; /* ★ التأكد من وجودها */
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
    /* ★ التأكد من عدم وجود display: none هنا */
    visibility: visible; /* ★ التأكد من أنه مرئي */
}
.btolat-filters-actions .bulkactions label.screen-reader-text { display: none; }

.btolat-filters-actions .bulkactions select,
.btolat-filters-actions .bulkactions input[type="date"],
.btolat-filters-actions .bulkactions input[type="button"],
.btolat-filters-actions .bulkactions input[type="submit"] {
    margin: 0 !important;
    padding: 5px 8px;
    height: 30px;
    font-size: 13px;
    vertical-align: middle;
     /* ★ التأكد من عدم وجود display: none هنا */
     visibility: visible;
}

/* ★ إخفاء مربع تحديد الكل المخصص للهاتف بشكل افتراضي */
.btolat-mobile-select-all {
    display: none; /* مخفي افتراضيًا */
    align-items: center;
    margin-right: 15px; /* مسافة لليمين (لأننا RTL) */
    margin-left: 5px;
    vertical-align: middle;
    order: 1; /* ترتيبه (اختياري) */
}
.btolat-mobile-select-all input[type="checkbox"] {
    margin: 0 0 0 5px !important; /* مسافة لليسار (لأننا RTL) */
}
.btolat-mobile-select-all .select-all-label {
    font-size: 13px;
    white-space: nowrap;
}


/* --- Pagination Styles --- */
.btolat-filters-actions .tablenav-pages {
    line-height: 1.5;
    text-align: right; /* أو left */
     margin-top: 5px;
     width: auto;
     display: block;
}
.btolat-filters-actions .tablenav-pages .page-numbers { display: inline-block; padding: 8px 14px; margin: 0 3px 5px 3px; line-height: 1.2; text-decoration: none; border: 1px solid #c3c4c7; border-radius: 4px; background-color: #f6f7f7; color: #2271b1; font-size: 13px; font-weight: 500; transition: all 0.15s ease-in-out; cursor: pointer; }
.btolat-filters-actions .tablenav-pages a.page-numbers:hover, .btolat-filters-actions .tablenav-pages a.page-numbers:focus { background-color: #f0f0f1; border-color: #0a4b78; color: #0a4b78; box-shadow: 0 0 0 1px #2271b1; outline: 1px solid transparent; }
.btolat-filters-actions .tablenav-pages .page-numbers.current { background-color: #2271b1; border-color: #2271b1; color: #ffffff; font-weight: bold; cursor: default; }
.btolat-filters-actions .tablenav-pages .page-numbers.dots { border: none; background: none; padding: 8px 4px; cursor: default; color: #646970; }
.btolat-filters-actions .tablenav-pages a.prev, .btolat-filters-actions .tablenav-pages a.next { font-weight: bold; }
.btolat-filters-actions .tablenav-pages > span { vertical-align: middle; }
.btolat-filters-actions .tablenav-pages .displaying-num { margin-left: 10px; margin-right: 0; color: #50575e; } /* ★ تعديل RTL */


/* --- General Table Styles --- */
.btolat-manage-matches-wrap .wp-list-table {
    width: 100%;
    border-collapse: collapse;
    clear: both;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    border: 1px solid #dcdcde;
}
.btolat-manage-matches-wrap .wp-list-table th,
.btolat-manage-matches-wrap .wp-list-table td {
    padding: 10px 8px;
    border: none;
    border-bottom: 1px solid #f0f0f1;
    vertical-align: middle;
    font-size: 13px;
    text-align: right; /* ★ محاذاة لليمين للعربية */
}
.btolat-manage-matches-wrap .wp-list-table thead th,
.btolat-manage-matches-wrap .wp-list-table thead td,
.btolat-manage-matches-wrap .wp-list-table tfoot th,
.btolat-manage-matches-wrap .wp-list-table tfoot td {
    background-color: #f6f7f7;
    font-weight: 600;
    padding: 12px 10px;
    border-bottom-width: 1px;
    border-top: 1px solid #dcdcde;
    text-align: right; /* ★ محاذاة لليمين للعربية */
     /* ★ تأكد من عدم وجود display: none هنا إلا داخل ميديا كويري محددة */
}
.btolat-manage-matches-wrap .wp-list-table tbody tr:last-child td,
.btolat-manage-matches-wrap .wp-list-table tbody tr:last-child th {
    border-bottom: none;
}
.btolat-manage-matches-wrap .wp-list-table .check-column {
    width: 2.5em;
    padding: 10px 8px 10px 0; /* ★ تعديل Padding لـ RTL */
    text-align: center;
}
.btolat-manage-matches-wrap .wp-list-table .column-logos { text-align: center; }
.btolat-manage-matches-wrap .wp-list-table .column-logos img { margin: 0 5px; vertical-align: middle; max-height: 32px; width: auto; }
.btolat-manage-matches-wrap .wp-list-table .column-status { text-align: center; white-space: nowrap; }
.btolat-manage-matches-wrap .wp-list-table .column-actions { text-align: left; white-space: nowrap; } /* ★ محاذاة لليسار للأزرار */
.btolat-manage-matches-wrap .wp-list-table .column-actions .button { margin-right: 4px; margin-left: 0; vertical-align: middle; } /* ★ تعديل Margin لـ RTL */
.btolat-manage-matches-wrap .wp-list-table .column-actions .button-link-delete { color: #d63638; vertical-align: middle; }
.btolat-manage-matches-wrap .wp-list-table .column-actions .button-link-delete:hover { color: #a02426; }
.btolat-manage-matches-wrap .wp-list-table .no-items td { text-align: center; padding: 20px; color: #646970; }

/* --- Status Colors --- */
.matches-table .match-status.ended { color: #007cba; font-weight: 600;}
.matches-table .match-status.live { color: #d63638; animation: blinker 1s linear infinite; font-weight: 700; }
.matches-table .match-status.notYet { color: #228b22; }
.matches-table .match-status.Postponed { color: #cea304; }
@keyframes blinker { 50% { opacity: 0.3; } }

/* --- Responsive / Mobile Styles --- */

/* تنسيق شريط الفلاتر/الإجراءات والترقيم للهواتف (782px وأقل) */
@media screen and (max-width: 782px) {
    /* ★ التأكد من أن حاوية الإجراءات ظاهرة وتستخدم flex */
    .btolat-filters-actions .bulkactions {
         display: flex !important;
         visibility: visible !important;
         border: 1px dashed green; /* ★ حد مؤقت للتشخيص */
    }

    /* ★ التأكد من أن العناصر الداخلية ظاهرة ولها أساس عرض */
    .btolat-filters-actions .bulkactions > * { /* استهداف كل العناصر الداخلية مباشرة */
        display: inline-block; /* أو flex أو block حسب الحاجة */
        visibility: visible !important;
         border: 1px dotted purple; /* ★ حد مؤقت للتشخيص */
    }
    .btolat-filters-actions .bulkactions select,
    .btolat-filters-actions .bulkactions input[type="date"],
    .btolat-filters-actions .bulkactions input[type="button"],
    .btolat-filters-actions .bulkactions input[type="submit"] {
        flex-grow: 1;
        flex-basis: 100px;
        /* ★ التأكد من عدم وجود display: none هنا */
    }

    /* ★ إظهار مربع تحديد الكل المخصص - فقط إذا كان thead يختفي هنا */
    /* .btolat-mobile-select-all { display: inline-flex !important; order: -1; } */

    /* تنسيق الترقيم */
    .btolat-filters-actions .tablenav-pages {
        text-align: center;
        width: 100%;
        margin-top: 15px;
        padding-top: 10px;
        border-top: 1px solid #eee;
    }
    .btolat-filters-actions .tablenav-pages .displaying-num {
        display: block;
        margin-bottom: 8px;
        margin-left: 0;
    }
    .btolat-filters-actions .tablenav-pages .pagination-links { display: block; }
    .btolat-filters-actions .tablenav-pages .page-numbers { padding: 6px 10px; }
}

/* تصميم البطاقات للشاشات الصغيرة جدًا (480px وأقل) */
@media screen and (max-width: 480px) {
     /* ★ التأكد مرة أخرى من أن حاوية الإجراءات ظاهرة */
    .btolat-filters-actions .bulkactions {
         display: flex !important;
         visibility: visible !important;
         border-color: red; /* تغيير لون الحد للتمييز */
    }
     /* ★ التأكد مرة أخرى من أن العناصر الداخلية ظاهرة */
     .btolat-filters-actions .bulkactions > * {
        display: inline-block; /* أو flex */
        visibility: visible !important;
        border-color: orange; /* تغيير لون الحد للتمييز */
    }
    .btolat-manage-matches-wrap .btolat-filters-actions .bulkactions select,
    .btolat-manage-matches-wrap .btolat-filters-actions .bulkactions input[type="date"],
    .btolat-manage-matches-wrap .btolat-filters-actions .bulkactions input[type="button"],
    .btolat-manage-matches-wrap .btolat-filters-actions .bulkactions input[type="submit"] {
         flex-basis: calc(50% - 12px);
          /* ★ التأكد من عدم وجود display: none هنا */
    }

    /* إخفاء رأس وتذييل الجدول */
    .btolat-manage-matches-wrap .wp-list-table thead,
    .btolat-manage-matches-wrap .wp-list-table tfoot {
        display: none !important; /* ★ التأكيد على الإخفاء */
    }

    /* ★ إظهار مربع تحديد الكل المخصص للهاتف */
    .btolat-mobile-select-all {
        display: inline-flex !important; /* استخدام inline-flex */
        order: -1; /* وضعه في البداية */
        margin-bottom: 8px;
         /* ★ التأكد من عدم وجود display: none هنا */
         visibility: visible !important; /* تأكيد إظهاره */
         border: 1px solid cyan; /* حد مؤقت للتشخيص */
    }

    /* تنسيق الجدول كبطاقات */
    .btolat-manage-matches-wrap .wp-list-table tbody { display: flex; flex-direction: column; width: 100%; gap: 10px; }
    .btolat-manage-matches-wrap .wp-list-table tr.match-row { display: flex; flex-direction: column; background: #fff; margin-bottom: 0; padding: 15px; border: 1px solid #ddd; border-radius: 5px; width: 100%; box-sizing: border-box; position: relative; }
    .btolat-manage-matches-wrap .wp-list-table tr.no-items td { display: block; text-align: center; padding: 20px; }
    .btolat-manage-matches-wrap .wp-list-table th.check-column { padding: 0 !important; position: absolute; top: 10px; left: 10px; /* ★ تعديل لليسار لـ RTL */ height: auto; }
    .btolat-manage-matches-wrap .wp-list-table td { display: block; width: 100%; text-align: center; padding: 8px 5px; border: none; border-bottom: 1px dashed #eee; }
    .btolat-manage-matches-wrap .wp-list-table td:last-child { border-bottom: none; }
    .btolat-manage-matches-wrap .matches-table .column-match { font-size: 1.1em; font-weight: bold; order: 1; }
    .btolat-manage-matches-wrap .matches-table .column-logos { order: 2; display: flex; justify-content: center; align-items: center; padding: 15px 0; }
    .btolat-manage-matches-wrap .matches-table .column-logos img { width: 40px; height: 40px; margin: 0 10px; }
    .btolat-manage-matches-wrap .matches-table .column-status { order: 3; font-size: 1em; font-weight: bold; margin-bottom: 10px; }
    .btolat-manage-matches-wrap .matches-table .column-actions { order: 4; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; padding-top: 10px; }
    .btolat-manage-matches-wrap .matches-table .column-actions .button { padding: 6px 10px; font-size: 13px; }
}