/**
 * استایل‌های المنتور برای ویجت‌های Radnic
 * Elementor Styles for Radnic Widgets
 */

/* استایل‌های کلی ویجت‌ها */
.elementor-widget-apc-countdown .apc-countdown-timer,
.elementor-widget-apc-discount .apc-discount-badge,
.elementor-widget-apc-suitable-for .apc-suitable-for,
.elementor-widget-apc-category .apc-category-tag,
.elementor-widget-apc-price .apc-product-price,
.elementor-widget-apc-stock .apc-product-availability {
    margin: 0;
    position: relative;
}

/* کانتداون تایمر */
.elementor-widget-apc-countdown {
    position: relative;
}

.elementor-widget-apc-countdown .apc-countdown-timer {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    z-index: 1;
}

.elementor-widget-apc-countdown .apc-timer-days,
.elementor-widget-apc-countdown .apc-timer-hours,
.elementor-widget-apc-countdown .apc-timer-minutes,
.elementor-widget-apc-countdown .apc-timer-seconds {
    display: inline-block;
    text-align: center;
    min-width: 24px;
    font-weight: bold;
}

.elementor-widget-apc-countdown .apc-timer-separator {
    display: inline-block;
    margin: 0 2px;
    font-weight: bold;
}

/* پیام‌های خطا و انقضا */
.elementor-widget-apc-countdown .apc-countdown-error,
.elementor-widget-apc-countdown .apc-countdown-expired {
    color: #dc3545;
    font-weight: bold;
    text-align: center;
    padding: 10px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}

/* تگ تخفیف */
.elementor-widget-apc-discount .apc-discount-badge {
    display: inline-block;
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    z-index: 1;
}

/* مناسب برای */
.elementor-widget-apc-suitable-for .apc-suitable-for {
    display: inline-block;
    position: relative;
}

.elementor-widget-apc-suitable-for .apc-suitable-for-item {
    display: inline-block;
    margin: 2px;
    padding: 4px 8px;
    background: #e9ecef;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* دسته‌بندی */
.elementor-widget-apc-category .apc-category-tag {
    display: inline-block;
    margin: 2px;
    padding: 4px 8px;
    background: #e9ecef;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    color: inherit;
}

.elementor-widget-apc-category .apc-category-tag:hover {
    background: #dc3545;
    color: white;
    text-decoration: none;
}

/* قیمت */
.elementor-widget-apc-price .apc-product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.elementor-widget-apc-price .apc-current-price {
    font-size: 18px;
    font-weight: bold;
    color: #dc3545;
}

.elementor-widget-apc-price .apc-old-price {
    font-size: 14px;
    color: #6c757d;
    text-decoration: line-through;
}

/* موجودی */
.elementor-widget-apc-stock .apc-product-availability {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.elementor-widget-apc-stock .apc-availability-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.elementor-widget-apc-stock .apc-availability-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.elementor-widget-apc-stock .apc-stock-count {
    font-size: 12px;
    color: #6c757d;
}

/* انیمیشن‌های المنتور */
.elementor-widget-apc-countdown.animated .apc-countdown-timer,
.elementor-widget-apc-discount.animated .apc-discount-badge,
.elementor-widget-apc-suitable-for.animated .apc-suitable-for,
.elementor-widget-apc-category.animated .apc-category-tag,
.elementor-widget-apc-price.animated .apc-product-price,
.elementor-widget-apc-stock.animated .apc-product-availability {
    animation-fill-mode: both;
}

/* تنظیمات ریسپانسیو */
@media (max-width: 1024px) {
    .elementor-widget-apc-countdown .apc-countdown-timer {
        font-size: 14px;
        padding: 8px 12px;
    }
    
    .elementor-widget-apc-countdown .apc-timer-days,
    .elementor-widget-apc-countdown .apc-timer-hours,
    .elementor-widget-apc-countdown .apc-timer-minutes,
    .elementor-widget-apc-countdown .apc-timer-seconds {
        min-width: 22px;
        padding: 4px 6px;
    }
    
    .elementor-widget-apc-discount .apc-discount-badge {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .elementor-widget-apc-price .apc-current-price {
        font-size: 16px;
    }
    
    .elementor-widget-apc-price .apc-old-price {
        font-size: 13px;
    }
    
    .elementor-widget-apc-suitable-for .apc-suitable-for-item,
    .elementor-widget-apc-category .apc-category-tag {
        font-size: 11px;
        padding: 3px 7px;
    }
}

@media (max-width: 767px) {
    .elementor-widget-apc-countdown .apc-countdown-timer {
        font-size: 12px;
        gap: 2px;
        padding: 6px 10px;
    }
    
    .elementor-widget-apc-countdown .apc-timer-days,
    .elementor-widget-apc-countdown .apc-timer-hours,
    .elementor-widget-apc-countdown .apc-timer-minutes,
    .elementor-widget-apc-countdown .apc-timer-seconds {
        min-width: 18px;
        padding: 3px 5px;
        font-size: 11px;
    }
    
    .elementor-widget-apc-discount .apc-discount-badge {
        font-size: 10px;
        padding: 4px 8px;
    }
    
    .elementor-widget-apc-price .apc-product-price {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .elementor-widget-apc-price .apc-current-price {
        font-size: 14px;
    }
    
    .elementor-widget-apc-price .apc-old-price {
        font-size: 12px;
    }
    
    .elementor-widget-apc-stock .apc-product-availability {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .elementor-widget-apc-suitable-for .apc-suitable-for-item,
    .elementor-widget-apc-category .apc-category-tag {
        font-size: 10px;
        padding: 2px 6px;
        margin: 1px;
    }
    
    .elementor-widget-apc-stock .apc-availability-btn {
        font-size: 10px;
        padding: 6px 12px;
    }
    
    .elementor-widget-apc-stock .apc-stock-count {
        font-size: 10px;
    }
}

/* استایل‌های RTL */
[dir="rtl"] .elementor-widget-apc-price .apc-old-price {
    margin-right: 0;
    margin-left: 10px;
}

[dir="rtl"] .elementor-widget-apc-category .apc-category-tag {
    margin: 2px;
}

[dir="rtl"] .elementor-widget-apc-suitable-for .apc-suitable-for-item {
    margin: 2px;
}

/* دسترسی‌پذیری */
.elementor-widget-apc-countdown:focus-within .apc-countdown-timer,
.elementor-widget-apc-discount:focus-within .apc-discount-badge,
.elementor-widget-apc-suitable-for:focus-within .apc-suitable-for,
.elementor-widget-apc-category:focus-within .apc-category-tag,
.elementor-widget-apc-price:focus-within .apc-product-price,
.elementor-widget-apc-stock:focus-within .apc-product-availability {
    outline: 2px solid #dc3545;
    outline-offset: 2px;
}

/* حالت تاریک */
@media (prefers-color-scheme: dark) {
    .elementor-widget-apc-countdown .apc-countdown-error,
    .elementor-widget-apc-countdown .apc-countdown-expired {
        background: #721c24;
        border-color: #f5c6cb;
        color: #f8d7da;
    }
    
    .elementor-widget-apc-suitable-for .apc-suitable-for-item,
    .elementor-widget-apc-category .apc-category-tag {
        background: #333333;
        color: #ffffff;
    }
    
    .elementor-widget-apc-price .apc-old-price {
        color: #cccccc;
    }
    
    .elementor-widget-apc-stock .apc-stock-count {
        color: #cccccc;
    }
}
