/* ═══════════════════════════════════════════════════════════════════════════════
   🎭 MODALI SAINTCHANNEL - Sistema Verde Neon Design
   ═══════════════════════════════════════════════════════════════════════════════ */

/* 🎨 Variabili CSS per Modali - Utilizzo Sistema Unificato */
:root {
    /* Variabili specifiche modali che utilizzano il sistema unificato */
    --st-modal-bg: var(--st-dark-surface);
    --st-modal-border: var(--st-primary);
    --st-modal-border-radius: var(--st-radius-md);
    --st-modal-shadow: var(--st-shadow-primary-lg);
    --st-modal-overlay: rgba(0, 0, 0, 0.8);
    --st-modal-icon-bg: var(--st-gradient-primary);
    --st-modal-header-bg: var(--st-gradient-dark);
}

/* 🌑 Modal Backdrop con Stile SaintChannel */
.modal-backdrop {
    background-color: var(--st-modal-overlay);
    backdrop-filter: blur(5px);
}

/* 📦 Container Principale Modale */
.st-modal-content {
    background: var(--st-modal-bg);
    border: 2px solid var(--st-modal-border);
    border-radius: var(--st-modal-border-radius);
    box-shadow: var(--st-modal-shadow);
    overflow: hidden;
    position: relative;
}

.st-modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--st-primary), transparent);
    animation: modalGlow 2s ease-in-out infinite alternate;
}

@keyframes modalGlow {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

/* 🎯 Header della Modale */
.st-modal-header {
    background: var(--st-modal-header-bg);
    border-bottom: 1px solid rgba(var(--st-primary-rgb), 0.2);
    padding: var(--st-space-xl);
    display: flex;
    align-items: center;
    gap: var(--st-space-md);
    position: relative;
}

.st-modal-icon {
    width: 50px;
    height: 50px;
    background: var(--st-modal-icon-bg);
    border-radius: var(--st-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--st-black);
    flex-shrink: 0;
    box-shadow: var(--st-shadow-primary);
}

.st-modal-title-wrapper {
    flex: 1;
}

.st-modal-title {
    color: var(--st-primary);
    font-weight: var(--st-font-bold);
    font-size: var(--st-text-xl);
    margin: 0;
    text-shadow: 0 0 10px rgba(var(--st-primary-rgb), 0.3);
}

.st-modal-subtitle {
    color: var(--st-text-secondary);
    font-size: var(--st-text-sm);
    margin: var(--st-space-xs) 0 0 0;
    font-style: italic;
}

/* ❌ Pulsante Chiusura Personalizzato */
.st-modal-close {
    background: none;
    border: none;
    color: var(--st-text-secondary);
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    border-radius: var(--st-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--st-transition-normal);
    position: relative;
    overflow: hidden;
}

.st-modal-close::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 69, 58, 0.1);
    border-radius: var(--st-radius-full);
    transition: var(--st-transition-normal);
    transform: translate(-50%, -50%);
}

.st-modal-close:hover {
    color: #ff453a;
    transform: rotate(90deg);
}

.st-modal-close:hover::before {
    width: 100%;
    height: 100%;
}

/* 📝 Body della Modale */
.st-modal-body {
    padding: var(--st-space-2xl);
    color: var(--st-text-primary);
    background: var(--st-gradient-dark-card);
}

/* 🎬 Contenitore Video */
.st-video-container {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--st-black);
    border-radius: var(--st-radius-sm);
    border: 1px solid rgba(var(--st-primary-rgb), 0.3);
    overflow: hidden;
    position: relative;
}

.st-video-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--st-text-secondary);
}

.st-video-play-icon {
    font-size: 4rem;
    color: var(--st-primary);
    margin-bottom: var(--st-space-md);
    display: block;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.st-video-text {
    margin: 0;
    font-size: var(--st-text-base);
}

/* 👍 Footer della Modale */
.st-modal-footer {
    background: var(--st-modal-header-bg);
    border-top: 1px solid rgba(var(--st-primary-rgb), 0.2);
    padding: var(--st-space-xl);
    display: flex;
    gap: var(--st-space-md);
    justify-content: flex-end;
}

/* 🔘 Bottoni Modale con Design SaintChannel */
.st-btn-primary {
    background: var(--st-gradient-primary);
    border: none;
    color: var(--st-black);
    font-weight: var(--st-font-semibold);
    padding: 0.75rem 1.5rem;
    border-radius: var(--st-radius-sm);
    transition: var(--st-transition-normal);
    box-shadow: var(--st-shadow-primary);
    position: relative;
    overflow: hidden;
}

.st-btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.st-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--st-shadow-glow);
    color: var(--st-black);
    background: linear-gradient(135deg, var(--st-green-neon) 0%, var(--st-primary) 100%);
}

.st-btn-primary:hover::before {
    left: 100%;
}

.st-btn-secondary {
    background: transparent;
    border: 2px solid var(--st-text-muted);
    color: var(--st-text-muted);
    font-weight: var(--st-font-semibold);
    padding: 0.75rem 1.5rem;
    border-radius: var(--st-radius-sm);
    transition: var(--st-transition-normal);
}

.st-btn-secondary:hover {
    background: var(--st-text-muted);
    color: var(--st-white);
    transform: translateY(-2px);
    box-shadow: var(--st-shadow-md);
}

/* ✅ Modale Successo */
.st-modal-success .st-modal-icon-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.st-success-animation {
    margin-bottom: var(--st-space-xl);
}

.st-success-icon {
    font-size: 4rem;
    color: #28a745;
    animation: successBounce 0.6s ease-out;
}

@keyframes successBounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.st-success-message {
    font-size: var(--st-text-lg);
    color: var(--st-text-primary);
    margin: 0;
}

/* 📱 Responsive Design */
@media (max-width: 768px) {
    .st-modal-header {
        padding: var(--st-space-md);
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .st-modal-body {
        padding: var(--st-space-xl);
    }
    
    .st-modal-footer {
        padding: var(--st-space-md);
        flex-direction: column;
    }
    
    .st-modal-footer .btn {
        width: 100%;
        margin-bottom: var(--st-space-sm);
    }
    
    .st-modal-footer .btn:last-child {
        margin-bottom: 0;
    }
    
    .st-video-play-icon {
        font-size: 3rem;
    }
}

/* 🎯 Form styling nelle modali (utilizza contact-form esistente) */
.st-modal-body .contact-form .form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(var(--st-primary-rgb), 0.3);
    color: var(--st-text-primary);
    border-radius: var(--st-radius-sm);
    padding: 0.75rem;
    transition: var(--st-transition-normal);
}

.st-modal-body .contact-form .form-control:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--st-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--st-primary-rgb), 0.25);
    color: var(--st-white);
}

.st-modal-body .contact-form .form-label {
    color: var(--st-primary);
    font-weight: var(--st-font-semibold);
    margin-bottom: var(--st-space-sm);
}

/* 🎨 Animazioni di apertura modale */
.modal.fade .modal-dialog {
    transition: transform var(--st-transition-slow), opacity var(--st-transition-slow);
    transform: translate(0, -50px) scale(0.8);
}

.modal.show .modal-dialog {
    transform: translate(0, 0) scale(1);
}
