/* ==========================================================================
   Notificaciones (toasts) de BabySystem — capa visual sobre Notyf.
   Minimalista: tarjeta blanca, icono con fondo tenue, una línea de progreso
   fina en la base (se pausa al pasar el mouse) y animación de entrada/salida.
   Cargado por resources/views/partials/toasts.blade.php
   ========================================================================== */

.notyf {
    padding: 16px;
    z-index: 99999; /* por encima de modales y barras fijas */
}

.notyf__toast.bbm-toast {
    --c: #475569; /* color de acento del tipo */
    --t: #f1f5f9; /* fondo tenue del icono */

    min-width: 300px;
    max-width: 400px;
    padding: 0;
    margin: 0 0 10px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    color: #0f172a;
    box-shadow: 0 12px 32px -12px rgba(15, 23, 42, 0.22), 0 2px 6px rgba(15, 23, 42, 0.06);
    font-size: 13px;
    transform: none;
    animation: bbm-toast-in 0.32s cubic-bezier(0.21, 1.02, 0.73, 1) both;
}

.notyf__toast.bbm-toast.notyf__toast--disappear {
    transform: none;
    animation: bbm-toast-out 0.22s ease-in both;
    animation-delay: 0s;
}

/* Tipos */
.notyf__toast.bbm-toast--success { --c: #059669; --t: #ecfdf5; }
.notyf__toast.bbm-toast--error   { --c: #dc2626; --t: #fef2f2; }
.notyf__toast.bbm-toast--warning { --c: #d97706; --t: #fffbeb; }
.notyf__toast.bbm-toast--info    { --c: #0284c7; --t: #f0f9ff; }
.notyf__toast.bbm-toast--delete  { --c: #64748b; --t: #f1f5f9; }

/* Estructura interna (anulamos las animaciones/estilos por defecto de Notyf) */
.bbm-toast .notyf__wrapper {
    position: static;
    align-items: flex-start;
    padding: 12px 42px 14px 12px;
    border-radius: 0;
}

.bbm-toast .notyf__icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    margin-right: 12px;
    border-radius: 9px;
    background: var(--t);
    color: var(--c);
    opacity: 1;
    animation: none;
    text-align: left;
    font-size: inherit;
}

.bbm-toast .notyf__icon svg {
    display: block;
}

.bbm-toast .notyf__message {
    position: static;
    flex: 1;
    min-width: 0;
    padding-top: 5px;
    opacity: 1;
    animation: none;
    color: inherit;
    line-height: 18px;
}

.bbm-toast__title {
    margin: 0;
    font-weight: 600;
    color: #0f172a;
}

.bbm-toast__text {
    margin: 0;
    font-weight: 500;
    color: #1e293b;
    overflow-wrap: anywhere;
}

.bbm-toast__title + .bbm-toast__text,
.bbm-toast__text + .bbm-toast__more {
    margin-top: 2px;
}

.bbm-toast__more {
    margin: 0;
    font-weight: 400;
    color: #64748b;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.bbm-toast__list {
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
    color: #475569;
}

.bbm-toast__list li {
    position: relative;
    padding-left: 12px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.bbm-toast__list li + li {
    margin-top: 2px;
}

.bbm-toast__list li::before {
    content: '';
    position: absolute;
    left: 1px;
    top: 0.6em;
    width: 4px;
    height: 4px;
    border-radius: 9999px;
    background: var(--c);
    opacity: 0.7;
}

/* Botón cerrar */
.bbm-toast .notyf__dismiss {
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    margin: 0;
    opacity: 1;
    animation: none;
}

.bbm-toast .notyf__dismiss-btn {
    position: relative;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: transparent;
    opacity: 1;
}

.bbm-toast .notyf__dismiss-btn::before,
.bbm-toast .notyf__dismiss-btn::after {
    height: 11px;
    width: 1.75px;
    left: calc(50% - 0.9px);
    top: calc(50% - 5.5px);
    background: #94a3b8;
    transition: background-color 0.15s ease;
}

.bbm-toast .notyf__dismiss-btn:hover {
    background: #f1f5f9;
    opacity: 1;
}

.bbm-toast .notyf__dismiss-btn:hover::before,
.bbm-toast .notyf__dismiss-btn:hover::after {
    background: #475569;
}

.bbm-toast .notyf__dismiss-btn:focus-visible {
    outline: 2px solid var(--c);
    outline-offset: 1px;
}

/* Línea de progreso: marca el tiempo restante y, al terminar, cierra el aviso.
   Se pausa mientras el mouse está encima para poder leerlo con calma. */
.bbm-toast__bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--c);
    opacity: 0.5;
    transform-origin: left center;
    animation: bbm-toast-bar linear forwards;
}

.bbm-toast:hover .bbm-toast__bar {
    animation-play-state: paused;
}

@keyframes bbm-toast-in {
    from { opacity: 0; transform: translate3d(28px, 0, 0) scale(0.98); }
    to   { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes bbm-toast-out {
    from { opacity: 1; transform: translate3d(0, 0, 0); }
    to   { opacity: 0; transform: translate3d(28px, 0, 0); }
}

@keyframes bbm-toast-bar {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

/* Celular: tarjeta a lo ancho, con un pequeño margen */
@media only screen and (max-width: 480px) {
    .notyf {
        padding: 10px;
    }

    .notyf__toast.bbm-toast {
        width: 100%;
        min-width: 0;
        max-width: none;
        border-radius: 14px;
        box-shadow: 0 12px 32px -12px rgba(15, 23, 42, 0.22), 0 2px 6px rgba(15, 23, 42, 0.06);
    }
}

/* Quien prefiere menos movimiento: sin desplazamiento ni barra animada */
@media (prefers-reduced-motion: reduce) {
    .notyf__toast.bbm-toast,
    .notyf__toast.bbm-toast.notyf__toast--disappear {
        animation-name: bbm-toast-fade-in;
        animation-duration: 0.01s;
    }

    .notyf__toast.bbm-toast.notyf__toast--disappear {
        animation-name: bbm-toast-fade-out;
    }

    .bbm-toast__bar {
        opacity: 0;
    }

    @keyframes bbm-toast-fade-in  { from { opacity: 0; } to { opacity: 1; } }
    @keyframes bbm-toast-fade-out { from { opacity: 1; } to { opacity: 0; } }
}
