/* Modal Overlay */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    animation: fadeIn 0.2s ease-in-out;
}

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

/* Modal Container */
.modal-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 320px;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease-out;
}

/* Modal Header */
.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
}

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

/* Modal Body */
.modal-body {
    padding: 24px;
    color: #555;
    line-height: 1.6;
}

/* Modal Footer */
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Modal Buttons */
.modal-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-btn:focus {
    outline: 2px solid #4A90E2;
    outline-offset: 2px;
}

.modal-btn-primary {
    background-color: #4A90E2;
    color: white;
}

.modal-btn-primary:hover {
    background-color: #357ABD;
}

.modal-btn-secondary {
    background-color: #e0e0e0;
    color: #555;
}

.modal-btn-secondary:hover {
    background-color: #d0d0d0;
}

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

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

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

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

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

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Alert Specific Styles */
.modal-container.modal-alert .modal-footer {
    justify-content: center;
}

/* Confirm Specific Styles */
.modal-container.modal-confirm .modal-footer {
    justify-content: flex-end;
}
