/* Training Modal Styles */

.training-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.training-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 1;
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 1rem;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 2;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.training-modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem;
    border-bottom: 2px solid #e2e8f0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-icon {
    width: 3rem;
    height: 3rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
    color: white;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-close span {
    font-size: 2rem;
    line-height: 1;
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

/* Custom scrollbar for modal */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.modal-section {
    margin-bottom: 2rem;
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section h4 {
    color: #1e293b;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-section h4::before {
    content: '';
    width: 4px;
    height: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.modal-section p {
    color: #475569;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.modal-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modal-section li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.75rem;
    color: #475569;
    line-height: 1.6;
}

.modal-section li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

.modal-actions {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #e2e8f0;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.modal-actions .btn {
    flex: 1;
    min-width: 200px;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .training-modal {
        padding: 0;
        align-items: flex-end;
    }
    
    .modal-content {
        max-height: 95vh;
        border-radius: 1rem 1rem 0 0;
        max-width: 100%;
    }
    
    .modal-header {
        padding: 1.5rem;
    }
    
    .modal-header h3 {
        font-size: 1.25rem;
    }
    
    .modal-icon {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.25rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .modal-section h4 {
        font-size: 1.125rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions .btn {
        width: 100%;
        min-width: 0;
    }
}

/* Print styles - hide modal when printing */
@media print {
    .training-modal {
        display: none !important;
    }
}

/* Animation for modal sections */
.modal-section {
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
}

.modal-section:nth-child(1) { animation-delay: 0.1s; }
.modal-section:nth-child(2) { animation-delay: 0.2s; }
.modal-section:nth-child(3) { animation-delay: 0.3s; }
.modal-section:nth-child(4) { animation-delay: 0.4s; }
.modal-section:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
