/* ═══════════════════════════════════════════════════════════
   رادیک وب — مودال پخش ویدئو
   پیشوند: vid-modal-
   ═══════════════════════════════════════════════════════════ */

.vid-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2147483646;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.vid-modal-overlay.vid-modal-show {
    opacity: 1;
    visibility: visible;
}

.vid-modal-box {
    width: 100%;
    max-width: 960px;
    max-height: 90vh;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.4, 0.64, 1);
    display: flex;
    flex-direction: column;
    position: relative;
}
.vid-modal-overlay.vid-modal-show .vid-modal-box {
    transform: scale(1);
}

.vid-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    font-size: 18px;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}
.vid-modal-close:hover {
    background: #EF4444;
    transform: scale(1.1);
}
.vid-modal-close i { line-height: 1; }

.vid-modal-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    position: relative;
}
.vid-modal-player video,
.vid-modal-player iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: none;
}

.vid-modal-info {
    padding: 18px 22px;
    background: #fff;
    max-height: 200px;
    overflow-y: auto;
}
.vid-modal-title {
    font-family: 'Lalezar-ExtraBold', sans-serif;
    font-size: 18px;
    color: #1E3A8A;
    margin: 0 0 8px;
    font-weight: 400;
}
.vid-modal-desc {
    font-family: 'Shabnam-Bold-P', Tahoma, sans-serif;
    font-size: 13px;
    color: #6B7280;
    line-height: 1.8;
    margin: 0;
}
.vid-modal-error {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #fff;
    font-family: 'Shabnam-Bold-P', Tahoma, sans-serif;
    font-size: 14px;
}

/* ═══ Dark Mode ═══ */
[data-theme="dark"] .vid-modal-box { background: #111C2F; }
[data-theme="dark"] .vid-modal-info { background: #111C2F; }
[data-theme="dark"] .vid-modal-title { color: #F1F5F9; }
[data-theme="dark"] .vid-modal-desc { color: #94A3B8; }

/* ═══ موبایل ═══ */
@media (max-width: 768px) {
    .vid-modal-overlay {
        padding: 0;
        align-items: stretch;
    }
    .vid-modal-box {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
        height: 100vh;
    }
    .vid-modal-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
    }
    .vid-modal-info { padding: 14px 16px; }
    .vid-modal-title { font-size: 16px; }
    .vid-modal-desc { font-size: 12px; }
}