/* ============================================
   MODALS.CSS - MODAL OVERLAYS & ANIMATIONS
   ========================================== */

/* Overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    animation: fadeIn 0.2s ease;
}

/* Modal Container */
.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    width: 90%;
    max-width: 640px;
    max-height: 90vh;

    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);

    overflow-y: auto;
    z-index: 201;

    animation: modalIn 0.3s ease;
}

/* Modal Animation */
@keyframes modalIn {
    from {
        opacity: 0;
        transform: translate(-50%, -48%) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Header */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

/* Close Button */
.modal-close {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 32px;
    height: 32px;

    border: none;
    border-radius: 8px;

    background: #f1f5f9;
    color: var(--text-secondary);

    font-size: 1.2rem;
    cursor: pointer;

    transition: var(--transition);
}

.modal-close:hover {
    background: var(--danger-light);
    color: var(--danger);
}

/* Body */
.modal-body {
    padding: 24px;
}

/* Footer */
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;

    padding: 16px 24px;

    border-top: 1px solid var(--border);
    border-bottom-left-radius: var(--radius);
    border-bottom-right-radius: var(--radius);

    background: #f8fafc;
}