/* =====================================================
   MODALS - Estilos de modales
   ===================================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    padding: 24px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #4459D7;
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f0f0f0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    color: #6b6b6b;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #e0e0e0;
    color: #2d3748;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
}

/* --- Syncfusion Dialog Footer --- */
.e-dialog .e-footer-content,
.e-dialog .e-dlg-footer,
.e-dialog .modal-footer {
    padding: 16px 24px !important;
    border-top: none !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 12px !important;
    background: #f8fafc !important;
    margin: 0 !important;
}

.e-dialog .e-footer-content .e-btn,
.e-dialog .modal-footer .e-btn {
    min-width: 100px;
    height: 36px;
    margin: 0 !important;
}

/* --- PIDT Modal Base - Estilos consistentes para todos los modales --- */
.pidt-modal .e-dlg-header-content {
    background: white;
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
}

.e-dialog .e-dlg-header-content + .e-dlg-content {
    padding-top: 15px !important;
}

.pidt-modal .e-dlg-header {
    color: #4459D7 !important;
    font-weight: 600;
    font-size: 18px;
}

.pidt-modal .modal-header-content {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #4459D7;
    font-weight: 600;
    font-size: 18px;
}

.pidt-modal .modal-header-content .e-icons {
    font-size: 20px;
}

.pidt-modal .e-dlg-closeicon-btn {
    color: #64748b !important;
}

.pidt-modal .e-dlg-closeicon-btn:hover {
    color: #4459D7 !important;
}

.pidt-modal .e-dlg-content {
    padding: 20px;
    background: #f8fafc;
}

.pidt-modal .modal-body {
    background: white;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.pidt-modal .form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.pidt-modal .form-group {
    margin-bottom: 16px;
}

.pidt-modal .form-group:last-child {
    margin-bottom: 0;
}

.pidt-modal .form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

/* --- Delete Warning --- */
.delete-warning {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: #fff3e0;
    border-radius: 8px;
    border-left: 4px solid #FFB300;
    margin-bottom: 16px;
}

.warning-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.warning-content {
    flex: 1;
}

.delete-info-box {
    padding: 12px 16px;
    background: #ffebee;
    border-radius: 6px;
    border-left: 3px solid #E53935;
}

/* --- Form Warning (modal context) --- */
.form-warning {
    padding: 12px;
    background: #fff3e0;
    border-left: 3px solid #FFB300;
    border-radius: 4px;
    font-size: 13px;
    color: #7f6003;
    margin-top: 8px;
}
