/* ============================================================
   bale-banner.css — sticky «خرید سریع با ربات بله» banner
   - glowing orange→red gradient, animated shine sweep (CSS only)
   - fixed bottom-right (RTL start side) so it never covers the
     floating action buttons (bottom-left), the compare dock
     (z-index 1150, only shown with compare items) or the ticker
   - dismissible; choice persisted in localStorage (3 days)
   - pure transform/opacity animations — near-zero CPU
   ============================================================ */

#baleQuickBanner {
    position: fixed;
    right: 16px;
    bottom: 64px;               /* above the 32px ticker bar */
    z-index: 1140;              /* below compare-dock (1150) */
    max-width: 260px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: transform .45s ease, opacity .45s ease, visibility .45s ease;
    pointer-events: none;
    font-family: inherit;
}

#baleQuickBanner.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.bale-banner__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 14px;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, #ff9d2e 0%, #ff5722 45%, #e41414 100%);
    background-size: 160% 160%;
    box-shadow:
        0 6px 18px rgba(228, 20, 20, .35),
        0 2px 8px rgba(255, 87, 34, .30);
    animation: bale-banner-glow 2.8s ease-in-out infinite;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, .35);
}

/* animated shine sweep */
.bale-banner__link::after {
    content: '';
    position: absolute;
    top: -40%;
    bottom: -40%;
    width: 34px;
    inset-inline-start: -60px;
    background: linear-gradient(105deg,
        transparent 0%,
        rgba(255, 255, 255, .55) 50%,
        transparent 100%);
    transform: skewX(-18deg);
    animation: bale-banner-shine 3.4s ease-in-out infinite;
}

@keyframes bale-banner-glow {
    0%, 100% {
        box-shadow: 0 6px 18px rgba(228, 20, 20, .35), 0 2px 8px rgba(255, 87, 34, .30);
        background-position: 0% 50%;
    }
    50% {
        box-shadow: 0 8px 26px rgba(255, 60, 20, .55), 0 3px 12px rgba(255, 157, 46, .40);
        background-position: 100% 50%;
    }
}

@keyframes bale-banner-shine {
    0%   { inset-inline-start: -60px; }
    55%  { inset-inline-start: 130%; }
    100% { inset-inline-start: 130%; }
}

.bale-banner__logo {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .22);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.bale-banner__logo img {
    width: 22px;
    height: 22px;
    display: block;
}

.bale-banner__text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    line-height: 1.45;
}

.bale-banner__text strong {
    font-size: .82rem;
    font-weight: 800;
    white-space: nowrap;
}

.bale-banner__text small {
    font-size: .68rem;
    opacity: .92;
    white-space: nowrap;
}

.bale-banner__close {
    position: absolute;
    top: -9px;
    inset-inline-end: -9px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: #fff;
    color: #d43a17;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .22);
}

.bale-banner__close:hover { background: #fff3ef; }

@media (max-width: 575.98px) {
    /* فقط موبایل: بنر کوتاه‌تر می‌شود و چسبیده به سمت راست می‌ماند تا
       هرگز روی دکمه‌های شناور (آیکون بله) نیفتد و عرض صفحه را نگیرد. */
    #baleQuickBanner {
        right: 10px;
        left: auto;
        bottom: 54px;
        max-width: 205px;
    }
    .bale-banner__link {
        padding: 8px 11px;
        gap: 8px;
        border-radius: 12px;
    }
    .bale-banner__logo { width: 28px; height: 28px; }
    .bale-banner__logo img { width: 18px; height: 18px; }
    .bale-banner__text strong { font-size: .72rem; }
    .bale-banner__text small { font-size: .62rem; }
    .bale-banner__close { width: 21px; height: 21px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
    .bale-banner__link,
    .bale-banner__link::after {
        animation: none;
    }
}
