/**
 * Global add-to-cart toast
 */

.gw-cart-toast-container {
    position: fixed;
    right: auto;
    bottom: 24px;
    left: 50%;
    z-index: 999999;
    display: flex;
    width: min(390px, calc(100vw - 32px));
    max-width: 100%;
    margin: 0;
    transform: translateX(-50%);
    flex-direction: column;
    gap: 10px;
    direction: rtl;
    pointer-events: none;
}

.gw-cart-toast-container--above-sticky {
    bottom: 96px;
}


/**
 * مخفی‌کردن پیام موفقیت پیش‌فرض ووکامرس
 * هنگام انتقال پیام به Toast
 */

body.gw-cart-toast-pending
.woocommerce-notices-wrapper
.woocommerce-message,
body.gw-cart-toast-pending
.message-wrapper
.woocommerce-message,
body.gw-cart-toast-pending
.message-wrapper.woocommerce-message {
    display: none !important;
}


/**
 * Toast
 */

.gw-cart-toast {
    --gw-toast-color: #000b99;
    --gw-toast-soft-color: #eef0ff;
    --gw-toast-duration: 5000ms;

    position: relative;
    display: grid;
    min-height: 76px;
    padding: 14px 14px 17px;
    overflow: hidden;
    border: 1px solid #e2e5ef;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 14px 40px rgba(16, 20, 38, 0.16);
    grid-template-columns: 38px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 11px;
    color: #101426;
    opacity: 0;
    transform: translateY(18px);
    transition:
        opacity 220ms ease,
        transform 220ms ease;
    pointer-events: auto;
}

.gw-cart-toast--visible {
    opacity: 1;
    transform: translateY(0);
}

.gw-cart-toast--closing {
    opacity: 0;
    transform: translateY(12px);
}


/**
 * Toast types
 */

.gw-cart-toast--success {
    --gw-toast-color: #16875b;
    --gw-toast-soft-color: #eaf8f2;
}

.gw-cart-toast--error {
    --gw-toast-color: #d92d20;
    --gw-toast-soft-color: #fff0ee;
}

.gw-cart-toast--info {
    --gw-toast-color: #000b99;
    --gw-toast-soft-color: #eef0ff;
}


/**
 * Toast icon
 */

.gw-cart-toast__icon {
    display: inline-flex;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--gw-toast-soft-color);
    color: var(--gw-toast-color);
    align-items: center;
    justify-content: center;
    font-family: Arial, sans-serif;
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
}

.gw-cart-toast--success
.gw-cart-toast__icon::before {
    content: "✓";
}

.gw-cart-toast--error
.gw-cart-toast__icon::before {
    content: "!";
}

.gw-cart-toast--info
.gw-cart-toast__icon::before {
    content: "i";
}


/**
 * Toast message
 */

.gw-cart-toast__message {
    min-width: 0;
    color: #252a3a;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.9;
    overflow-wrap: anywhere;
}


/**
 * Close button
 */

.gw-cart-toast__close {
    display: inline-flex !important;
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #858a99 !important;
    align-items: center;
    justify-content: center;
    font-family: Arial, sans-serif !important;
    font-size: 22px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    cursor: pointer;
}

.gw-cart-toast__close:hover,
.gw-cart-toast__close:focus-visible {
    background: #f2f3f7 !important;
    color: #101426 !important;
}

.gw-cart-toast__close:focus-visible {
    outline: 2px solid var(--gw-toast-color);
    outline-offset: 2px;
}


/**
 * Progress bar
 */

.gw-cart-toast__progress {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 3px;
    background: var(--gw-toast-color);
    transform-origin: right center;
    animation:
        gw-cart-toast-progress
        var(--gw-toast-duration)
        linear forwards;
}

@keyframes gw-cart-toast-progress {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}


/**
 * Mobile
 */

@media (max-width: 600px) {
    .gw-cart-toast-container {
        right: auto;
        bottom: calc(
            12px + env(safe-area-inset-bottom)
        );
        left: 50%;
        width: calc(100vw - 24px);
        max-width: none;
        transform: translateX(-50%);
    }

    .gw-cart-toast-container--above-sticky {
        bottom: calc(
            88px + env(safe-area-inset-bottom)
        );
    }

    .gw-cart-toast {
        min-height: 70px;
        padding: 12px 12px 15px;
        border-radius: 14px;
        grid-template-columns:
            36px minmax(0, 1fr) 26px;
        gap: 9px;
    }

    .gw-cart-toast__icon {
        width: 36px;
        height: 36px;
        font-size: 19px;
    }

    .gw-cart-toast__message {
        font-size: 11px;
    }
}


/**
 * Reduced motion
 */

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

    .gw-cart-toast__progress {
        animation: none;
    }
}



.added_to_cart.wc-forward{
    display: none;
}