/* Video Tutorial Modal Styles */

.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-modal.show {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

.video-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    background: var(--bg-main, #1e293b);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    z-index: 10001;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.video-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10002;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.video-modal-close:hover {
    background: rgba(220, 38, 38, 1);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.video-modal-body {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* نسبة 16:9 */
    background: #000;
}

.video-modal-body iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Video Tutorial Button */
.video-tutorial-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    white-space: nowrap;
}

.video-tutorial-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5);
}

.video-tutorial-btn:active {
    transform: translateY(0);
}

.video-tutorial-btn::before {
    content: "▶";
    font-size: 12px;
    display: inline-block;
}

/* نسخة صغيرة للأزرار المدمجة */
.video-tutorial-btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
}

/* نسخة أيقونة فقط */
.video-tutorial-btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
}

.video-tutorial-btn-icon::before {
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .video-modal-content {
        width: 95%;
        border-radius: 12px;
    }
    
    .video-modal-close {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    .video-tutorial-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* زر متعدد الفيديوهات */
.video-tutorials-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.video-tutorial-badge {
    position: relative;
}

.video-tutorial-badge::after {
    content: attr(data-badge);
    position: absolute;
    top: -6px;
    right: -6px;
    background: #10b981;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

