/* AI-Header: Modal component styles with theme support */
/* Date: 2025-08-15 */

/* ===========================================
   MODAL - BASE STRUCTURE
   =========================================== */

/* Modal Overlay */
.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    z-index: 1050 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0;
    animation: modalFadeIn 0.15s ease-out forwards;
}

.modal-dialog {
    max-width: 500px !important;
    margin: 0 !important;
    transform: scale(0.95);
    animation: modalSlideIn 0.15s ease-out forwards;
}

.modal-content {
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid;
    width: 100%;
    overflow: hidden;
}

.modal-header {
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid;
    padding: 1.25rem 1.75rem;
}

.modal-body {
    padding: 1.75rem;
}

.modal-footer {
    border-radius: 0 0 12px 12px;
    border-top: 1px solid;
    padding: 1.25rem 1.75rem;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    background: rgba(0, 0, 0, 0.02);
}

/* Modal Animations */
@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from { 
        transform: scale(0.95) translateY(-20px);
        opacity: 0;
    }
    to { 
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* ===========================================
   MODAL - LIGHT THEME
   =========================================== */

[data-bs-theme="light"] .modal-content {
    background: #ffffff;
    border-color: #dee2e6;
}

[data-bs-theme="light"] .modal-header {
    background: #f8f9fa;
    border-bottom-color: #dee2e6;
}

[data-bs-theme="light"] .modal-footer {
    background: #f1f3f4;
    border-top-color: #dee2e6;
}

/* ===========================================
   MODAL - DARK THEME
   =========================================== */

[data-bs-theme="dark"] .modal-content {
    background: #2a2a2a;
    border-color: #404040;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

[data-bs-theme="dark"] .modal-header {
    background: #343a40;
    border-bottom-color: #404040;
}

[data-bs-theme="dark"] .modal-footer {
    background: #1e2124;
    border-top-color: #404040;
}

/* Themed modal variant: align surfaces with shared tokens (optional) */
.modal-themed .modal-content { background: var(--surface-card, var(--bs-card-bg)); border-color: var(--bs-border-color); }
.modal-themed .modal-header { background: var(--surface-card, var(--bs-card-bg)); border-bottom-color: var(--bs-border-color); }
.modal-themed .modal-footer { background: var(--surface-card, var(--bs-card-bg)); border-top-color: var(--bs-border-color); }
