/**
 * Digital Plus — Toast Notifications
 * Pill-shaped, RTL-aware toasts for cart and wishlist feedback.
 */

/* ── Container ── */

#dp-toast-container {
    position: fixed;
    top: 120px;
    inset-inline-end: 48px;
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    pointer-events: none;
    max-width: 320px;
}

/* ── Toast ── */

.dp-toast {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 18px;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-size: var(--font-size-sm);
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.01em;
    pointer-events: auto;
    background: var(--color-secondary);
    color: var(--color-brand-blue);
    border: 1.5px solid var(--color-brand-blue);
    box-shadow: var(--shadow-md);
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* animation — starts off to the right */
    opacity: 0;
    transform: translateX(32px);
    animation:
        dp-toast-in  0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
        dp-toast-out 0.25s ease forwards var(--dismiss-delay, 2.75s);
    will-change: opacity, transform;
}

/* ── Icon ── */

.dp-toast__icon {
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    display: block;
}

/* ── Animations — slide in from right, slide out to right ── */

@keyframes dp-toast-in {
    from {
        opacity: 0;
        transform: translateX(32px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes dp-toast-out {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateX(32px) scale(0.96);
    }
}

/* ── Mobile ── */

@media (max-width: 768px) {
    #dp-toast-container {
        inset-inline-end: 12px;
    }
}
