/* =========================================
   TOAST PREMIUM — toast.css
   ========================================= */

.toast-container {
    position: fixed;
    bottom: 28px;
    right: 28px;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    z-index: 9999;
    pointer-events: none;
    max-width: 360px;
    width: calc(100% - 56px);
}

/* --- BASE --- */
.toast {
    pointer-events: all;
    display: flex;
    align-items: center;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.13), 0 2px 8px rgba(0,0,0,0.07);
    position: relative;
    animation: toastIn 0.38s cubic-bezier(0.34,1.56,0.64,1) forwards;
}

.toast.toast-exit {
    animation: toastOut 0.28s cubic-bezier(0.4,0,1,1) forwards;
    pointer-events: none;
}

/* --- FRANJA DE COLOR LATERAL --- */
.toast-accent {
    width: 5px;
    align-self: stretch;
    flex-shrink: 0;
}

/* --- CUERPO --- */
.toast-body {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 0 13px 10px;
}

/* --- CÍRCULO ICONO --- */
.toast-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.toast-icon-wrap .material-icons { font-size: 18px; }

/* --- TEXTOS --- */
.toast-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.toast-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.toast-msg {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    color: #2c2c2c;
}

/* --- BOTÓN CERRAR --- */
.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 13px 13px 13px 0;
    display: flex;
    align-items: center;
    opacity: 0.38;
    transition: opacity 0.2s;
    color: #444;
    font-family: 'Material Icons';
}
.toast-close:hover { opacity: 0.85; }
.toast-close .material-icons { font-size: 16px; }

/* --- BARRA DE PROGRESO --- */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 5px;
    right: 0;
    height: 2.5px;
    border-radius: 0 0 14px 14px;
    transform-origin: left;
    animation: toastProgress 3s linear forwards;
}

/* ========= VARIANTES ========= */

/* ERROR — rojo */
.toast-error { background: #fff8f8; border: 1px solid rgba(229,57,53,0.14); }
.toast-error .toast-accent                      { background: #e53935; }
.toast-error .toast-icon-wrap                   { background: rgba(229,57,53,0.10); }
.toast-error .toast-icon-wrap .material-icons   { color: #e53935; }
.toast-error .toast-label                       { color: #e53935; }
.toast-error .toast-progress                    { background: rgba(229,57,53,0.28); }

/* SUCCESS — verde #81C9AD */
.toast-success { background: #f3faf7; border: 1px solid rgba(129,201,173,0.2); }
.toast-success .toast-accent                     { background: #81C9AD; }
.toast-success .toast-icon-wrap                  { background: rgba(129,201,173,0.15); }
.toast-success .toast-icon-wrap .material-icons  { color: #00a27e; }
.toast-success .toast-label                      { color: #00a27e; }
.toast-success .toast-progress                   { background: rgba(0,162,126,0.28); }

/* INFO — azul #3A4B77 */
.toast-info { background: #f5f6fa; border: 1px solid rgba(58,75,119,0.14); }
.toast-info .toast-accent                     { background: #3A4B77; }
.toast-info .toast-icon-wrap                  { background: rgba(58,75,119,0.10); }
.toast-info .toast-icon-wrap .material-icons  { color: #3A4B77; }
.toast-info .toast-label                      { color: #3A4B77; }
.toast-info .toast-progress                   { background: rgba(58,75,119,0.28); }

/* ========= ANIMACIONES ========= */
@keyframes toastIn {
    from { opacity: 0; transform: translateX(56px) scale(0.92); }
    to   { opacity: 1; transform: translateX(0)    scale(1);    }
}
@keyframes toastOut {
    from { opacity: 1; transform: translateX(0)    scale(1);    max-height: 100px; }
    to   { opacity: 0; transform: translateX(56px) scale(0.92); max-height: 0; padding: 0; margin: 0; }
}
@keyframes toastProgress {
    from { width: 100%; }
    to   { width: 0%;   }
}

/* ========= RESPONSIVE ========= */
@media (max-width: 768px) {
    .toast-container {
        bottom: 16px;
        right: 16px;
        left: 16px;
        max-width: 100%;
        width: auto;
    }
}
