/* app/static/app/css/components/modal.css */
/* Reusable modal component - replaces all alert() calls */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.modal-overlay.show {
    opacity: 1;
    pointer-events: all;
}

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

.modal-overlay.show .modal-box {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid #e5e5e5;
}

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

.modal-icon.success {
    background-color: #dcfce7;
    color: #16a34a;
}

.modal-icon.error {
    background-color: #fee2e2;
    color: #dc2626;
}

.modal-icon.warning {
    background-color: #fef3c7;
    color: #f59e0b;
}

.modal-icon.info {
    background-color: #dbeafe;
    color: #2563eb;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.modal-body {
    padding: 20px 24px;
    color: #4b5563;
    line-height: 1.6;
    overflow-y: auto;
    max-height: calc(80vh - 140px);
}

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

.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-btn-primary {
    background-color: #2563eb;
    color: white;
}

.modal-btn-primary:hover {
    background-color: #1d4ed8;
}

.modal-btn-secondary {
    background-color: #f3f4f6;
    color: #374151;
}

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

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .modal-box {
        background: #1f2937;
    }

    .modal-header,
    .modal-footer {
        border-color: #374151;
    }

    .modal-title {
        color: #f9fafb;
    }

    .modal-body {
        color: #d1d5db;
    }

    .modal-btn-secondary {
        background-color: #374151;
        color: #f9fafb;
    }

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