.wctn-toast-container {
    position: fixed;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: var(--wctn-toast-width, 360px);
    max-width: calc(90vw - 24px);
    pointer-events: none;
    font-family: 'iransans', sans-serif;
}

.wctn-top-right    { top:    24px; right: 24px; }
.wctn-top-left     { top:    24px; left:  24px; }
.wctn-bottom-right { bottom: 24px; right: 24px; }
.wctn-bottom-left  { bottom: 24px; left:  24px; }

.wctn-toast-container.wctn-is-rtl {
    direction: rtl;
}

.wctn-toast {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    padding: 16px 16px 12px;
    background: var(--wctn-bg);
    color: var(--wctn-text, #ffffff);
    border-radius: var(--wctn-toast-radius, 14px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
    font-size: var(--wctn-content-font-size, 14px);
    font-weight: var(--wctn-content-font-weight, 400);
    line-height: 1.5;
    pointer-events: auto;
    overflow: hidden;
    opacity: 1;
    transform: translateY(0);
    transition: transform 0.4s ease, opacity 0.4s ease;
    backdrop-filter: blur(8px);
}

.wctn-toast-body {
    flex: 1 1 auto;
    min-width: 0;
}

.wctn-toast-title {
    font-size: var(--wctn-title-font-size, 15px);
    font-weight: var(--wctn-title-font-weight, 700);
    line-height: 1.2;
    margin-bottom: 4px;
}

.wctn-toast-content {
    font-size: var(--wctn-content-font-size, 14px);
    font-weight: var(--wctn-content-font-weight, 400);
    word-break: break-word;
}

.wctn-toast-success { --wctn-bg: #16a34a; }
.wctn-toast-error   { --wctn-bg: #dc2626; }
.wctn-toast-info    { --wctn-bg: #2563eb; }
.wctn-toast-warning { --wctn-bg: #d97706; }

.wctn-toast-close {
    flex: 0 0 auto;
    background: rgba(255,255,255,0.12);
    border: 0;
    color: #ffffff;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    padding: 4px 8px;
    margin: 0;
    border-radius: 8px;
    opacity: 0.95;
    transition: background 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
}

.wctn-toast-close:hover,
.wctn-toast-close:focus {
    background: rgba(255,255,255,0.2);
    opacity: 1;
    outline: none;
    transform: scale(1.05);
}

.wctn-toast-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: rgba(255,255,255,0.18);
    overflow: hidden;
}

.wctn-toast-progress-bar {
    display: block;
    width: 100%;
    height: 100%;
    background: #ffffff40 !important;
    transform-origin: left center;
}

.wctn-toast-hide {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
}

.wctn-anim-slide-up {
    animation: wctnSlideUpIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.wctn-anim-slide {
    animation: wctnSlideIn 0.35s ease forwards;
}

.wctn-anim-fade {
    animation: wctnFadeIn 0.35s ease forwards;
}

.wctn-anim-zoom {
    animation: wctnZoomIn 0.35s ease forwards;
}

@keyframes wctnSlideUpIn {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes wctnSlideIn {
    from {
        opacity: 0;
        transform: translateX(24px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes wctnFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes wctnZoomIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes wctnProgressShrink {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .wctn-toast,
    .wctn-toast-hide,
    .wctn-anim-slide-up,
    .wctn-anim-slide,
    .wctn-anim-fade,
    .wctn-anim-zoom,
    .wctn-toast-progress-bar {
        animation: none !important;
        transition: none !important;
    }
}

@media (max-width: 480px) {
    /*
     * Floating card — sits above the browser chrome (Safari toolbar + home
     * indicator) instead of being flush with the screen bottom.
     * env(safe-area-inset-bottom) covers the home indicator on notched iPhones.
     */
    .wctn-toast-container {
 
        gap: 8px;
    }

    /* Restore full border-radius — cards, not a flush sheet */
    .wctn-toast {
        padding: 11px 12px 13px;
        border-radius: 12px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
        gap: 8px;
    }

    /* Undo any overrides from the general .wctn-toast:first-child rule */
    .wctn-toast:first-child {
        border-top-left-radius: 12px;
        border-top-right-radius: 12px;
        border-top: none;
    }

    .wctn-toast + .wctn-toast {
        border-top: none;
    }

    /* Slide up in, slide down out — correct for a bottom-anchored full-width card */
    .wctn-anim-slide {
        animation: wctnSlideUpIn 0.35s ease forwards !important;
    }

    /* Slide down out of view when dismissed */
    .wctn-toast.wctn-toast-hide {
        transform: translateY(20px) !important;
        opacity: 0;
    }

    .wctn-toast-title {
        font-size: 13px;
        margin-bottom: 2px;
    }

    .wctn-toast-content {
        font-size: 12px;
    }

    .wctn-toast-close {
        display: flex;
        align-items: center;
        justify-content: center;
        align-self: center;
        flex-shrink: 0;
        width: 28px;
        height: 28px;
        min-width: 28px;
        min-height: 28px;
        padding: 0;
        font-size: 17px;
        border-radius: 50%;
    }
}
.woocommerce-message,
.woocommerce-error,
.woocommerce-info,
.woocommerce-NoticeGroup,
.woocommerce-NoticeGroup-checkout {
    display: none !important;
}
