/**
 * SweetAlert2 - Estilos Personalizados
 * =====================================
 * Estilos que se adaptan al tema del sistema
 * Compatible con modo claro/oscuro
 */

/* ============================================
   CONTENEDOR Y OVERLAY
   ============================================ */

.swal2-container {
    z-index: 99999 !important;
}

/* .swal2-backdrop-show {
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(3px);
} */

/* ============================================
   POPUP PRINCIPAL
   ============================================ */

.swal-popup {
    border-radius: 16px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25) !important;
    padding: 30px !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ============================================
   TÍTULO E ICONOS
   ============================================ */

.swal-title {
    font-size: 24px !important;
    font-weight: 600 !important;
    color: #2c3e50 !important;
    margin-bottom: 10px !important;
}

.swal2-icon {
    border-width: 3px !important;
    margin: 20px auto !important;
}

.swal2-icon.swal2-success {
    border-color: #28a745 !important;
}

.swal2-icon.swal2-success .swal2-success-ring {
    border-color: rgba(40, 167, 69, 0.3) !important;
}

.swal2-icon.swal2-success [class^='swal2-success-line'] {
    background-color: #28a745 !important;
}

.swal2-icon.swal2-error {
    border-color: #dc3545 !important;
}

.swal2-icon.swal2-error [class^='swal2-x-mark-line'] {
    background-color: #dc3545 !important;
}

.swal2-icon.swal2-warning {
    border-color: #ffc107 !important;
    color: #ffc107 !important;
}

.swal2-icon.swal2-info {
    border-color: #17a2b8 !important;
    color: #17a2b8 !important;
}

.swal2-icon.swal2-question {
    border-color: #6c757d !important;
    color: #6c757d !important;
}

/* ============================================
   CONTENIDO Y TEXTO
   ============================================ */

.swal-content {
    font-size: 16px !important;
    color: #666 !important;
    margin: 0 !important;
}

.swal2-html-container {
    margin: 15px 0 !important;
    line-height: 1.6 !important;
}

/* ============================================
   INPUTS Y FORMULARIOS
   ============================================ */

.swal-input,
.swal2-input,
.swal2-textarea,
.swal2-select {
    font-size: 15px !important;
    padding: 12px 15px !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.swal2-input:focus,
.swal2-textarea:focus,
.swal2-select:focus {
    border-color: #007bff !important;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1) !important;
    outline: none !important;
}

.swal2-textarea {
    min-height: 100px !important;
    resize: vertical !important;
}

.swal2-validation-message {
    background: #fee !important;
    color: #c33 !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    margin-top: 8px !important;
}

/* ============================================
   BOTONES
   ============================================ */

.swal-actions {
    margin-top: 25px !important;
    gap: 12px !important;
}

.swal-confirm-btn,
.swal-cancel-btn {
    font-size: 15px !important;
    font-weight: 600 !important;
    padding: 12px 28px !important;
    border-radius: 8px !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 120px !important;
    justify-content: center !important;
}

.swal-confirm-btn {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3) !important;
}

.swal-confirm-btn:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%) !important;
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4) !important;
    transform: translateY(-2px) !important;
}

.swal-confirm-btn:active {
    transform: translateY(0) !important;
}

.swal-cancel-btn {
    background: #6c757d !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.2) !important;
}

.swal-cancel-btn:hover {
    background: #5a6268 !important;
    box-shadow: 0 6px 16px rgba(108, 117, 125, 0.3) !important;
    transform: translateY(-2px) !important;
}

/* Variante de botón eliminar */
.swal2-confirm.swal-confirm-btn:has(.fa-trash) {
    background: linear-gradient(135deg, #dc3545 0%, #bd2130 100%) !important;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3) !important;
}

.swal2-confirm.swal-confirm-btn:has(.fa-trash):hover {
    background: linear-gradient(135deg, #c82333 0%, #a71d2a 100%) !important;
    box-shadow: 0 6px 16px rgba(220, 53, 69, 0.4) !important;
}

/* ============================================
   ANIMACIONES (SIMPLIFICADAS)
   ============================================ */

.swal-animate-show {
    animation: swalFadeIn 0.3s ease-out !important;
}

.swal-animate-hide {
    animation: swalFadeOut 0.2s ease-in !important;
}

@keyframes swalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes swalFadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* ============================================
   TIMER PROGRESS BAR
   ============================================ */

.swal2-timer-progress-bar {
    background: rgba(0, 123, 255, 0.7) !important;
    height: 4px !important;
}

/* ============================================
   LOADING SPINNER
   ============================================ */

.swal2-loading .swal2-confirm {
    background: #007bff !important;
}

.swal2-loader {
    border-color: #007bff transparent #007bff transparent !important;
}

/* ============================================
   MODAL USUARIOS - LOOK & FEEL
   ============================================ */

.swal2-usuarios-modal.swal2-popup {
    border-radius: 14px !important;
    padding: 24px 26px !important;
}

.swal-usuario-form {
    text-align: left;
    display: grid;
    gap: 12px;
}

.swal-usuario-form .form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.swal-usuario-form .form-row label {
    display: block;
    font-size: 13px;
    color: #495057;
    margin-bottom: 6px;
}

.swal-usuario-form .swal2-input {
    margin: 0 !important;
}

@media (max-width: 640px) {
    .swal-usuario-form .form-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   TOAST (NOTIFICACIONES PEQUEÑAS)
   ============================================ */

.swal2-toast {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
    border-radius: 12px !important;
    padding: 16px !important;
}

.swal2-toast .swal2-title {
    font-size: 15px !important;
    margin: 0 !important;
    color: #2c3e50 !important;
}

.swal2-toast .swal2-icon {
    width: 32px !important;
    height: 32px !important;
    margin: 0 12px 0 0 !important;
}

/* ============================================
   CLOSE BUTTON
   ============================================ */

.swal-close-button {
    font-size: 28px !important;
    color: #aaa !important;
    transition: all 0.2s ease !important;
}

.swal-close-button:hover {
    color: #dc3545 !important;
    transform: rotate(90deg) !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .swal-popup {
        width: 90% !important;
        padding: 20px !important;
    }
    
    .swal-title {
        font-size: 20px !important;
    }
    
    .swal-content {
        font-size: 14px !important;
    }
    
    .swal-confirm-btn,
    .swal-cancel-btn {
        font-size: 14px !important;
        padding: 10px 20px !important;
        min-width: 100px !important;
    }
}

/* ============================================
   MODO OSCURO (DESACTIVADO - No se usa en el proyecto)
   ============================================
   Descomenta esta sección si implementas tema oscuro:

@media (prefers-color-scheme: dark) {
    .swal-popup {
        background: #2c3e50 !important;
        color: #ecf0f1 !important;
    }
    
    .swal-title {
        color: #ecf0f1 !important;
    }
    
    .swal-content {
        color: #bdc3c7 !important;
    }
    
    .swal2-input,
    .swal2-textarea,
    .swal2-select {
        background: #34495e !important;
        color: #ecf0f1 !important;
        border-color: #4a5f7f !important;
    }
}
*/
