/* ═══════════════════════════════════════════════════════════════
   ALERTAS / TOAST NOTIFICATIONS
   Sistema de alertas estandarizado y reutilizable
   ═══════════════════════════════════════════════════════════════ */

/* Contenedor de alertas */
.alerts-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    pointer-events: none;
}

/* Alerta individual */
.alert {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 12px;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease-out;
    min-width: 300px;
    max-width: 400px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.alert.slide-out {
    animation: slideOut 0.3s ease-in forwards;
}

/* Icono de alerta */
.alert-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
    flex-shrink: 0;
}

/* Contenido de alerta */
.alert-content {
    flex: 1;
    min-width: 0;
}

.alert-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark, #1e293b);
    margin-bottom: 2px;
}

.alert-message {
    font-size: 13px;
    color: var(--gray-600, #64748b);
    line-height: 1.4;
    word-wrap: break-word;
}

/* Botón de cerrar */
.alert-close {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--gray-400, #94a3b8);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.alert-close:hover {
    background: var(--gray-100, #f1f5f9);
    color: var(--gray-600, #64748b);
}

/* ═══════════════════════════════════════════════════════════════
   TIPOS DE ALERTA
   ═══════════════════════════════════════════════════════════════ */

/* Success */
.alert-success {
    border-left: 4px solid #10b981;
}

.alert-success .alert-icon {
    background: #d1fae5;
    color: #10b981;
}

/* Error */
.alert-error {
    border-left: 4px solid #ef4444;
}

.alert-error .alert-icon {
    background: #fee2e2;
    color: #ef4444;
}

/* Warning */
.alert-warning {
    border-left: 4px solid #f59e0b;
}

.alert-warning .alert-icon {
    background: #fef3c7;
    color: #f59e0b;
}

/* Info */
.alert-info {
    border-left: 4px solid #3b82f6;
}

.alert-info .alert-icon {
    background: #dbeafe;
    color: #3b82f6;
}

/* ═══════════════════════════════════════════════════════════════
   MODALES DE CONFIRMACIÓN
   ═══════════════════════════════════════════════════════════════ */

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

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

/* Contenedor del modal */
.confirm-modal {
    background: white;
    border-radius: 16px;
    padding: 24px;
    min-width: 320px;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.2s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Header del modal */
.confirm-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.confirm-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 20px;
    flex-shrink: 0;
}

.confirm-icon.warning {
    background: #fef3c7;
    color: #f59e0b;
}

.confirm-icon.danger {
    background: #fee2e2;
    color: #ef4444;
}

.confirm-icon.info {
    background: #dbeafe;
    color: #3b82f6;
}

.confirm-icon.success {
    background: #d1fae5;
    color: #10b981;
}

.confirm-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark, #1e293b);
}

/* Cuerpo del modal */
.confirm-body {
    margin-bottom: 24px;
    color: var(--gray-600, #64748b);
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
}

/* Footer del modal */
.confirm-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.confirm-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.confirm-btn-cancel {
    background: var(--gray-100, #f1f5f9);
    color: var(--gray-700, #374151);
}

.confirm-btn-cancel:hover {
    background: var(--gray-200, #e5e7eb);
}

.confirm-btn-confirm {
    background: var(--primary-color, #3b82f6);
    color: white;
}

.confirm-btn-confirm:hover {
    background: var(--primary-color-dark, #2563eb);
}

.confirm-btn-confirm.danger {
    background: #ef4444;
}

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

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .alerts-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .alert {
        min-width: auto;
        max-width: none;
    }
    
    .confirm-modal {
        min-width: auto;
        max-width: calc(100% - 40px);
        margin: 20px;
    }
}
