/*
 * Global flash/toast notifications
 * Used by public, customer, partner and admin pages through views/header.php.
 */
.lolo-toast-stack {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 20050;
    display: grid;
    gap: 12px;
    width: min(420px, calc(100vw - 32px));
    pointer-events: none;
}

.lolo-toast {
    --lolo-toast-accent: #2563eb;
    --lolo-toast-accent-rgb: 37, 99, 235;
    position: relative;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 32px;
    gap: 12px;
    align-items: start;
    overflow: hidden;
    padding: 14px 14px 17px;
    border: 1px solid rgba(15, 23, 42, .10);
    border-left: 5px solid var(--lolo-toast-accent);
    border-radius: 16px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 18px 48px rgba(15, 23, 42, .18), 0 4px 14px rgba(15, 23, 42, .08);
    color: #172033;
    opacity: 0;
    transform: translate3d(0, -14px, 0) scale(.985);
    transition: opacity .22s ease, transform .22s ease;
    pointer-events: auto;
    isolation: isolate;
}

.lolo-toast.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

.lolo-toast.is-hiding {
    opacity: 0;
    transform: translate3d(12px, 0, 0) scale(.985);
}

.lolo-toast--success {
    --lolo-toast-accent: #168653;
    --lolo-toast-accent-rgb: 22, 134, 83;
}

.lolo-toast--danger {
    --lolo-toast-accent: #c93c4b;
    --lolo-toast-accent-rgb: 201, 60, 75;
}

.lolo-toast--warning {
    --lolo-toast-accent: #c77b14;
    --lolo-toast-accent-rgb: 199, 123, 20;
}

.lolo-toast--info {
    --lolo-toast-accent: #2563eb;
    --lolo-toast-accent-rgb: 37, 99, 235;
}

.lolo-toast__icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    border-radius: 50%;
    background: rgba(var(--lolo-toast-accent-rgb), .11);
    color: var(--lolo-toast-accent);
    font-size: 20px;
}

.lolo-toast__content {
    min-width: 0;
    padding-top: 1px;
}

.lolo-toast__title {
    margin: 0 0 3px;
    color: #111827;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.35;
}

.lolo-toast__message {
    margin: 0;
    color: #536176;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.48;
    overflow-wrap: anywhere;
}

.lolo-toast__close {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    margin: -4px -3px 0 0;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #728096;
    font-size: 18px;
    cursor: pointer;
    transition: background .16s ease, color .16s ease;
}

.lolo-toast__close:hover,
.lolo-toast__close:focus-visible {
    background: #f1f5f9;
    color: #182235;
    outline: none;
}

.lolo-toast__progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    overflow: hidden;
    background: rgba(var(--lolo-toast-accent-rgb), .12);
}

.lolo-toast__progress > span {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--lolo-toast-accent);
    transform-origin: left center;
    animation: lolo-toast-progress var(--lolo-toast-duration, 5200ms) linear forwards;
}

.lolo-toast:hover .lolo-toast__progress > span,
.lolo-toast:focus-within .lolo-toast__progress > span {
    animation-play-state: paused;
}

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

@media (max-width: 767.98px) {
    .lolo-toast-stack {
        top: 12px;
        right: 12px;
        left: 12px;
        width: auto;
    }

    .lolo-toast {
        grid-template-columns: 38px minmax(0, 1fr) 30px;
        gap: 10px;
        padding: 12px 12px 15px;
        border-radius: 14px;
    }

    .lolo-toast__icon {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lolo-toast {
        transition: none;
    }

    .lolo-toast__progress > span {
        animation: none;
    }
}
