/* /assets/css/core/toast.css — Toasts de Feedback (Pearl Glass) */

.toast-container {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 3500;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(360px, calc(100vw - 24px));
    pointer-events: none;
}

.toast {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 13px 12px 15px 14px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-left: 4px solid var(--bg-charcoal);
    border-radius: 16px;
    box-shadow: inset 0 1px 0 var(--border-white), 0 14px 34px -10px rgba(0, 0, 0, 0.24);
    font-family: 'Plus Jakarta Sans', sans-serif;
    pointer-events: auto;
    animation: toastEntrar 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.toast-saindo {
    animation: toastSair 0.22s ease forwards;
}

.toast-icone {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-input);
    border: 1px solid var(--border-subtle);
}

.toast-icone svg { width: 17px; height: 17px; }

.toast-corpo {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 1px;
}

.toast-titulo {
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--text-dark);
}

.toast-msg {
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--text-muted);
    word-break: break-word;
}

.toast-fechar {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-faint);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.16s ease, color 0.16s ease;
}

.toast-fechar svg { width: 14px; height: 14px; }

.toast-fechar:hover,
.toast-fechar:focus-visible {
    outline: none;
    background-color: var(--bg-input);
    color: var(--text-dark);
}

.toast-progresso {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    background-color: currentColor;
    opacity: 0.35;
    transform-origin: left;
    animation-name: toastProgresso;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}

.toast-pausado .toast-progresso { animation-play-state: paused; }

/* Variações por tipo */
.toast-success { border-left-color: var(--green-trend); color: var(--green-trend); }
.toast-error   { border-left-color: var(--red-trend);   color: var(--red-trend); }
.toast-warning { border-left-color: #d4a017;            color: #b8860b; }
.toast-info    { border-left-color: var(--bg-charcoal); color: var(--text-dark); }

.toast-warning .toast-icone { background-color: var(--pearl-gold); }

@keyframes toastEntrar {
    from { opacity: 0; transform: translateX(24px) scale(0.97); }
    to   { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastSair {
    to { opacity: 0; transform: translateX(24px) scale(0.97); }
}

@keyframes toastProgresso {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

@media (max-width: 480px) {
    .toast-container { top: 10px; right: 12px; left: 12px; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
    .toast, .toast-saindo { animation: none; }
}
