
.bestmedia-live-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #e74c3c;
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    z-index: 9999;
}


.bestmedia-live-popup {
    position: fixed;
    bottom: 15px;
    left: 15px;
    width: 400px;
    height: auto;
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    padding: 8px;
    box-sizing: border-box;
    z-index: 99999;
    display: none; /* مهم للبداية  حالة مخفية */
    opacity: 0; /* للبداية م حالة شفافة */
}



.bestmedia-live-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.bestmedia-live-content iframe {
    width: 100%;
    height: 220px; /* رتفع ثابت واضح للفيديو */
    border-radius: 12px;
    border: none;
}

.live-title {
    margin-top: 6px;
    text-align: right;
    font-weight: bold;
    font-size: 14px;
    color: #333;
    line-height: 1.4;
    white-space: normal; /* سمح بانتقال لنص إلى سر جديد */
    word-wrap: break-word; /* كسر انص بشكل مناب */
    overflow: visible;
    padding-bottom: 4px;
}



.bestmedia-close-popup {
    position: absolute;
    top: -8px;
    left: -8px;
    width: 30px;
    height: 30px;
    background-color: #d93025;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    z-index: 100000;
}

.bestmedia-close-popup::before {
    content: '✖';
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}


.bestmedia-live-notification {
    position: fixed;
    top: 20px; /* ل لمكان الإشعر أعى الشاشة */
    right: 20px;
    background-color: #2ecc71;
    color: #ffffff;
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    font-size: 14px;
    font-weight: bold;
    z-index: 99999;
    display: none;
}



/* تحسينات يبونسف للجوال اأجزة اللوحية */

/* للأجهزة التي يقل عر شاشتها عن 480px (الوالات الصغيرة) */
@media (max-width: 480px) {
    .bestmedia-live-popup {
        width: 90%;
        left: 5%;
        bottom: 10px;
        padding: 6px;
        border-radius: 12px;
    }
    
    .bestmedia-live-content iframe {
        height: 180px; /* ارتفاع ماسب لشاشة اجول */
        border-radius: 10px;
    }

    .live-title {
        font-size: 12px;
        padding-top: 4px;
    }

    .bestmedia-close-popup {
        width: 26px;
        height: 26px;
        top: 6px !important;
        left: 6px !important;
        font-size: 14px;
    }

    .bestmedia-live-notification {
        width: 90%;
        right: 5%;
        bottom: 10px;
        font-size: 13px;
        text-align: center;
    }
}

/* للجهزة بين 481px و768px (أجهزة لوحية وجوالات كبرة) */
@media (min-width: 481px) and (max-width: 768px) {
    .bestmedia-live-popup {
        width: 80%;
        left: 10%;
        bottom: 15px;
        padding: 8px;
        border-radius: 14px;
    }

    .bestmedia-live-content iframe {
        height: 220px;
    }

    .live-title {
        font-size: 13px;
        padding-top: 4px;
    }

    .bestmedia-close-popup {
        width: 28px;
        height: 28px;
        top: 8px !important;
        left: 8px !important;
        font-size: 15px;
    }

 .bestmedia-live-toast {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    left: auto !important;
    width: auto !important;
    max-width: 300px !important;
    background-color: #27ae60 !important;
    color: #ffffff !important;
    padding: 10px 20px !important;
    font-size: 14px !important;
    border-radius: 12px !important;
    box-shadow: 0 3px 8px rgba(0,0,0,0.3) !important;
    z-index: 10000 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(100%) !important;
    transition: opacity 0.4s ease, transform 0.4s ease !important;
    text-align: center !important;
}

.bestmedia-live-toast.active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

@media (max-width: 600px) {
    .bestmedia-live-toast {
        right: 10px !important;
        left: 10px !important;
        max-width: 90% !important;
        bottom: 15px !important;
    }
}
