/* استایل‌های پایه شمارنده */
.bebanstore-countdown {
    font-family: inherit;
    text-align: center;
    margin: 10px 0;
    direction: ltr;
}

.bebanstore-countdown-timer {
    display: inline-flex;
    align-items: flex-start;
    gap: 4px;
}

.bebanstore-countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    font-size: 13px !important;
    font-weight: 500;
}

.bebanstore-countdown-item span:first-child {
    color: inherit;
    margin-right: 8px; /* فاصله برای جداکننده */
    font-size: inherit !important; /* استفاده از اندازه فونت والد */
}

.bebanstore-countdown-label {
    font-size: 12px;
    margin-top: 4px;
    color: #666;
}

.bebanstore-countdown-separator {
    font-size: 13px;
    font-weight: bold;
    color: inherit;
    position: absolute;
    right: 0px;
    top: 0;
}

/* مخفی کردن جداکننده آخر */
.bebanstore-countdown-item:last-child .bebanstore-countdown-separator {
    display: none;
}

/* استایل پیش‌فرض */
.bebanstore-countdown {
    color: #e74c3c;
    font-family: inherit;
    margin: 0;
    display: inline-block;
}

.bebanstore-countdown-item span:first-child {
    font-size: 16px;
    font-weight: bold;
    color: #e74c3c;
}

/* استایل مدرن */
.bebanstore-countdown-modern {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    padding: 15px;
    border-radius: 8px;
    color: #fff;
}

.bebanstore-countdown-modern .bebanstore-countdown-item span:first-child {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 500;
    color: #fff;
}

.bebanstore-countdown-modern .bebanstore-countdown-label {
    color: rgba(255, 255, 255, 0.8);
}

/* استایل مینیمال */
.bebanstore-countdown-minimal {
    border: 1px solid #e5e7eb;
    padding: 8px;
    border-radius: 4px;
}

.bebanstore-countdown-minimal .bebanstore-countdown-item span:first-child {
    font-size: 14px;
    color: #4b5563;
}

.bebanstore-countdown-minimal .bebanstore-countdown-label {
    color: #9ca3af;
}

/* سازگاری با RTL */
.rtl .bebanstore-countdown {
    direction: ltr;
}

/* سازگاری با موبایل */
@media screen and (max-width: 480px) {
    .bebanstore-countdown {
        font-size: 0.9em;
    }

    .bebanstore-countdown-item {
        min-width: 40px;
    }

    .bebanstore-countdown-item span:first-child {
        font-size: 14px;
    }

    .bebanstore-countdown-label {
        font-size: 10px;
    }
}

.bebanstore-countdown {
    font-family: inherit;
}

.bebanstore-countdown-label {
    font-family: inherit;
}

/* ========== سبک‌های جدید شمارنده معکوس ========== */

/* سبک کلاسیک (پیش‌فرض) */
.bebanstore-countdown-classic .bebanstore-countdown-timer {
    display: inline-flex;
    align-items: flex-start;
    gap: 4px;
}

.bebanstore-countdown-classic .bebanstore-countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.bebanstore-countdown-classic .bebanstore-countdown-item span:first-child {
    color: inherit;
    margin-right: 8px;
    font-size: inherit !important;
}

.bebanstore-countdown-classic .bebanstore-countdown-separator {
    font-size: 13px;
    font-weight: bold;
    color: inherit;
    position: absolute;
    right: 0px;
    top: 0;
}

.bebanstore-countdown-classic .bebanstore-countdown-item:last-child .bebanstore-countdown-separator {
    display: none;
}

/* سبک کارتی */
.bebanstore-countdown-card .bebanstore-countdown-timer {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.bebanstore-countdown-card .bebanstore-countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 8px 12px;
    min-width: 50px;
}

.bebanstore-countdown-card .bebanstore-countdown-item span:first-child {
    color: inherit;
    font-size: inherit !important;
    font-weight: bold;
    margin: 0;
}

.bebanstore-countdown-card .bebanstore-countdown-label {
    font-size: 11px;
    margin-top: 4px;
    color: #6c757d;
    font-weight: 500;
}

.bebanstore-countdown-card .bebanstore-countdown-separator {
    display: none !important;
}

/* سبک خطی */
.bebanstore-countdown-inline .bebanstore-countdown-timer {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
}

.bebanstore-countdown-inline .bebanstore-countdown-item {
    display: none !important; /* مخفی کردن آیتم‌های جداگانه */
}

.bebanstore-countdown-inline .bebanstore-countdown-days,
.bebanstore-countdown-inline .bebanstore-countdown-hours,
.bebanstore-countdown-inline .bebanstore-countdown-minutes,
.bebanstore-countdown-inline .bebanstore-countdown-seconds {
    color: inherit;
    font-size: inherit !important;
    font-weight: bold;
    margin: 0;
    display: inline-block;
}

.bebanstore-countdown-inline .bebanstore-countdown-label,
.bebanstore-countdown-inline .bebanstore-countdown-day-label,
.bebanstore-countdown-inline .bebanstore-countdown-hour-label,
.bebanstore-countdown-inline .bebanstore-countdown-minute-label,
.bebanstore-countdown-inline .bebanstore-countdown-second-label {
    font-size: 12px;
    color: #666;
    margin: 0px;
    font-weight: normal;
    display: inline-block;
}

.bebanstore-countdown-inline .bebanstore-countdown-separator {
    font-size: 14px;
    font-weight: bold;
    color: inherit !important;
    margin: 0px 4px;
    display: inline-block;
    position: relative;
    text-align: center;
}

/* مخفی کردن آخرین جداکننده در سبک خطی */
.bebanstore-countdown-inline .bebanstore-countdown-second-label + .bebanstore-countdown-separator {
    display: none !important;
}

/* اگر برچسب‌ها غیرفعال باشند، آخرین جداکننده را مخفی کن */
.bebanstore-countdown-inline .bebanstore-countdown-seconds:last-child + .bebanstore-countdown-separator {
    display: none !important;
}

/* مخفی کردن جداکننده بعد از آخرین عنصر در حالت inline */
.bebanstore-countdown-inline .bebanstore-countdown-seconds ~ .bebanstore-countdown-separator {
    display: none !important;
}

/* مخفی کردن جداکننده بعد از برچسب ثانیه */
.bebanstore-countdown-inline .bebanstore-countdown-second-label ~ .bebanstore-countdown-separator {
    display: none !important;
}

/* مخفی کردن همه جداکننده‌های بعد از ثانیه در حالت inline */
.bebanstore-countdown-inline .bebanstore-countdown-seconds:last-of-type ~ .bebanstore-countdown-separator {
    display: none !important;
}

/* مخفی کردن جداکننده بعد از آخرین عنصر در حالت inline */
.bebanstore-countdown-inline .bebanstore-countdown-timer > .bebanstore-countdown-separator:last-of-type {
    display: none !important;
}

/* مخفی کردن جداکننده بعد از ثانیه - rule قوی */
.bebanstore-countdown-inline .bebanstore-countdown-seconds + .bebanstore-countdown-separator {
    display: none !important;
}

/* مخفی کردن آخرین جداکننده با nth-child */
.bebanstore-countdown-inline .bebanstore-countdown-timer .bebanstore-countdown-separator:nth-last-child(1) {
    display: none !important;
}

/* مخفی کردن جداکننده بعد از آخرین span */
.bebanstore-countdown-inline .bebanstore-countdown-timer > span:last-child + .bebanstore-countdown-separator {
    display: none !important;
}

/* تنظیمات responsive برای سبک‌های جدید */
@media screen and (max-width: 480px) {
    /* سبک کلاسیک */
    .bebanstore-countdown-classic .bebanstore-countdown-item {
        min-width: 35px;
    }
    
    .bebanstore-countdown-classic .bebanstore-countdown-item span:first-child {
        font-size: 14px;
    }
    
    .bebanstore-countdown-classic .bebanstore-countdown-label {
        font-size: 10px;
    }
    
    /* سبک کارتی */
    .bebanstore-countdown-card .bebanstore-countdown-item {
        padding: 6px 8px;
        min-width: 40px;
    }
    
    .bebanstore-countdown-card .bebanstore-countdown-item span:first-child {
        font-size: 14px;
    }
    
    .bebanstore-countdown-card .bebanstore-countdown-label {
        font-size: 9px;
    }
    
    /* سبک خطی */
    .bebanstore-countdown-inline .bebanstore-countdown-days,
    .bebanstore-countdown-inline .bebanstore-countdown-hours,
    .bebanstore-countdown-inline .bebanstore-countdown-minutes,
    .bebanstore-countdown-inline .bebanstore-countdown-seconds {
        font-size: 14px;
    }
    
    .bebanstore-countdown-inline .bebanstore-countdown-label,
    .bebanstore-countdown-inline .bebanstore-countdown-day-label,
    .bebanstore-countdown-inline .bebanstore-countdown-hour-label,
    .bebanstore-countdown-inline .bebanstore-countdown-minute-label,
    .bebanstore-countdown-inline .bebanstore-countdown-second-label {
        font-size: 10px;
        margin: 0 2px 0 1px;
    }
    
    .bebanstore-countdown-inline .bebanstore-countdown-separator {
        font-size: 12px;
        margin: 0 4px;
    }
    
    .bebanstore-countdown-inline .bebanstore-countdown-timer {
        gap: 1px;
    }
} 