/*
 * Shared "added to cart" toast — see toast.js. Tokens only (../../DESIGN_MANUAL.md):
 * --success-tint is literally specified there as "success banner/toast background".
 */

.b2c-toast-container {
    position: fixed;
    z-index: 2000;
    bottom: var(--space-5);
    right: var(--space-5);
    left: var(--space-5);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-3);
    pointer-events: none;
}

.b2c-toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    width: 100%;
    max-width: 360px;
    background: var(--success-tint);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: var(--space-4);
    opacity: 0;
    transform: translateY(12px);
    transition:
        opacity var(--transition-slow),
        transform var(--transition-slow);
}

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

.b2c-toast__image {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.b2c-toast__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 auto;
    min-width: 0;
}

.b2c-toast__title {
    margin: 0;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--success);
}

.b2c-toast__name {
    margin: 0;
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.b2c-toast__meta {
    margin: 0;
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--ink-muted);
}

.b2c-toast__action {
    align-self: flex-start;
    display: inline-block;
    margin-top: var(--space-2);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--brand-red);
    text-decoration: none;
    background: none;
    border: 1px solid var(--brand-red);
    border-radius: var(--radius-pill);
    padding: var(--space-1) var(--space-3);
    cursor: pointer;
}

.b2c-toast__action:hover {
    background: var(--brand-red-tint);
}

.b2c-toast__close {
    flex-shrink: 0;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--ink-muted);
    font-size: 1.25rem;
    line-height: 1;
    padding: 0;
    width: 20px;
    height: 20px;
}

.b2c-toast__close:hover {
    color: var(--ink);
}

@media (min-width: 768px) {
    .b2c-toast-container {
        left: auto;
        align-items: flex-end;
    }
}
