.storefront-toast-stack {
    position: fixed;
    bottom: 20px;
    left: 20px;
    top: auto;
    right: auto;
    z-index: 100000;
    display: flex;
    flex-direction: column-reverse;
    gap: 12px;
    width: min(400px, calc(100vw - 40px));
    pointer-events: none;
}

.storefront-toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px 12px;
    border-radius: 10px;
    background: #1a1a1a;
    color: #fff;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: auto;
    overflow: hidden;
    position: relative;
}

.storefront-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.storefront-toast__icon {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    background: rgba(255, 255, 255, 0.14);
}

.storefront-toast__body {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 8px;
}

.storefront-toast__title {
    display: block;
    margin-bottom: 2px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.storefront-toast__message {
    display: block;
    font-size: 13px;
    line-height: 1.45;
    opacity: 0.92;
}

.storefront-toast__close {
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 20px;
    line-height: 1;
    padding: 0;
    opacity: 0.7;
    cursor: pointer;
}

.storefront-toast__close:hover,
.storefront-toast__close:focus-visible {
    opacity: 1;
}

.storefront-toast__progress {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    background: rgba(255, 255, 255, 0.35);
    transform-origin: left center;
    animation-name: storefront-toast-progress;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}

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

.storefront-toast--success {
    background: #0f766e;
}

.storefront-toast--error,
.storefront-toast--danger {
    background: #b42318;
}

.storefront-toast--warning {
    background: #b54708;
}

.storefront-toast--info {
    background: #175cd3;
}

@media (max-width: 575px) {
    .storefront-toast-stack {
        bottom: 72px;
        left: 12px;
        right: 12px;
        width: auto;
    }
}
