/* Custom Modal System - Platform Wide */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-container {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.modal-header.success {
    background: #d4edda;
    border-bottom-color: #c3e6cb;
}

.modal-header.error {
    background: #f8d7da;
    border-bottom-color: #f5c6cb;
}

.modal-header.warning {
    background: #fff3cd;
    border-bottom-color: #ffeeba;
}

.modal-header.info {
    background: #d1ecf1;
    border-bottom-color: #bee5eb;
}

.modal-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modal-icon.success {
    background: #28a745;
    color: white;
}

.modal-icon.error {
    background: #dc3545;
    color: white;
}

.modal-icon.warning {
    background: #ffc107;
    color: #333;
}

.modal-icon.info {
    background: #17a2b8;
    color: white;
}

.modal-icon i {
    width: 24px;
    height: 24px;
}

.modal-title {
    flex: 1;
}

.modal-title h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-body p {
    margin: 0 0 1rem 0;
    line-height: 1.6;
    color: #495057;
}

.modal-body ul {
    margin: 0;
    padding-left: 1.5rem;
}

.modal-body ul li {
    margin-bottom: 0.5rem;
    color: #495057;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.modal-btn {
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.modal-btn.btn-primary {
    background: #007bff;
    color: white;
}

.modal-btn.btn-primary:hover {
    background: #0056b3;
}

.modal-btn.btn-success {
    background: #28a745;
    color: white;
}

.modal-btn.btn-success:hover {
    background: #218838;
}

.modal-btn.btn-danger {
    background: #dc3545;
    color: white;
}

.modal-btn.btn-danger:hover {
    background: #c82333;
}

.modal-btn.btn-secondary {
    background: #6c757d;
    color: white;
}

.modal-btn.btn-secondary:hover {
    background: #5a6268;
}

.modal-btn.btn-outline {
    background: transparent;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.modal-btn.btn-outline:hover {
    background: #f8f9fa;
    border-color: #dee2e6;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Close button */
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        max-width: none;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-btn {
        width: 100%;
    }
}
