/* modern-alerts.css - VERSIÓN ULTRA MODERNA CON COLORES DE LA APP */

/* ============================================= */
/* VARIABLES DE DISEÑO MODERNO CON COLORES APP */
/* ============================================= */
:root {
  /* Colores principales de la app */
  --primary: #FF9E1B;
  --secondary: #005DAA;
  --accent: #CF142B;
  --success: #28a745;
  --warning: #ffc107;
  --danger: #dc3545;
  --light: #f8f9fa;
  --dark: #343a40;
  
  /* Variables para diseño moderno */
  --glass-bg: rgba(255, 255, 255, 0.95);
  --glass-border: rgba(255, 255, 255, 0.8);
  --glass-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --blur: blur(20px);
  --primary-gradient: linear-gradient(135deg, var(--primary) 0%, #FFB74D 100%);
  --secondary-gradient: linear-gradient(135deg, var(--secondary) 0%, #0077CC 100%);
  --accent-gradient: linear-gradient(135deg, var(--accent) 0%, #E74C3C 100%);
  --success-gradient: linear-gradient(135deg, var(--success) 0%, #20c997 100%);
  --warning-gradient: linear-gradient(135deg, var(--warning) 0%, #FFD54F 100%);
  --danger-gradient: linear-gradient(135deg, var(--danger) 0%, #E74C3C 100%);
}

/* ============================================= */
/* MODALES DE ALERTA - DISEÑO GLASSMORPHISM MODERNO */
/* ============================================= */

.alert-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 3000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        backdrop-filter: blur(0px);
    }
    to { 
        opacity: 1; 
        backdrop-filter: blur(10px);
    }
}

.alert-modal-content {
    background: var(--glass-bg);
    border-radius: 24px;
    width: 90%;
    max-width: 480px;
    box-shadow: 
        var(--glass-shadow),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 8px 40px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    transform: translateY(30px) scale(0.95);
    animation: modalSlideUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--blur);
    position: relative;
}

.alert-modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    z-index: 2;
}

@keyframes modalSlideUp {
    to { 
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.alert-modal-header {
    padding: 32px 32px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    position: relative;
}

.alert-modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
    background: var(--light);
    border: 2px solid;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.1),
        0 4px 12px rgba(0, 0, 0, 0.05);
    animation: iconFloat 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.alert-modal-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(45deg);
    animation: shine 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-5px) scale(1.02); }
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.alert-modal-icon.success {
    background: var(--success-gradient);
    border-color: var(--success);
    color: white;
    box-shadow: 
        0 8px 25px rgba(40, 167, 69, 0.3),
        0 4px 12px rgba(40, 167, 69, 0.2);
}

.alert-modal-icon.error {
    background: var(--danger-gradient);
    border-color: var(--danger);
    color: white;
    box-shadow: 
        0 8px 25px rgba(220, 53, 69, 0.3),
        0 4px 12px rgba(220, 53, 69, 0.2);
}

.alert-modal-icon.warning {
    background: var(--warning-gradient);
    border-color: var(--warning);
    color: #212529;
    box-shadow: 
        0 8px 25px rgba(255, 193, 7, 0.3),
        0 4px 12px rgba(255, 193, 7, 0.2);
}

.alert-modal-icon.info {
    background: var(--secondary-gradient);
    border-color: var(--secondary);
    color: white;
    box-shadow: 
        0 8px 25px rgba(0, 93, 170, 0.3),
        0 4px 12px rgba(0, 93, 170, 0.2);
}

.alert-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.alert-modal-body {
    padding: 24px 32px;
    color: var(--dark);
    line-height: 1.6;
    font-size: 1.05rem;
    background: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.alert-modal-footer {
    padding: 24px 32px;
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    background: #f8f9fa;
    border-radius: 0 0 24px 24px;
}

.alert-modal-btn {
    padding: 14px 28px;
    border-radius: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid transparent;
}

.alert-modal-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.6s;
}

.alert-modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.alert-modal-btn:hover::before {
    left: 100%;
}

.alert-modal-btn:active {
    transform: translateY(0);
}

.alert-modal-btn.primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 158, 27, 0.4);
}

.alert-modal-btn.primary:hover {
    box-shadow: 0 8px 25px rgba(255, 158, 27, 0.5);
}

.alert-modal-btn.secondary {
    background: white;
    color: var(--secondary);
    border: 1px solid var(--secondary);
    box-shadow: 0 2px 8px rgba(0, 93, 170, 0.1);
}

.alert-modal-btn.secondary:hover {
    background: var(--secondary);
    color: white;
    box-shadow: 0 8px 25px rgba(0, 93, 170, 0.3);
}

/* ============================================= */
/* TOAST NOTIFICATIONS - DISEÑO MODERNO */
/* ============================================= */

.toast-container {
    position: fixed;
    top: 100px;
    right: 25px;
    z-index: 4000;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 400px;
}

.toast {
    background: var(--glass-bg);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 
        var(--glass-shadow),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    animation: toastSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    transform: translateX(400px);
    opacity: 0;
    backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-gradient);
}

.toast:hover {
    transform: translateX(-8px);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

@keyframes toastSlideIn {
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.success::before {
    background: var(--success-gradient);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast.error::before {
    background: var(--danger-gradient);
}

.toast.warning {
    border-left: 4px solid var(--warning);
}

.toast.warning::before {
    background: var(--warning-gradient);
}

.toast.info {
    border-left: 4px solid var(--secondary);
}

.toast.info::before {
    background: var(--secondary-gradient);
}

.toast-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    margin-top: 2px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--light);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.toast.success .toast-icon {
    background: var(--success-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.toast.error .toast-icon {
    background: var(--danger-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.toast.warning .toast-icon {
    background: var(--warning-gradient);
    color: #212529;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.toast.info .toast-icon {
    background: var(--secondary-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 93, 170, 0.3);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    margin-bottom: 6px;
    font-size: 1rem;
    color: var(--dark);
    letter-spacing: -0.01em;
}

.toast-message {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

.toast-close {
    background: none;
    border: none;
    font-size: 0.9rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
    border-radius: 6px;
    transition: all 0.2s ease;
    background: rgba(0, 0, 0, 0.05);
}

.toast-close:hover {
    color: var(--danger);
    background: rgba(220, 53, 69, 0.1);
    transform: rotate(90deg);
}

/* ============================================= */
/* NOTIFICACIONES DE CARGA - DISEÑO MODERNO */
/* ============================================= */

.loading-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 3000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(15px);
}

.loading-modal-content {
    background: var(--glass-bg);
    border-radius: 24px;
    padding: 40px;
    width: 90%;
    max-width: 300px;
    text-align: center;
    box-shadow: var(--glass-shadow);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--blur);
    animation: modalSlideUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255, 158, 27, 0.1);
    border-left-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
    position: relative;
}

.loading-spinner::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--secondary);
    animation: spin 1.5s linear infinite reverse;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
    font-size: 1.2rem;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loading-subtext {
    font-size: 0.95rem;
    color: #666;
}

/* ============================================= */
/* INDICADORES DE ESTADO - DISEÑO MODERNO */
/* ============================================= */

.status-indicator {
    padding: 18px 20px;
    border-radius: 16px;
    margin-bottom: 20px;
    display: none;
    align-items: center;
    gap: 15px;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.02);
    border-left: 4px solid;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.status-indicator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.05), transparent);
}

.status-success {
    border-left-color: var(--success);
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.03) 0%, rgba(40, 167, 69, 0.01) 100%);
}

.status-error {
    border-left-color: var(--danger);
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.03) 0%, rgba(220, 53, 69, 0.01) 100%);
}

.status-indicator i {
    font-size: 1.4rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.03);
}

.status-success i {
    color: var(--success);
    background: rgba(40, 167, 69, 0.1);
}

.status-error i {
    color: var(--danger);
    background: rgba(220, 53, 69, 0.1);
}

/* ============================================= */
/* MODAL DE CONFIRMACIÓN - DISEÑO MODERNO */
/* ============================================= */

.confirm-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 3000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
}

.confirm-modal-content {
    background: var(--glass-bg);
    border-radius: 24px;
    width: 90%;
    max-width: 450px;
    box-shadow: var(--glass-shadow);
    overflow: hidden;
    animation: modalSlideUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--blur);
    position: relative;
}

.confirm-modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--warning-gradient);
    z-index: 2;
}

.confirm-modal-header {
    padding: 32px 32px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.confirm-modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--warning-gradient);
    color: #212529;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
    border: 2px solid var(--warning);
    box-shadow: 
        0 8px 25px rgba(255, 193, 7, 0.3),
        0 4px 12px rgba(255, 193, 7, 0.2);
    animation: iconFloat 3s ease-in-out infinite;
}

.confirm-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--warning), #FF9800);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.confirm-modal-body {
    padding: 24px 32px;
    color: var(--dark);
    line-height: 1.6;
    font-size: 1.05rem;
    background: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.confirm-modal-footer {
    padding: 24px 32px;
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    background: #f8f9fa;
    border-radius: 0 0 24px 24px;
}

.confirm-modal-btn {
    padding: 14px 28px;
    border-radius: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.confirm-modal-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.6s;
}

.confirm-modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.confirm-modal-btn:hover::before {
    left: 100%;
}

.confirm-modal-btn:active {
    transform: translateY(0);
}

.confirm-modal-btn.confirm {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(207, 20, 43, 0.4);
}

.confirm-modal-btn.confirm:hover {
    box-shadow: 0 8px 25px rgba(207, 20, 43, 0.5);
}

.confirm-modal-btn.cancel {
    background: white;
    color: var(--secondary);
    border: 1px solid var(--secondary);
    box-shadow: 0 2px 8px rgba(0, 93, 170, 0.1);
}

.confirm-modal-btn.cancel:hover {
    background: var(--secondary);
    color: white;
    box-shadow: 0 8px 25px rgba(0, 93, 170, 0.3);
}

/* ============================================= */
/* RESPONSIVE DESIGN */
/* ============================================= */

@media (max-width: 768px) {
    .toast-container {
        top: 80px;
        right: 15px;
        left: 15px;
        max-width: none;
    }
    
    .toast {
        max-width: 100%;
    }
    
    .alert-modal-content,
    .confirm-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .alert-modal-header,
    .confirm-modal-header {
        padding: 25px 20px 15px;
    }
    
    .alert-modal-body,
    .confirm-modal-body {
        padding: 20px;
    }
    
    .alert-modal-footer,
    .confirm-modal-footer {
        padding: 20px;
        flex-direction: column;
    }
    
    .alert-modal-btn,
    .confirm-modal-btn {
        width: 100%;
    }
    
    .alert-modal-icon,
    .confirm-modal-icon {
        width: 56px;
        height: 56px;
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .alert-modal-header,
    .confirm-modal-header {
        padding: 20px 15px 10px;
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .alert-modal-body,
    .confirm-modal-body {
        padding: 15px;
    }
    
    .alert-modal-footer,
    .confirm-modal-footer {
        padding: 15px;
    }
    
    .toast {
        padding: 16px;
    }
    
    .toast-icon {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }
}