/* 
 * استایل ویجت نمایش تخفیف محصول
 * Woolements Discount Widget Styles
 */

.woolements-discount-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    margin: 20px 0;
    transition: all 0.3s ease;
}

.woolements-discount-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}


/* استایل نشان تخفیف */

.woolements-discount-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.woolements-discount-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.woolements-discount-badge:hover::before {
    left: 100%;
}

.woolements-discount-prefix {
    font-size: 16px;
    font-weight: 600;
    color: #667eea;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.woolements-discount-value {
    font-size: 32px;
    font-weight: 800;
    color: #ff6b6b;
    line-height: 1;
    text-shadow: 2px 2px 4px rgba(255, 107, 107, 0.2);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.woolements-discount-suffix {
    font-size: 16px;
    font-weight: 600;
    color: #667eea;
    text-transform: uppercase;
    letter-spacing: 1px;
}


/* استایل تایمر */

.woolements-discount-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    max-width: 500px;
}

.woolements-timer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-width: 65px;
    width: 65px;
    height: 65px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.woolements-timer-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.woolements-timer-item:hover::before {
    transform: scaleX(1);
}

.woolements-timer-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.woolements-timer-number {
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
    line-height: 1;
    margin-bottom: 5px;
    font-family: 'Arial', sans-serif;
    direction: ltr;
}

.woolements-timer-label {
    font-size: 10px;
    font-weight: 600;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


/* استایل جداگانه برای ثانیه */

.woolements-timer-item.seconds-item {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
}

.woolements-timer-item.seconds-item .woolements-timer-number {
    color: #ffffff;
}

.woolements-timer-item.seconds-item .woolements-timer-label {
    color: rgba(255, 255, 255, 0.9);
}


/* انیمیشن‌های مختلف برای ثانیه */


/* Pulse Animation */

@keyframes pulse-animation {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

.seconds-item.pulse-animation {
    animation: pulse-animation 0.4s ease-in-out;
}


/* Flip Animation */

@keyframes flip-animation {
    0% {
        transform: perspective(400px) rotateX(0);
    }
    50% {
        transform: perspective(400px) rotateX(90deg);
        opacity: 0.7;
    }
    100% {
        transform: perspective(400px) rotateX(0);
    }
}

.seconds-item.flip-animation {
    animation: flip-animation 0.5s ease-in-out;
}


/* Zoom Animation */

@keyframes zoom-animation {
    0% {
        transform: scale(1);
    }
    30% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
    }
}

.seconds-item.zoom-animation {
    animation: zoom-animation 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}


/* Bounce Animation */

@keyframes bounce-animation {
    0%,
    100% {
        transform: translateY(0);
    }
    25% {
        transform: translateY(-15px);
    }
    50% {
        transform: translateY(0);
    }
    75% {
        transform: translateY(-7px);
    }
}

.seconds-item.bounce-animation {
    animation: bounce-animation 0.6s ease-in-out;
}


/* Rotate 360 Animation */

@keyframes rotate-animation {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.1);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

.seconds-item.rotate-animation {
    animation: rotate-animation 0.6s ease-in-out;
}


/* Shake Animation */

@keyframes shake-animation {
    0%,
    100% {
        transform: translateX(0);
    }
    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }
    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.seconds-item.shake-animation {
    animation: shake-animation 0.5s ease-in-out;
}


/* Slide Animation */

@keyframes slide-animation {
    0% {
        transform: translateY(-20px);
        opacity: 0;
    }
    50% {
        transform: translateY(5px);
        opacity: 1;
    }
    100% {
        transform: translateY(0);
    }
}

.seconds-item.slide-animation {
    animation: slide-animation 0.4s ease-out;
}


/* متن پایان تخفیف */

.woolements-timer-expired {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
    padding: 15px 25px;
    background: rgba(255, 107, 107, 0.2);
    border-radius: 8px;
    border: 2px solid rgba(255, 107, 107, 0.4);
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* حالت مخفی */

.woolements-discount-hidden {
    display: none !important;
}


/* رسپانسیو */

@media (max-width: 768px) {
    .woolements-discount-container {
        padding: 20px;
        gap: 15px;
    }
    .woolements-discount-badge {
        flex-direction: column;
        padding: 15px 20px;
        gap: 8px;
    }
    .woolements-discount-value {
        font-size: 28px;
    }
    .woolements-discount-prefix,
    .woolements-discount-suffix {
        font-size: 14px;
    }
    .woolements-discount-timer {
        gap: 10px;
        padding: 15px;
        flex-wrap: wrap;
    }
    .woolements-timer-item {
        padding: 8px 10px;
        min-width: 55px;
        width: 55px;
        height: 55px;
    }
    .woolements-timer-number {
        font-size: 20px;
    }
    .woolements-timer-label {
        font-size: 9px;
    }
}

@media (max-width: 480px) {
    .woolements-discount-container {
        padding: 15px;
        border-radius: 12px;
    }
    .woolements-discount-badge {
        padding: 12px 15px;
    }
    .woolements-discount-value {
        font-size: 24px;
    }
    .woolements-discount-prefix,
    .woolements-discount-suffix {
        font-size: 12px;
    }
    .woolements-timer-item {
        padding: 6px 8px;
        min-width: 50px;
        width: 50px;
        height: 50px;
    }
    .woolements-timer-number {
        font-size: 18px;
    }
    .woolements-timer-label {
        font-size: 8px;
    }
}


/* انیمیشن ورود */

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.woolements-discount-container {
    animation: slideInUp 0.6s ease-out;
}


/* افکت درخشش برای نشان تخفیف */

@keyframes shine {
    0% {
        background-position: -200%;
    }
    100% {
        background-position: 200%;
    }
}

.woolements-discount-badge.shine {
    background: linear-gradient( 90deg, rgba(255, 255, 255, 0.95) 25%, rgba(255, 255, 255, 1) 50%, rgba(255, 255, 255, 0.95) 75%);
    background-size: 200% auto;
    animation: shine 3s linear infinite;
}


/* استایل RTL */

[dir="rtl"] .woolements-discount-timer {
    direction: rtl;
}

[dir="rtl"] .woolements-timer-number {
    direction: ltr;
}


/* تم تاریک */

@media (prefers-color-scheme: dark) {
    .woolements-discount-container {
        background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    }
    .woolements-discount-badge {
        background: rgba(45, 55, 72, 0.95);
    }
    .woolements-timer-item {
        background: linear-gradient(135deg, rgba(74, 85, 104, 0.95), rgba(74, 85, 104, 0.85));
    }
    .woolements-timer-number {
        color: #e2e8f0;
    }
    .woolements-timer-label {
        color: #a0aec0;
    }
}