/* ==========================================
   Elementor Live Purchases Widget v2.0
   ========================================== */

.elp-widget-container {
    direction: rtl;
    font-family: 'Vazirmatn', 'IRANSans', 'Tahoma', system-ui, sans-serif;
}

/* ── Bar ── */
.elp-notification-bar {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 99999;
    background: var(--elp-bg, #1a1a2e);
    color: var(--elp-text, #fff);
    height: var(--elp-height, 42px);
    font-size: var(--elp-font, 13px);
    overflow: hidden;
    transition: transform .4s cubic-bezier(.4,0,.2,1), opacity .3s ease;
    box-shadow: 0 -3px 18px rgba(0,0,0,.3);
}

.elp-notification-bar.elp-position-bottom {
    bottom: 0;
    border-radius: var(--elp-radius, 8px) var(--elp-radius, 8px) 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,.25);
}

.elp-notification-bar.elp-position-top {
    top: 0;
    border-radius: 0 0 var(--elp-radius, 8px) var(--elp-radius, 8px);
    box-shadow: 0 4px 20px rgba(0,0,0,.25);
}

.admin-bar .elp-notification-bar.elp-position-top { top: 32px; }
@media (max-width:782px) {
    .admin-bar .elp-notification-bar.elp-position-top { top: 46px; }
}

.elp-notification-bar.elp-hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}
.elp-notification-bar.elp-position-top.elp-hidden {
    transform: translateY(-100%);
}

/* ── Inner ── */
.elp-bar-inner {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 14px;
    gap: 10px;
}

/* ── Ticker ── */
.elp-purchases-ticker {
    flex: 1;
    overflow: hidden;
    height: 100%;
    display: flex;
    align-items: center;
    min-width: 0;
}

.elp-ticker-track {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.elp-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    white-space: nowrap;
    animation: elpFadeUp 450ms cubic-bezier(.4,0,.2,1) both;
    flex-shrink: 0;
}

/* آیکون */
.elp-ticker-icon {
    font-size: 1.15em;
    flex-shrink: 0;
    animation: elpPulse 2.4s ease-in-out infinite;
}

/* اسم خریدار */
.elp-ticker-name {
    font-weight: 700;
    color: var(--elp-accent, #00ff88);
    flex-shrink: 0;
}

/* شهر */
.elp-ticker-city {
    opacity: .65;
    font-size: .82em;
    flex-shrink: 0;
}

/* جداکننده */
.elp-ticker-sep {
    opacity: .25;
    flex-shrink: 0;
    font-size: .8em;
}

/* کلمات «محصول» / «را خرید» */
.elp-ticker-action {
    opacity: .75;
    font-size: .88em;
    flex-shrink: 0;
}

/* نام محصول */
.elp-ticker-product {
    font-weight: 600;
    flex-shrink: 0;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* زمان */
.elp-ticker-time {
    opacity: .55;
    font-size: .8em;
    flex-shrink: 0;
}

/* ── Visitors badge ── */
.elp-visitors-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.1);
    padding: 3px 11px;
    border-radius: 20px;
    flex-shrink: 0;
    white-space: nowrap;
}

.elp-visitors-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    animation: elpDotPulse 2s ease-in-out infinite;
}

.elp-visitors-icon { font-size: .9em; }

.elp-visitors-count {
    font-weight: 700;
    color: var(--elp-accent, #00ff88);
    min-width: 22px;
    text-align: center;
    transition: color .25s;
}

.elp-visitors-label {
    font-size: .82em;
    opacity: .75;
}



/* ── Keyframes ── */
@keyframes elpFadeUp {
    from { opacity: 0; transform: translateY(16px) scale(.95); }
    to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

@keyframes elpSlideOut {
    to { opacity: 0; transform: translateY(-14px) scale(.95); }
}

@keyframes elpPulse {
    0%,100% { transform: scale(1); }
    50%      { transform: scale(1.2); }
}

@keyframes elpDotPulse {
    0%,100% { opacity: 1; transform: scale(1); }
    50%      { opacity: .35; transform: scale(.55); }
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .elp-bar-inner     { padding: 0 8px; gap: 6px; }
    .elp-ticker-item   { padding: 0 6px; gap: 4px; font-size: .9em; }
    .elp-ticker-city   { display: none; }
    .elp-ticker-sep    { display: none; }
    .elp-ticker-product { max-width: 110px; }
    .elp-visitors-label { display: none; }
    .elp-visitors-badge { padding: 3px 8px; }
}

@media (max-width: 480px) {
    .elp-ticker-time   { display: none; }
    .elp-ticker-action { display: none; }
    .elp-ticker-product { max-width: 75px; }
}
