/* =========================================================
   5TV Watch / Download Servers
========================================================= */

.ftv-media-servers {
    width: min(
        calc(100% - 2rem),
        92rem
    );

    margin:
        1rem
        auto
        1.5rem;
}


.ftv-watch-box {
    padding: 1rem;

    border: 1px solid var(--border);
    border-radius: 1rem;

    background: var(--surface);
}


.ftv-watch-head {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 1rem;

    margin-block-end: .9rem;
}


.ftv-watch-kicker,
.ftv-download-modal__head span {
    color: var(--accent);

    font-size: .65rem;
    font-weight: 800;
}


.ftv-watch-head h2,
.ftv-download-modal__head h2 {
    margin:
        .15rem
        0
        0;

    font-size: 1rem;
}


.ftv-watch-tabs {
    display: flex;

    gap: .45rem;

    overflow-x: auto;

    padding-block-end: .45rem;

    scrollbar-width: thin;
}


.ftv-watch-tab {
    flex: 0 0 auto;

    min-width: 7.8rem;

    display: grid;

    gap: .12rem;

    padding:
        .55rem
        .7rem;

    border: 1px solid var(--border);
    border-radius: .7rem;

    background: var(--surface-2);

    color: var(--text);

    text-align: start;

    cursor: pointer;
}


.ftv-watch-tab.is-active {
    border-color: var(--accent);
}


.ftv-watch-tab__number {
    color: var(--accent);

    font-size: .58rem;
    font-weight: 700;
}


.ftv-watch-tab strong {
    font-size: .72rem;
}


.ftv-watch-tab small {
    color: var(--text-muted);

    font-size: .58rem;
}


.ftv-player-frame {
    position: relative;

    width: 100%;

    aspect-ratio: 16 / 9;

    overflow: hidden;

    margin-block-start: .55rem;

    border-radius: .8rem;

    background: #050608;
}


.ftv-player-iframe {
    width: 100%;
    height: 100%;

    border: 0;

    display: block;
}


.ftv-download-open {
    min-height: 2.5rem;

    padding-inline: .9rem;

    border: 1px solid var(--accent);
    border-radius: .7rem;

    background: transparent;

    color: var(--accent);

    font-size: .72rem;
    font-weight: 800;

    cursor: pointer;
}


/* =========================================================
   Download popup
========================================================= */

html.ftv-modal-open {
    overflow: hidden;
}


.ftv-download-modal {
    position: fixed;

    inset: 0;

    z-index: 999999;
}


.ftv-download-modal[hidden] {
    display: none !important;
}


.ftv-download-modal__backdrop {
    position: absolute;

    inset: 0;

    background: rgb(0 0 0 / 72%);

    backdrop-filter: blur(4px);
}


.ftv-download-modal__dialog {
    position: absolute;

    top: 50%;
    left: 50%;

    transform: translate(
        -50%,
        -50%
    );

    width: min(
        calc(100% - 1.5rem),
        38rem
    );

    max-height: min(
        80vh,
        44rem
    );

    overflow: auto;

    padding: 1rem;

    border: 1px solid var(--border);
    border-radius: 1rem;

    background: var(--surface);

    box-shadow:
        0 30px 90px
        rgb(0 0 0 / 35%);
}


.ftv-download-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 1rem;

    margin-block-end: .8rem;
}


.ftv-download-close {
    width: 2rem;
    height: 2rem;

    border: 1px solid var(--border);
    border-radius: 999px;

    background: var(--surface-2);

    color: var(--text);

    font-size: 1.2rem;

    cursor: pointer;
}


.ftv-download-list {
    display: grid;

    gap: .5rem;
}


.ftv-download-server {
    display: grid;

    grid-template-columns:
        2rem
        minmax(0, 1fr)
        auto;

    align-items: center;

    gap: .7rem;

    padding: .65rem;

    border: 1px solid var(--border);
    border-radius: .75rem;

    background: var(--surface-2);
}


.ftv-download-server__number {
    width: 2rem;
    height: 2rem;

    display: grid;
    place-items: center;

    border-radius: 999px;

    background:
        color-mix(
            in srgb,
            var(--accent) 15%,
            transparent
        );

    color: var(--accent);

    font-size: .7rem;
    font-weight: 900;
}


.ftv-download-server__info {
    min-width: 0;

    display: grid;

    gap: .08rem;
}


.ftv-download-server__info span {
    color: var(--text-muted);

    font-size: .55rem;
}


.ftv-download-server__info strong {
    font-size: .72rem;
}


.ftv-download-server__info small {
    color: var(--accent);

    font-size: .58rem;
}


.ftv-download-server__button {
    min-width: 4.5rem;

    min-height: 2.2rem;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding-inline: .65rem;

    border-radius: .6rem;

    background: var(--accent);

    color: #111;

    font-size: .65rem;
    font-weight: 900;

    text-decoration: none;
}


@media (max-width: 700px) {

    .ftv-media-servers {
        width:
            calc(100% - 1rem);

        margin-block:
            .7rem
            1rem;
    }


    .ftv-watch-box {
        padding: .7rem;

        border-radius: .85rem;
    }


    .ftv-watch-head {
        align-items: flex-start;
        flex-direction: column;
    }


    .ftv-download-open {
        width: 100%;
    }


    .ftv-watch-tab {
        min-width: 7rem;
    }


    .ftv-download-modal__dialog {
        padding: .8rem;

        border-radius: .85rem;
    }


    .ftv-download-server {
        grid-template-columns:
            1.8rem
            minmax(0, 1fr)
            auto;
    }
}


/* =========================================================
   Download button below player
========================================================= */

.ftv-download-bottom {
    width: 100%;

    margin-block-start: .75rem;
}

.ftv-download-open--bottom {
    width: 100%;

    min-height: 2.8rem;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: .45rem;

    direction: rtl;

    border: 1px solid var(--accent);
    border-radius: .7rem;

    background: transparent;

    color: var(--accent);

    font-size: .75rem;
    font-weight: 800;
}

.ftv-download-open--bottom svg {
    width: 1rem;
    height: 1rem;

    flex: 0 0 auto;

    display: block;
}


/*
 * In RTL the first element appears on the right,
 * so SVG stays on the right side of the text.
 */
.ftv-download-open--bottom span {
    display: inline-block;
}


@media (max-width: 700px) {

    .ftv-download-bottom {
        margin-block-start: .6rem;
    }

    .ftv-download-open--bottom {
        min-height: 2.65rem;

        font-size: .72rem;

        border-radius: .65rem;
    }
}

/* =========================================================
   Remove empty gap above watch servers
========================================================= */

.ftv-media-servers {
    margin-top: .6rem;
}

.ftv-watch-box {
    min-height: 0 !important;
}

.ftv-watch-head {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.ftv-watch-head + .ftv-watch-tabs {
    margin-top: 0 !important;
}

.ftv-watch-tabs {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.ftv-player-frame {
    margin-top: .55rem !important;
}


/* If parent template adds spacing before component */
.ftv-media-servers:first-child,
.ftv-media-servers {
    padding-top: 0 !important;
}


/* Mobile */
@media (max-width: 700px) {

    .ftv-media-servers {
        margin-top: .35rem !important;
    }

    .ftv-watch-box {
        padding-top: .65rem !important;
    }

    .ftv-watch-head {
        margin-bottom: .55rem !important;
    }
}


/* =========================================================
   VIP servers — new system
========================================================= */

.ftv-watch-tab--vip {
    position: relative;

    border-color:
        color-mix(
            in srgb,
            var(--accent) 55%,
            var(--border)
        );
}


.ftv-watch-tab__vip,
.ftv-download-server__vip {
    color: var(--accent);

    font-size: .55rem;
    font-weight: 900;
}


.ftv-vip-pin {
    position: absolute;

    inset-block-start: .4rem;
    inset-inline-end: .45rem;

    width: 1.45rem;
    height: 1.45rem;

    display: inline-grid;
    place-items: center;

    border: 1px solid var(--border);
    border-radius: 999px;

    background:
        color-mix(
            in srgb,
            var(--surface) 82%,
            transparent
        );

    color: var(--text-muted);

    font-size: .78rem;
    line-height: 1;

    cursor: pointer;

    z-index: 2;
}


.ftv-vip-pin.is-active {
    color: var(--accent);
    border-color: var(--accent);
}


.ftv-vip-pin.is-saving {
    opacity: .55;
    pointer-events: none;
}


.ftv-watch-free-label {
    flex: 0 0 auto;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 2.35rem;

    padding-inline: .75rem;

    border-inline-start:
        1px solid var(--border);

    color: var(--text-muted);

    font-size: .62rem;
    font-weight: 800;

    white-space: nowrap;
}


.ftv-download-server--vip {
    border-color:
        color-mix(
            in srgb,
            var(--accent) 45%,
            var(--border)
        );
}


@media (max-width: 700px) {

    .ftv-vip-pin {
        inset-block-start: .35rem;
        inset-inline-end: .35rem;

        width: 1.35rem;
        height: 1.35rem;
    }


    .ftv-watch-free-label {
        min-height: 2.2rem;

        padding-inline: .6rem;

        font-size: .58rem;
    }
}

/* =========================================================
   FIX DOWNLOAD MODAL Z-INDEX
========================================================= */

.ftv-download-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9999999 !important;
}

.ftv-download-modal__backdrop {
    position: absolute !important;
    inset: 0 !important;
    z-index: 1 !important;
}

.ftv-download-modal__dialog {
    position: relative !important;
    z-index: 2 !important;
}

/* منع أي parent من قص الـ popup */
.ftv-media-servers,
.ftv-watch-box,
.ftv-download-bottom {
    overflow: visible !important;
}

/* خلي Popups الحلقات تحت Popup التحميل */
.ftv-episodes-modal,
.ftv-related-episodes-modal,
.ftv-seasons-modal {
    z-index: 999900 !important;
}


/* =========================================================
   DOWNLOAD MODAL — PERFECT MOBILE CENTER
========================================================= */

@media (max-width: 700px) {

    .ftv-download-modal {
        position: fixed !important;
        inset: 0 !important;

        width: 100vw !important;
        height: 100dvh !important;

        display: flex !important;
        align-items: center !important;
        justify-content: center !important;

        padding: 16px !important;
        margin: 0 !important;

        box-sizing: border-box !important;

        z-index: 9999999 !important;
    }

    .ftv-download-modal__dialog {
        position: relative !important;

        inset: auto !important;

        width: min(100%, 390px) !important;
        max-width: 390px !important;

        margin: 0 auto !important;

        transform: none !important;

        box-sizing: border-box !important;

        z-index: 2 !important;
    }

}


/* =========================================================
   5TV DOWNLOAD MODAL
   Close button always on RIGHT
   Movies + Episodes / Desktop + Mobile
========================================================= */

.ftv-download-modal__dialog {
    position: relative !important;
}

/* زر إغلاق نافذة التحميل */
.ftv-download-modal__close {
    position: absolute !important;

    top: 14px !important;
    right: 14px !important;
    left: auto !important;

    inset-inline-start: auto !important;
    inset-inline-end: auto !important;

    margin: 0 !important;
    transform: none !important;

    z-index: 50 !important;
}

/* موبايل */
@media (max-width: 700px) {

    .ftv-download-modal__close {
        top: 14px !important;
        right: 14px !important;
        left: auto !important;

        inset-inline-start: auto !important;
        inset-inline-end: auto !important;
    }

    /* مساحة حتى لا يدخل العنوان تحت زر X */
    .ftv-download-modal__head {
        padding-right: 48px !important;
        padding-left: 0 !important;
    }
}

/* ديسكتوب */
@media (min-width: 701px) {

    .ftv-download-modal__close {
        top: 16px !important;
        right: 16px !important;
        left: auto !important;

        inset-inline-start: auto !important;
        inset-inline-end: auto !important;
    }
}


/* =========================================================
   5TV PLAYER HEIGHT
   Movies + Episodes
========================================================= */

.ftv-player-frame {
    width: 100% !important;

    min-height: 460px !important;
    height: 460px !important;

    overflow: hidden !important;

    border-radius: 14px !important;
}

.ftv-player-iframe {
    display: block !important;

    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;

    border: 0 !important;
}


/* Tablet */
@media (max-width: 900px) {

    .ftv-player-frame {
        min-height: 360px !important;
        height: 360px !important;
    }
}


/* Mobile */
@media (max-width: 700px) {

    .ftv-player-frame {
        min-height: 280px !important;
        height: 280px !important;
    }
}


/* Small mobile */
@media (max-width: 420px) {

    .ftv-player-frame {
        min-height: 250px !important;
        height: 250px !important;
    }
}


/* =========================================================
   DOWNLOAD CLOSE BUTTON — RIGHT SIDE
   Movies + Episodes / Mobile + Desktop
========================================================= */

.ftv-download-modal__dialog {
    position: relative !important;
}

.ftv-download-modal__head {
    position: relative !important;

    /* مساحة للـ X ناحية اليمين */
    padding-right: 52px !important;
}

/* زر الإغلاق الحقيقي */
.ftv-download-close {
    position: absolute !important;

    top: 14px !important;
    right: 14px !important;
    left: auto !important;

    inset: auto !important;
    inset-inline-start: auto !important;
    inset-inline-end: auto !important;

    margin: 0 !important;
    transform: none !important;

    z-index: 100 !important;
}


/* الموبايل */
@media (max-width: 700px) {

    .ftv-download-close {
        top: 14px !important;
        right: 14px !important;
        left: auto !important;

        inset: auto !important;
        inset-inline-start: auto !important;
        inset-inline-end: auto !important;
    }

    .ftv-download-modal__head {
        padding-right: 52px !important;
    }
}


/* الديسكتوب */
@media (min-width: 701px) {

    .ftv-download-close {
        top: 16px !important;
        right: 16px !important;
        left: auto !important;
    }
}


/* =========================================================
   PLAYER LAYOUT FINAL FIX
   Movies + Episodes
========================================================= */

/* الكونتينر الرئيسي ما يخرجش بره الشاشة */
.ftv-media-servers {
    width: min(calc(100% - 1rem), 92rem) !important;
    max-width: 100% !important;

    margin-left: auto !important;
    margin-right: auto !important;

    box-sizing: border-box !important;
    overflow: hidden !important;
}

.ftv-watch-box {
    width: 100% !important;
    max-width: 100% !important;

    box-sizing: border-box !important;
    overflow: hidden !important;
}

/* التابات تفضل داخل العرض */
.ftv-watch-tabs {
    width: 100% !important;
    max-width: 100% !important;

    box-sizing: border-box !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
}

/* المشغل */
.ftv-player-frame {
    position: relative !important;

    width: 100% !important;
    max-width: 100% !important;

    /* أطول شوية من 16:9 لكن من غير fixed height */
    aspect-ratio: 16 / 10 !important;

    height: auto !important;
    min-height: 0 !important;

    margin-top: .65rem !important;

    overflow: hidden !important;

    border-radius: 14px !important;

    box-sizing: border-box !important;
}

/* iframe يملأ الكونتينر بالضبط */
.ftv-player-iframe {
    position: absolute !important;
    inset: 0 !important;

    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;

    display: block !important;

    border: 0 !important;
}

/* زر التحميل يفضل بنفس عرض المشغل */
.ftv-download-bottom {
    width: 100% !important;
    max-width: 100% !important;

    box-sizing: border-box !important;
}

.ftv-download-open--bottom {
    width: 100% !important;
    max-width: 100% !important;

    box-sizing: border-box !important;
}


/* =========================
   MOBILE
========================= */

@media (max-width: 700px) {

    .ftv-media-servers {
        width: calc(100% - 1rem) !important;
        max-width: calc(100% - 1rem) !important;

        margin-left: auto !important;
        margin-right: auto !important;
    }

    .ftv-watch-box {
        padding: .7rem !important;
    }

    .ftv-player-frame {
        width: 100% !important;

        /* طول مناسب للموبايل */
        aspect-ratio: 16 / 10.5 !important;

        height: auto !important;
        min-height: 0 !important;
    }
}


/* فون صغير */
@media (max-width: 420px) {

    .ftv-player-frame {
        aspect-ratio: 16 / 10.7 !important;
    }
}


/* =========================================================
   DOWNLOAD CLOSE — FAR RIGHT INSIDE CONTAINER
   Movies + Episodes / Mobile + Desktop
========================================================= */

.ftv-download-modal__dialog {
    position: relative !important;
}

.ftv-download-close {
    position: absolute !important;

    top: 14px !important;

    /* أقصى يمين داخل الكونتينر */
    right: 12px !important;
    left: auto !important;

    inset-inline-start: auto !important;
    inset-inline-end: auto !important;

    margin: 0 !important;
    transform: none !important;

    z-index: 999 !important;
}

/* منع العنوان من الدخول تحت زر الإغلاق */
.ftv-download-modal__head {
    padding-right: 52px !important;
    padding-left: 16px !important;
}

/* Mobile */
@media (max-width: 700px) {

    .ftv-download-close {
        top: 12px !important;
        right: 12px !important;
        left: auto !important;
    }

    .ftv-download-modal__head {
        padding-right: 50px !important;
        padding-left: 12px !important;
    }
}

/* Desktop */
@media (min-width: 701px) {

    .ftv-download-close {
        top: 16px !important;
        right: 16px !important;
        left: auto !important;
    }
}


/* =========================================================
   DOWNLOAD CLOSE — FAR RIGHT INSIDE CONTAINER
   Movies + Episodes / Mobile + Desktop
========================================================= */

.ftv-download-modal__dialog {
    position: relative !important;
}

.ftv-download-close {
    position: absolute !important;

    top: 14px !important;

    /* أقصى يمين داخل الكونتينر */
    right: 12px !important;
    left: auto !important;

    inset-inline-start: auto !important;
    inset-inline-end: auto !important;

    margin: 0 !important;
    transform: none !important;

    z-index: 999 !important;
}

/* منع العنوان من الدخول تحت زر الإغلاق */
.ftv-download-modal__head {
    padding-right: 52px !important;
    padding-left: 16px !important;
}

/* Mobile */
@media (max-width: 700px) {

    .ftv-download-close {
        top: 12px !important;
        right: 12px !important;
        left: auto !important;
    }

    .ftv-download-modal__head {
        padding-right: 50px !important;
        padding-left: 12px !important;
    }
}

/* Desktop */
@media (min-width: 701px) {

    .ftv-download-close {
        top: 16px !important;
        right: 16px !important;
        left: auto !important;
    }
}


/* =========================================================
   DOWNLOAD MODAL — FINAL LAYOUT FIX
   Movies + Episodes
   Desktop + Mobile
========================================================= */

.ftv-download-modal {
    position: fixed !important;
    inset: 0 !important;

    width: 100vw !important;
    height: 100dvh !important;

    display: grid !important;
    place-items: center !important;

    padding: 16px !important;
    margin: 0 !important;

    box-sizing: border-box !important;

    z-index: 2147483000 !important;
}

.ftv-download-modal[hidden] {
    display: none !important;
}


/* الخلفية */
.ftv-download-modal__backdrop {
    position: absolute !important;
    inset: 0 !important;

    width: 100% !important;
    height: 100% !important;

    background: rgb(0 0 0 / 72%) !important;
    backdrop-filter: blur(4px) !important;

    z-index: 1 !important;
}


/* الكونتينر نفسه */
.ftv-download-modal__dialog {
    position: relative !important;

    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    inset: auto !important;

    transform: none !important;

    width: min(100%, 38rem) !important;
    max-width: 38rem !important;

    max-height: min(82dvh, 44rem) !important;

    margin: 0 !important;

    padding: 1rem !important;

    overflow-x: hidden !important;
    overflow-y: auto !important;

    box-sizing: border-box !important;

    border-radius: 1rem !important;

    z-index: 2 !important;
}


/* رأس الـPopup */
.ftv-download-modal__head {
    position: relative !important;

    display: block !important;

    min-height: 52px !important;

    padding:
        0
        50px
        0
        0 !important;

    margin-bottom: .8rem !important;

    box-sizing: border-box !important;
}


/* X أقصى اليمين داخل الكونتينر */
.ftv-download-close {
    position: absolute !important;

    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    bottom: auto !important;

    inset-inline-start: auto !important;
    inset-inline-end: auto !important;

    width: 2rem !important;
    height: 2rem !important;

    margin: 0 !important;
    padding: 0 !important;

    transform: none !important;

    display: inline-grid !important;
    place-items: center !important;

    z-index: 20 !important;
}


/* Mobile */
@media (max-width: 700px) {

    .ftv-download-modal {
        padding: 12px !important;
    }

    .ftv-download-modal__dialog {
        width: 100% !important;
        max-width: 390px !important;

        max-height: 84dvh !important;

        padding: 13px !important;
    }

    .ftv-download-modal__head {
        padding-right: 46px !important;
    }

    .ftv-download-close {
        top: 0 !important;
        right: 0 !important;
    }
}


/* =========================================================
   5TV FINAL SIZES
   Movies + Episodes
========================================================= */


/* =========================================================
   DOWNLOAD POPUP — WIDER
========================================================= */

.ftv-download-modal__dialog {
    width: min(calc(100vw - 32px), 42rem) !important;
    max-width: 42rem !important;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    /* Popup التحميل أعرض */
    .ftv-download-modal {
        padding: 12px !important;
    }

    .ftv-download-modal__dialog {
        width: calc(100vw - 24px) !important;
        max-width: 430px !important;

        padding: 14px !important;
    }


    /* السيرفر / المشغل ياخد مساحة أطول */
    .ftv-watch-box {
        width: 100% !important;
        max-width: 100% !important;

        padding: 12px !important;

        box-sizing: border-box !important;
    }

    .ftv-player-frame {
        position: relative !important;

        width: 100% !important;
        max-width: 100% !important;

        /*
         * ارتفاع أكبر للمشغل على الفون
         * عشان الكنترولز ما تبقاش مزنوقة.
         */
        aspect-ratio: auto !important;

        height: clamp(
            280px,
            74vw,
            320px
        ) !important;

        min-height: 280px !important;

        overflow: hidden !important;

        border-radius: 14px !important;

        box-sizing: border-box !important;
    }

    .ftv-player-iframe {
        position: absolute !important;
        inset: 0 !important;

        width: 100% !important;
        height: 100% !important;
        min-height: 100% !important;

        display: block !important;

        border: 0 !important;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 420px) {

    .ftv-download-modal__dialog {
        width: calc(100vw - 20px) !important;
        max-width: none !important;
    }

    .ftv-player-frame {
        height: 290px !important;
        min-height: 290px !important;
    }

}


/* =========================================================
   DESKTOP PLAYER
========================================================= */

@media (min-width: 701px) {

    .ftv-player-frame {
        width: 100% !important;

        aspect-ratio: 16 / 9.5 !important;

        height: auto !important;
        min-height: 0 !important;

        overflow: hidden !important;
    }

}


/* =========================================================
   DOWNLOAD CLOSE — DESKTOP NUDGE RIGHT
   Movies + Episodes
========================================================= */

@media (min-width: 701px) {

    .ftv-download-close {
        top: 16px !important;

        /* نزقه يمين شوية داخل الكونتينر */
        right: -2px !important;
        left: auto !important;

        transform: none !important;
    }

}


/* =========================================================
   DOWNLOAD OLD STYLE — ALIGNMENT ONLY
   Movies + Episodes / Desktop + Mobile
========================================================= */

.ftv-download-server {
    display: grid !important;

    /* يسار: الرقم / وسط: الاسم / يمين: تحميل */
    grid-template-columns:
        38px
        minmax(0, 1fr)
        auto !important;

    grid-template-areas:
        "number info button" !important;

    align-items: center !important;

    gap: 10px !important;
}

.ftv-download-server__number {
    grid-area: number !important;
}

.ftv-download-server__info {
    grid-area: info !important;

    min-width: 0 !important;

    text-align: center !important;

    justify-self: stretch !important;
}

.ftv-download-server__info strong,
.ftv-download-server__label,
.ftv-download-server__quality,
.ftv-download-server__vip {
    text-align: center !important;
}

.ftv-download-server a,
.ftv-download-button {
    grid-area: button !important;

    justify-self: end !important;

    margin: 0 !important;
}


/* Mobile */
@media (max-width: 700px) {

    .ftv-download-server {
        grid-template-columns:
            30px
            minmax(0, 1fr)
            auto !important;

        gap: 7px !important;
    }

    .ftv-download-server a,
    .ftv-download-button {
        justify-self: end !important;
    }

}


/* =========================================================
   5TV SERVER TABS — POLISHED FINAL UI
   Guest + Free + VIP
========================================================= */

/* حاوية اختيار السيرفرات */
.ftv-watch-tabs {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 7px !important;
}


/* التاب الأساسي */
.ftv-watch-tab {
    position: relative !important;

    min-width: 108px !important;
    min-height: 54px !important;

    padding: 8px 11px !important;

    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;

    gap: 3px !important;

    border-radius: 11px !important;

    background:
        color-mix(
            in srgb,
            var(--surface) 91%,
            #fff 9%
        ) !important;

    border: 1px solid var(--border) !important;

    color: var(--text) !important;

    box-shadow: none !important;

    cursor: pointer !important;

    transition:
        background .16s ease,
        border-color .16s ease,
        transform .16s ease !important;
}


.ftv-watch-tab:hover {
    transform: translateY(-1px) !important;

    background:
        color-mix(
            in srgb,
            var(--surface) 84%,
            #fff 16%
        ) !important;
}


/* السيرفر المختار */
.ftv-watch-tab.is-active {
    border-color: var(--accent) !important;

    background:
        color-mix(
            in srgb,
            var(--accent) 8%,
            var(--surface)
        ) !important;

    box-shadow:
        inset 0 0 0 1px
        color-mix(
            in srgb,
            var(--accent) 18%,
            transparent
        ) !important;
}


/* رقم السيرفر */
.ftv-watch-tab__number {
    font-size: 10px !important;
    line-height: 1 !important;
    font-weight: 700 !important;

    color: var(--text-muted) !important;

    opacity: .9 !important;
}


/* اسم السيرفر */
.ftv-watch-tab strong {
    max-width: 100% !important;

    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;

    font-size: 12px !important;
    line-height: 1.1 !important;
    font-weight: 750 !important;

    color: var(--text) !important;
}


/* الجودة */
.ftv-watch-tab small {
    margin: 0 !important;

    font-size: 9px !important;
    line-height: 1 !important;
    font-weight: 650 !important;

    color: var(--text-muted) !important;

    opacity: .9 !important;
}


/* =========================================================
   VIP tabs
========================================================= */

.ftv-watch-tab--vip {
    border-color:
        color-mix(
            in srgb,
            var(--accent) 38%,
            var(--border)
        ) !important;
}


/* VIP badge أصغر */
.ftv-watch-tab__vip {
    position: absolute !important;

    top: 5px !important;
    right: 6px !important;

    font-size: 7.5px !important;
    line-height: 1 !important;
    font-weight: 800 !important;

    color: var(--accent) !important;

    opacity: .95 !important;
}


/* النجمة */
.ftv-vip-pin {
    top: 4px !important;
    left: 5px !important;
    right: auto !important;

    width: 18px !important;
    height: 18px !important;

    font-size: 10px !important;

    border-width: 1px !important;
}


/* =========================================================
   FREE SERVERS LABEL FOR VIP
========================================================= */

.ftv-watch-free-label {
    flex: 0 0 100% !important;

    width: 100% !important;

    min-height: 0 !important;

    margin: 7px 0 1px !important;

    padding: 8px 10px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;

    border: 0 !important;
    border-top: 1px solid var(--border) !important;

    border-radius: 0 !important;

    background: transparent !important;

    color: var(--text-muted) !important;

    font-size: 10px !important;
    font-weight: 750 !important;
    line-height: 1.2 !important;

    text-align: right !important;
}


/* خط صغير جنب عنوان المجاني */
.ftv-watch-free-label::after {
    content: "" !important;

    width: 24px !important;
    height: 1px !important;

    margin-inline-start: 7px !important;

    background:
        color-mix(
            in srgb,
            var(--text-muted) 35%,
            transparent
        ) !important;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    .ftv-watch-tabs {
        gap: 5px !important;
    }


    .ftv-watch-tab {
        min-width: 88px !important;
        min-height: 46px !important;

        padding: 6px 8px !important;

        gap: 2px !important;

        border-radius: 9px !important;
    }


    .ftv-watch-tab__number {
        font-size: 8px !important;
    }


    .ftv-watch-tab strong {
        font-size: 10px !important;
        font-weight: 700 !important;
    }


    .ftv-watch-tab small {
        font-size: 7.5px !important;
    }


    .ftv-watch-tab__vip {
        top: 4px !important;
        right: 5px !important;

        font-size: 6.5px !important;
    }


    .ftv-vip-pin {
        top: 3px !important;
        left: 4px !important;

        width: 16px !important;
        height: 16px !important;

        font-size: 9px !important;
    }


    .ftv-watch-free-label {
        margin-top: 5px !important;

        padding: 7px 3px 5px !important;

        font-size: 8.5px !important;
    }
}


/* موبايل صغير */
@media (max-width: 420px) {

    .ftv-watch-tab {
        min-width: 80px !important;
        min-height: 43px !important;

        padding: 5px 6px !important;
    }


    .ftv-watch-tab strong {
        font-size: 9.5px !important;
    }


    .ftv-watch-tab__number {
        font-size: 7.5px !important;
    }


    .ftv-watch-tab small {
        font-size: 7px !important;
    }
}


/* =========================================================
   5TV VIP FREE SERVERS DROPDOWN — FINAL
   يعمل فقط عندما يوجد .ftv-watch-free-label
   أي فقط داخل عرض VIP الحالي
========================================================= */

/*
 * السيرفرات المجانية للـVIP مقفولة افتراضياً.
 * العضو العادي والزائر لا يوجد عندهم هذا الـlabel
 * وبالتالي لا يتأثرون نهائياً.
 */
.ftv-watch-tabs.ftv-has-free-dropdown:not(.ftv-free-is-open)
.ftv-watch-tab--free {
    display: none !important;
}


/* عنوان السيرفرات المجانية */
.ftv-watch-free-label {
    flex: 0 0 100% !important;
    width: 100% !important;

    min-height: 42px !important;

    margin: 10px 0 3px !important;
    padding: 0 13px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;

    gap: 10px !important;

    border: 1px solid var(--border) !important;
    border-radius: 10px !important;

    background:
        color-mix(
            in srgb,
            var(--surface) 94%,
            #fff 6%
        ) !important;

    color: var(--text-muted) !important;

    font-size: 11px !important;
    font-weight: 750 !important;

    cursor: pointer !important;

    user-select: none !important;

    transition:
        border-color .16s ease,
        background .16s ease !important;
}


.ftv-watch-free-label:hover {
    border-color:
        color-mix(
            in srgb,
            var(--accent) 32%,
            var(--border)
        ) !important;

    background:
        color-mix(
            in srgb,
            var(--surface) 88%,
            #fff 12%
        ) !important;
}


/* شيل الخط القديم */
.ftv-watch-free-label::after {
    content: "⌄" !important;

    width: 24px !important;
    height: 24px !important;

    margin: 0 !important;

    display: grid !important;
    place-items: center !important;

    border-radius: 7px !important;

    background:
        color-mix(
            in srgb,
            var(--surface) 82%,
            #fff 18%
        ) !important;

    color: var(--text) !important;

    font-size: 15px !important;
    line-height: 1 !important;

    transition: transform .18s ease !important;
}


.ftv-watch-tabs.ftv-free-is-open
.ftv-watch-free-label::after {
    transform: rotate(180deg) !important;
}


/* =========================================================
   SERVER TABS — SIZE / ALIGNMENT
========================================================= */

.ftv-watch-tab {
    min-width: 116px !important;
    min-height: 58px !important;

    padding: 9px 12px !important;

    border-radius: 11px !important;

    gap: 3px !important;
}


/*
 * VIP يحتاج مساحة صغيرة فوق للعلامة.
 */
.ftv-watch-tab--vip {
    padding-top: 23px !important;
}


/* VIP في منتصف التاب */
.ftv-watch-tab__vip {
    position: absolute !important;

    top: 6px !important;
    left: 50% !important;
    right: auto !important;

    transform: translateX(-50%) !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    margin: 0 !important;

    color: var(--accent) !important;

    font-size: 8px !important;
    line-height: 1 !important;
    font-weight: 850 !important;

    white-space: nowrap !important;
}


/*
 * النجمة الخاصة بتثبيت السيرفر للحساب.
 */
.ftv-vip-pin {
    position: absolute !important;

    top: 5px !important;
    left: 7px !important;
    right: auto !important;

    width: 20px !important;
    height: 20px !important;

    display: grid !important;
    place-items: center !important;

    padding: 0 !important;
    margin: 0 !important;

    border-radius: 50% !important;

    font-size: 11px !important;
    line-height: 1 !important;

    z-index: 4 !important;
}


/* السيرفر المثبت */
.ftv-vip-pin.is-active {
    color: var(--accent) !important;
    border-color: var(--accent) !important;

    background:
        color-mix(
            in srgb,
            var(--accent) 12%,
            var(--surface)
        ) !important;
}


/* رقم السيرفر */
.ftv-watch-tab__number {
    text-align: center !important;
}


/* الاسم */
.ftv-watch-tab strong {
    width: 100% !important;
    text-align: center !important;

    font-size: 12px !important;
}


/* الجودة */
.ftv-watch-tab small {
    width: 100% !important;

    text-align: center !important;

    font-size: 9px !important;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    .ftv-watch-tabs {
        gap: 6px !important;
    }


    .ftv-watch-tab {
        min-width: 94px !important;
        min-height: 49px !important;

        padding: 7px 9px !important;

        border-radius: 9px !important;
    }


    .ftv-watch-tab--vip {
        padding-top: 20px !important;
    }


    .ftv-watch-tab strong {
        font-size: 10.5px !important;
    }


    .ftv-watch-tab__number {
        font-size: 8px !important;
    }


    .ftv-watch-tab small {
        font-size: 7.5px !important;
    }


    .ftv-watch-tab__vip {
        top: 5px !important;

        font-size: 7px !important;
    }


    .ftv-vip-pin {
        top: 4px !important;
        left: 5px !important;

        width: 18px !important;
        height: 18px !important;

        font-size: 10px !important;
    }


    .ftv-watch-free-label {
        min-height: 39px !important;

        margin-top: 8px !important;
        padding-inline: 10px !important;

        font-size: 9.5px !important;
    }


    .ftv-watch-free-label::after {
        width: 22px !important;
        height: 22px !important;

        font-size: 13px !important;
    }
}


/* موبايل صغير */
@media (max-width: 420px) {

    .ftv-watch-tab {
        min-width: 88px !important;
        min-height: 47px !important;

        padding-inline: 7px !important;
    }

}


/* =========================================================
   5TV VIP FREE SERVERS DROPDOWN — FINAL
   يعمل فقط عندما يوجد .ftv-watch-free-label
   أي فقط داخل عرض VIP الحالي
========================================================= */

/*
 * السيرفرات المجانية للـVIP مقفولة افتراضياً.
 * العضو العادي والزائر لا يوجد عندهم هذا الـlabel
 * وبالتالي لا يتأثرون نهائياً.
 */
.ftv-watch-tabs.ftv-has-free-dropdown:not(.ftv-free-is-open)
.ftv-watch-tab--free {
    display: none !important;
}


/* عنوان السيرفرات المجانية */
.ftv-watch-free-label {
    flex: 0 0 100% !important;
    width: 100% !important;

    min-height: 42px !important;

    margin: 10px 0 3px !important;
    padding: 0 13px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;

    gap: 10px !important;

    border: 1px solid var(--border) !important;
    border-radius: 10px !important;

    background:
        color-mix(
            in srgb,
            var(--surface) 94%,
            #fff 6%
        ) !important;

    color: var(--text-muted) !important;

    font-size: 11px !important;
    font-weight: 750 !important;

    cursor: pointer !important;

    user-select: none !important;

    transition:
        border-color .16s ease,
        background .16s ease !important;
}


.ftv-watch-free-label:hover {
    border-color:
        color-mix(
            in srgb,
            var(--accent) 32%,
            var(--border)
        ) !important;

    background:
        color-mix(
            in srgb,
            var(--surface) 88%,
            #fff 12%
        ) !important;
}


/* شيل الخط القديم */
.ftv-watch-free-label::after {
    content: "⌄" !important;

    width: 24px !important;
    height: 24px !important;

    margin: 0 !important;

    display: grid !important;
    place-items: center !important;

    border-radius: 7px !important;

    background:
        color-mix(
            in srgb,
            var(--surface) 82%,
            #fff 18%
        ) !important;

    color: var(--text) !important;

    font-size: 15px !important;
    line-height: 1 !important;

    transition: transform .18s ease !important;
}


.ftv-watch-tabs.ftv-free-is-open
.ftv-watch-free-label::after {
    transform: rotate(180deg) !important;
}


/* =========================================================
   SERVER TABS — SIZE / ALIGNMENT
========================================================= */

.ftv-watch-tab {
    min-width: 116px !important;
    min-height: 58px !important;

    padding: 9px 12px !important;

    border-radius: 11px !important;

    gap: 3px !important;
}


/*
 * VIP يحتاج مساحة صغيرة فوق للعلامة.
 */
.ftv-watch-tab--vip {
    padding-top: 23px !important;
}


/* VIP في منتصف التاب */
.ftv-watch-tab__vip {
    position: absolute !important;

    top: 6px !important;
    left: 50% !important;
    right: auto !important;

    transform: translateX(-50%) !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    margin: 0 !important;

    color: var(--accent) !important;

    font-size: 8px !important;
    line-height: 1 !important;
    font-weight: 850 !important;

    white-space: nowrap !important;
}


/*
 * النجمة الخاصة بتثبيت السيرفر للحساب.
 */
.ftv-vip-pin {
    position: absolute !important;

    top: 5px !important;
    left: 7px !important;
    right: auto !important;

    width: 20px !important;
    height: 20px !important;

    display: grid !important;
    place-items: center !important;

    padding: 0 !important;
    margin: 0 !important;

    border-radius: 50% !important;

    font-size: 11px !important;
    line-height: 1 !important;

    z-index: 4 !important;
}


/* السيرفر المثبت */
.ftv-vip-pin.is-active {
    color: var(--accent) !important;
    border-color: var(--accent) !important;

    background:
        color-mix(
            in srgb,
            var(--accent) 12%,
            var(--surface)
        ) !important;
}


/* رقم السيرفر */
.ftv-watch-tab__number {
    text-align: center !important;
}


/* الاسم */
.ftv-watch-tab strong {
    width: 100% !important;
    text-align: center !important;

    font-size: 12px !important;
}


/* الجودة */
.ftv-watch-tab small {
    width: 100% !important;

    text-align: center !important;

    font-size: 9px !important;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    .ftv-watch-tabs {
        gap: 6px !important;
    }


    .ftv-watch-tab {
        min-width: 94px !important;
        min-height: 49px !important;

        padding: 7px 9px !important;

        border-radius: 9px !important;
    }


    .ftv-watch-tab--vip {
        padding-top: 20px !important;
    }


    .ftv-watch-tab strong {
        font-size: 10.5px !important;
    }


    .ftv-watch-tab__number {
        font-size: 8px !important;
    }


    .ftv-watch-tab small {
        font-size: 7.5px !important;
    }


    .ftv-watch-tab__vip {
        top: 5px !important;

        font-size: 7px !important;
    }


    .ftv-vip-pin {
        top: 4px !important;
        left: 5px !important;

        width: 18px !important;
        height: 18px !important;

        font-size: 10px !important;
    }


    .ftv-watch-free-label {
        min-height: 39px !important;

        margin-top: 8px !important;
        padding-inline: 10px !important;

        font-size: 9.5px !important;
    }


    .ftv-watch-free-label::after {
        width: 22px !important;
        height: 22px !important;

        font-size: 13px !important;
    }
}


/* موبايل صغير */
@media (max-width: 420px) {

    .ftv-watch-tab {
        min-width: 88px !important;
        min-height: 47px !important;

        padding-inline: 7px !important;
    }

}


/* =========================================================
   CLEAN FREE SERVERS DROPDOWN
========================================================= */

.ftv-watch-free-label {
    position: relative !important;

    min-height: 40px !important;

    padding:
        0
        42px
        0
        12px !important;

    justify-content: flex-start !important;

    border-radius: 9px !important;

    font-size: 10px !important;
    font-weight: 750 !important;
}


/* السهم الأنظف */
.ftv-watch-free-label::after {
    content: "" !important;

    position: absolute !important;

    inset-inline-start: 14px !important;
    top: 50% !important;

    width: 7px !important;
    height: 7px !important;

    margin: 0 !important;

    border: 0 !important;
    border-inline-end: 1.5px solid currentColor !important;
    border-block-end: 1.5px solid currentColor !important;

    border-radius: 0 !important;

    background: transparent !important;

    transform:
        translateY(-65%)
        rotate(45deg) !important;

    transition:
        transform .18s ease !important;

    opacity: .8 !important;
}


.ftv-watch-tabs.ftv-free-is-open
.ftv-watch-free-label::after {
    transform:
        translateY(-35%)
        rotate(225deg) !important;
}


/* شيل أي رقم/Badge قديم */
.ftv-watch-free-label .ftv-free-count {
    display: none !important;
}


@media (max-width: 700px) {

    .ftv-watch-free-label {
        min-height: 37px !important;

        padding:
            0
            36px
            0
            10px !important;

        font-size: 9px !important;
    }

    .ftv-watch-free-label::after {
        inset-inline-start: 12px !important;

        width: 6px !important;
        height: 6px !important;
    }
}


/* =========================================================
   DOWNLOAD — FREE SERVERS HEADING FOR VIP
========================================================= */

.ftv-download-free-heading {
    grid-column: 1 / -1 !important;

    width: 100% !important;

    margin: 8px 0 3px !important;
    padding: 9px 10px !important;

    border-top: 1px solid var(--border) !important;

    color: var(--text-muted) !important;

    font-size: 10px !important;
    font-weight: 750 !important;

    text-align: right !important;
}


@media (max-width: 700px) {

    .ftv-download-free-heading {
        margin-top: 6px !important;
        padding: 8px 6px !important;

        font-size: 9px !important;
    }
}


/* =========================================================
   VIP BADGE — ACCOUNT STYLE
   Watch + Download
========================================================= */

.ftv-watch-tab__vip,
.ftv-download-server__vip {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    gap: 4px !important;

    min-height: 21px !important;

    padding: 4px 7px !important;

    border: 0 !important;
    border-radius: 999px !important;

    background: var(--accent) !important;

    color: #111 !important;

    font-size: 8px !important;
    font-weight: 850 !important;
    line-height: 1 !important;

    white-space: nowrap !important;

    box-shadow:
        0 1px 2px rgba(0, 0, 0, .15) !important;
}


/*
 * مكان Badge المشاهدة يفضل كما هو:
 * أعلى منتصف التاب
 */
.ftv-watch-tab__vip {
    position: absolute !important;

    top: 5px !important;
    left: 50% !important;
    right: auto !important;

    transform: translateX(-50%) !important;

    margin: 0 !important;
}


/*
 * Badge التحميل:
 * لا نغير مكانه الحالي في layout،
 * فقط الشكل الداخلي.
 */
.ftv-download-server__vip {
    position: static !important;
    transform: none !important;
    margin: 0 !important;
}


/* التاج */
.ftv-vip-badge__icon {
    display: block !important;

    width: 12px !important;
    height: 12px !important;

    flex: 0 0 12px !important;

    color: currentColor !important;
}


/* النص */
.ftv-watch-tab__vip > span,
.ftv-download-server__vip > span {
    display: inline-block !important;

    line-height: 1 !important;

    color: inherit !important;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    .ftv-watch-tab__vip,
    .ftv-download-server__vip {
        min-height: 18px !important;

        padding: 3px 6px !important;

        gap: 3px !important;

        font-size: 7px !important;
    }


    .ftv-watch-tab__vip {
        top: 4px !important;
    }


    .ftv-vip-badge__icon {
        width: 10px !important;
        height: 10px !important;

        flex-basis: 10px !important;
    }
}


/* =========================================================
   VIP BADGE — COMPACT FINAL
   Watch + Download
========================================================= */

/*
 * مهم:
 * البادج ياخد عرض محتواه فقط
 * ولا يتمدد داخل الكارت.
 */
.ftv-watch-tab__vip,
.ftv-download-server__vip {
    width: auto !important;
    max-width: max-content !important;
    min-width: 0 !important;

    min-height: 0 !important;

    flex: 0 0 auto !important;
    align-self: auto !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    /*
     * RTL + row-reverse:
     * VIP ثم التاج بصريًا على الشمال
     */
    flex-direction: row-reverse !important;

    gap: 3px !important;

    padding: 3px 6px !important;
    margin: 0 !important;

    border: 0 !important;
    border-radius: 999px !important;

    background: var(--accent) !important;

    color: #111 !important;

    font-size: 7px !important;
    font-weight: 850 !important;
    line-height: 1 !important;

    white-space: nowrap !important;

    box-shadow: none !important;
}


/* =========================================================
   WATCH
   مكانه يفضل أعلى منتصف التاب
========================================================= */

.ftv-watch-tab__vip {
    position: absolute !important;

    top: 5px !important;
    left: 50% !important;
    right: auto !important;

    transform: translateX(-50%) !important;

    z-index: 3 !important;
}


/* =========================================================
   DOWNLOAD
   صغير على قد المحتوى فقط
========================================================= */

.ftv-download-server__vip {
    position: static !important;

    justify-self: center !important;

    transform: none !important;

    /* إلغاء أي stretch قديم */
    grid-column: auto !important;
}


/* التاج */
.ftv-vip-badge__icon {
    width: 9px !important;
    height: 9px !important;

    min-width: 9px !important;
    max-width: 9px !important;

    flex: 0 0 9px !important;

    display: block !important;

    margin: 0 !important;

    color: #111 !important;
}


/* VIP */
.ftv-watch-tab__vip > span,
.ftv-download-server__vip > span {
    display: inline-block !important;

    width: auto !important;

    margin: 0 !important;
    padding: 0 !important;

    line-height: 1 !important;

    color: #111 !important;
}


/* =========================================================
   MOBILE — أصغر شوية
========================================================= */

@media (max-width: 700px) {

    .ftv-watch-tab__vip,
    .ftv-download-server__vip {
        gap: 2px !important;

        padding: 2.5px 5px !important;

        font-size: 6.5px !important;
    }


    .ftv-watch-tab__vip {
        top: 4px !important;
    }


    .ftv-vip-badge__icon {
        width: 8px !important;
        height: 8px !important;

        min-width: 8px !important;
        max-width: 8px !important;

        flex-basis: 8px !important;
    }
}


/* =========================================================
   WATCH KICKER — SMALL PLAY ICON
========================================================= */

.ftv-watch-kicker {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;

    gap: 4px !important;

    direction: rtl !important;
}


/* الأيقونة صغيرة جدًا جنب كلمة المشاهدة */
.ftv-watch-kicker__icon {
    width: 13px !important;
    height: 13px !important;

    flex: 0 0 13px !important;

    display: inline-grid !important;
    place-items: center !important;

    color: var(--accent) !important;

    line-height: 1 !important;
}


.ftv-watch-kicker__icon svg {
    display: block !important;

    width: 100% !important;
    height: 100% !important;
}


/* Mobile */
@media (max-width: 700px) {

    .ftv-watch-kicker {
        gap: 3px !important;
    }

    .ftv-watch-kicker__icon {
        width: 11px !important;
        height: 11px !important;

        flex-basis: 11px !important;
    }
}


/* =========================================================
   WATCH PLAY ICON — VERTICAL CENTER FINAL
========================================================= */

.ftv-watch-kicker__icon {
    position: relative !important;

    /*
     * كانت طالعة لفوق سنة.
     * ننزلها 1px فقط.
     */
    transform: translateY(1px) !important;

    vertical-align: middle !important;
}

.ftv-watch-kicker__icon svg {
    display: block !important;
}


/* =========================================================
   MOBILE MORE MENU — CLOSE BUTTON RIGHT
========================================================= */

@media (max-width: 900px) {

    /*
     * زر X داخل قائمة المزيد:
     * أقصى اليمين ومتوسط داخل الهيدر.
     */
    .mobile-more-menu button[aria-label*="إغلاق"],
    .mobile-more-menu .mobile-more-close,
    .mobile-more-sheet button[aria-label*="إغلاق"],
    .mobile-more-sheet .mobile-more-close,
    .mobile-menu-more button[aria-label*="إغلاق"],
    .mobile-menu-more .mobile-more-close,
    .more-menu button[aria-label*="إغلاق"],
    .more-menu .mobile-more-close {
        position: absolute !important;

        top: 42px !important;

        right: 18px !important;
        left: auto !important;

        margin: 0 !important;

        z-index: 10 !important;
    }

}


/* =========================================================
   FREE SERVERS DROPDOWN ARROW
   Closed = current direction
   Open   = down
========================================================= */

/*
 * السهم نفسه
 */
.ftv-free-servers-toggle svg,
.ftv-watch-free-toggle svg,
.ftv-free-servers-toggle .ftv-free-arrow,
.ftv-watch-free-toggle .ftv-free-arrow {
    transition: transform .18s ease !important;
    transform-origin: center !important;
}


/*
 * لما الدروب داون مفتوح:
 * السهم يبقى لتحت
 */
.ftv-free-servers-toggle[aria-expanded="true"] svg,
.ftv-watch-free-toggle[aria-expanded="true"] svg,
.ftv-free-servers-toggle[aria-expanded="true"] .ftv-free-arrow,
.ftv-watch-free-toggle[aria-expanded="true"] .ftv-free-arrow {
    transform: rotate(90deg) !important;
}


/*
 * لما مقفول يرجع للوضع الأساسي
 */
.ftv-free-servers-toggle[aria-expanded="false"] svg,
.ftv-watch-free-toggle[aria-expanded="false"] svg,
.ftv-free-servers-toggle[aria-expanded="false"] .ftv-free-arrow,
.ftv-watch-free-toggle[aria-expanded="false"] .ftv-free-arrow {
    transform: rotate(0deg) !important;
}


/* =========================================================
   FREE SERVERS — REAL ARROW
========================================================= */

.ftv-free-servers-real-toggle {
    position: relative !important;
}


/* سهمنا */
.ftv-free-servers-real-arrow {
    display: inline-grid !important;
    place-items: center !important;

    width: 18px !important;
    height: 18px !important;

    margin-inline-start: 7px !important;

    flex: 0 0 18px !important;

    color: currentColor !important;

    line-height: 1 !important;
}


/* SVG */
.ftv-free-servers-real-arrow svg {
    display: block !important;

    width: 14px !important;
    height: 14px !important;

    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.8 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;

    transform: rotate(0deg) !important;

    transition:
        transform .18s ease !important;
}


/*
 * مفتوح = سهم لتحت
 * السهم الأصلي داخل SVG اتجاهه يمين،
 * 90deg يحوله لتحت.
 */
.ftv-free-servers-real-toggle.is-free-open
.ftv-free-servers-real-arrow svg {

    transform: rotate(90deg) !important;
}


/* Mobile */
@media (max-width: 700px) {

    .ftv-free-servers-real-arrow {
        width: 16px !important;
        height: 16px !important;

        flex-basis: 16px !important;

        margin-inline-start: 5px !important;
    }


    .ftv-free-servers-real-arrow svg {
        width: 12px !important;
        height: 12px !important;
    }

}


/* =========================================================
   FREE SERVERS — USE ORIGINAL CHEVRON ONLY
========================================================= */

/* إخفاء السهم الإضافي اللي عملناه قبل كده */
.ftv-free-servers-real-arrow {
    display: none !important;
}


/*
 * السهم الأصلي الموجود أقصى اليمين
 */
.ftv-free-original-chevron {
    display: block !important;

    width: 15px !important;
    height: 15px !important;

    flex: 0 0 15px !important;

    margin: 0 !important;

    transform: rotate(0deg) !important;
    transform-origin: center !important;

    transition: transform .18s ease !important;
}


/*
 * مفتوح = لتحت
 * الأصل اتجاهه يمين، لذلك +90 درجة
 */
.ftv-free-original-chevron.is-open {
    transform: rotate(90deg) !important;
}


/* Mobile */
@media (max-width: 700px) {

    .ftv-free-original-chevron {
        width: 13px !important;
        height: 13px !important;

        flex-basis: 13px !important;
    }

}


/* =========================================================
   FREE SERVERS CHEVRON — SOURCE VERSION
   One real SVG only
========================================================= */

/*
 * إلغاء كل الأسهم المصنوعة بـ ::after
 */
.ftv-watch-free-label::after {
    content: none !important;
    display: none !important;
}


/*
 * إخفاء أي سهم تم حقنه بالترقيعات القديمة
 */
.ftv-free-servers-real-arrow,
.ftv-free-original-chevron {
    display: none !important;
}


/*
 * العنوان الأصلي
 */
.ftv-watch-free-label {
    display: flex !important;
    align-items: center !important;

    position: relative !important;

    cursor: pointer !important;
}


/*
 * النص
 */
.ftv-watch-free-label__text {
    display: inline-flex !important;
    align-items: center !important;

    min-width: 0 !important;
}


/*
 * السهم الحقيقي الموجود في ServerFrontend.php
 */
.ftv-watch-free-label__chevron {
    display: block !important;

    width: 15px !important;
    height: 15px !important;

    flex: 0 0 15px !important;

    margin-inline-start: auto !important;

    transform: rotate(0deg) !important;
    transform-origin: center !important;

    transition: transform .18s ease !important;
}


/*
 * مفتوح:
 * من يمين إلى أسفل.
 */
.ftv-watch-free-label[aria-expanded="true"]
.ftv-watch-free-label__chevron {
    transform: rotate(90deg) !important;
}


@media (max-width: 700px) {

    .ftv-watch-free-label__chevron {
        width: 13px !important;
        height: 13px !important;

        flex-basis: 13px !important;
    }

}


/* =========================================================
   FREE SERVERS CHEVRON — FAR RIGHT FIX
========================================================= */

.ftv-watch-free-label {
    display: flex !important;
    align-items: center !important;

    direction: rtl !important;

    position: relative !important;
}


/*
 * النص يفضل ناحية اليمين
 */
.ftv-watch-free-label__text {
    display: inline-flex !important;
    align-items: center !important;

    order: 1 !important;
}


/*
 * السهم أقصى اليمين
 */
.ftv-watch-free-label__chevron {
    order: 0 !important;

    margin: 0 0 0 8px !important;

    width: 15px !important;
    height: 15px !important;

    flex: 0 0 15px !important;

    transform: rotate(0deg) !important;
}


/*
 * مهم:
 * نلغي الـauto القديم اللي كان بيوديه للشمال
 */
.ftv-watch-free-label__chevron {
    margin-inline-start: 0 !important;
    margin-inline-end: 8px !important;
}


/*
 * مفتوح = السهم لتحت
 */
.ftv-watch-free-label[aria-expanded="true"]
.ftv-watch-free-label__chevron {
    transform: rotate(90deg) !important;
}


/* =========================================================
   FREE SERVERS LABEL — SPACING + ARROW DIRECTION
========================================================= */

.ftv-watch-free-label {
    display: flex !important;
    align-items: center !important;

    direction: rtl !important;
}


/*
 * النص + الكرة الأرضية
 */
.ftv-watch-free-label__text {
    display: inline-flex !important;
    align-items: center !important;

    gap: 4px !important;
}


/*
 * لو الكرة الأرضية مازالت جزء من النص نفسه
 * نضيف مسافة بسيطة بعد الإيموجي بصريًا
 */
.ftv-watch-free-label__text {
    word-spacing: 2px !important;
}


/*
 * السهم يفضل في نفس مكانه أقصى اليمين
 */
.ftv-watch-free-label__chevron {
    order: 0 !important;

    margin-inline-start: 0 !important;
    margin-inline-end: 8px !important;

    width: 15px !important;
    height: 15px !important;

    flex: 0 0 15px !important;

    transform-origin: center !important;

    /*
     * السهم الأصلي SVG اتجاهه يمين
     * 180deg = ناحية الشمال
     */
    transform: rotate(180deg) !important;

    transition: transform .18s ease !important;
}


/*
 * لما يفتح يبقى لتحت
 */
.ftv-watch-free-label[aria-expanded="true"]
.ftv-watch-free-label__chevron {
    transform: rotate(90deg) !important;
}


@media (max-width: 700px) {

    .ftv-watch-free-label__text {
        gap: 3px !important;
    }

    .ftv-watch-free-label__chevron {
        width: 13px !important;
        height: 13px !important;

        flex-basis: 13px !important;

        margin-inline-end: 6px !important;
    }

}


/* =========================================================
   FREE SERVERS LABEL — ALL TO FAR RIGHT
========================================================= */

.ftv-watch-free-label {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;

    direction: rtl !important;

    width: 100% !important;

    gap: 6px !important;

    padding-right: 12px !important;
    padding-left: 12px !important;

    box-sizing: border-box !important;
}


/* النص + الكرة */
.ftv-watch-free-label__text {
    display: inline-flex !important;
    align-items: center !important;

    order: 1 !important;

    margin: 0 !important;
    padding: 0 !important;

    white-space: nowrap !important;

    word-spacing: 3px !important;
}


/* السهم جنبهم مباشرة */
.ftv-watch-free-label__chevron {
    order: 0 !important;

    width: 15px !important;
    height: 15px !important;

    flex: 0 0 15px !important;

    margin: 0 !important;

    transform: rotate(180deg) !important;
    transform-origin: center !important;

    transition: transform .18s ease !important;
}


/* وقت الفتح = لتحت */
.ftv-watch-free-label[aria-expanded="true"]
.ftv-watch-free-label__chevron {
    transform: rotate(90deg) !important;
}


@media (max-width: 700px) {

    .ftv-watch-free-label {
        gap: 5px !important;
        padding-right: 9px !important;
    }

    .ftv-watch-free-label__chevron {
        width: 13px !important;
        height: 13px !important;
        flex-basis: 13px !important;
    }

}


@media (max-width: 767px) {

    .ftv-server-modal,
    .ftv-server-overlay,
    .ftv-server-panel {
        -webkit-backdrop-filter:
            none !important;

        backdrop-filter:
            none !important;

        box-shadow:
            0 6px 18px rgba(0,0,0,.18) !important;
    }

}

