/* ============================================================
   Toast Notifications — Floating Top-Right
   ============================================================ */

.toast-container {
    position: fixed;
    top: calc(var(--header-height, 64px) + 20px);
    right: var(--space-6);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 14px 20px;
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-white);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
    animation: toastSlideIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    max-width: 440px;
    min-width: 300px;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.toast-success { background: linear-gradient(135deg, #059669 0%, #047857 100%); }
.toast-error   { background: linear-gradient(135deg, #b91c1c 0%, #8b1a1a 100%); }
.toast-warning { background: linear-gradient(135deg, #d97706 0%, #b45309 100%); }
.toast-info    { background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); border-left: 4px solid var(--oro); }

.toast-icono {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.toast-mensaje {
    flex: 1;
    line-height: 1.45;
}

.toast-cerrar {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0 0 0 var(--space-2);
    transition: var(--transition-fast);
    flex-shrink: 0;
    line-height: 1;
}

.toast-cerrar:hover {
    color: #ffffff;
    transform: scale(1.15);
}

.toast-container.saliendo,
.toast.saliendo {
    animation: toastSlideOut 0.35s cubic-bezier(0.55, 0, 1, 0.45) forwards;
}

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

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

@media (max-width: 600px) {
    .toast-container {
        top: var(--space-4);
        right: var(--space-4);
        left: var(--space-4);
    }
    .toast {
        max-width: 100%;
        min-width: auto;
    }
}
