/**
 * TempoModal - Modal Component
 * BUILD 755.9 - CSS Component
 * Estilos para modales del sistema TEMPO
 */

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease-out;
}

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

.modal-overlay.hiding {
    animation: fadeOut 0.2s ease-in forwards;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Modal Container */
.modal-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modal Header */
.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-title i {
    font-size: 20px;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #6b7280;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #111827;
}

/* Modal Body */
.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

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

/* Modal Buttons */
.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.modal-btn-primary {
    background-color: #3b82f6;
    color: white;
}

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

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

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

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

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

.modal-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Confirm Modal Specific */
.confirm-modal-body {
    font-size: 15px;
    color: #374151;
    line-height: 1.6;
}

.confirm-modal-body strong {
    color: #111827;
    font-weight: 600;
}

/* Type Colors */
.modal-title.type-danger i {
    color: #ef4444;
}

.modal-title.type-warning i {
    color: #f59e0b;
}

.modal-title.type-info i {
    color: #3b82f6;
}

.modal-title.type-success i {
    color: #10b981;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 16px;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-btn {
        width: 100%;
        justify-content: center;
    }
}
