/**
 * Cart Timer Discount - Frontend Styles
 */

/* Timer Wrapper */
.ctd-timer-wrapper {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
    animation: ctd-pulse 2s infinite;
}

@keyframes ctd-pulse {

    0%,
    100% {
        box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
    }

    50% {
        box-shadow: 0 4px 25px rgba(245, 158, 11, 0.4);
    }
}

.ctd-timer-wrapper.ctd-expired {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-color: #9ca3af;
    animation: none;
}

/* Timer Content */
.ctd-timer-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ctd-timer-icon {
    font-size: 28px;
    animation: ctd-shake 0.5s ease-in-out infinite;
}

@keyframes ctd-shake {

    0%,
    100% {
        transform: rotate(-5deg);
    }

    50% {
        transform: rotate(5deg);
    }
}

.ctd-expired .ctd-timer-icon {
    animation: none;
    opacity: 0.5;
}

.ctd-timer-text {
    flex: 1;
}

.ctd-message {
    font-size: 16px;
    font-weight: 600;
    color: #92400e;
    line-height: 1.4;
}

.ctd-expired .ctd-message {
    color: #6b7280;
}

/* Countdown */
.ctd-countdown {
    display: inline-block;
    background: #dc2626;
    color: #fff;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    min-width: 70px;
    text-align: center;
    animation: ctd-countdown-pulse 1s infinite;
}

@keyframes ctd-countdown-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Progress Bar */
.ctd-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 3px;
    margin-top: 12px;
    overflow: hidden;
}

.ctd-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
    border-radius: 3px;
    transition: width 1s linear;
}

/* Low time warning */
.ctd-timer-wrapper.ctd-warning {
    animation: ctd-warning-pulse 0.5s infinite;
}

.ctd-timer-wrapper.ctd-warning .ctd-countdown {
    animation: ctd-warning-flash 0.5s infinite;
}

@keyframes ctd-warning-pulse {

    0%,
    100% {
        background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    }

    50% {
        background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    }
}

@keyframes ctd-warning-flash {

    0%,
    100% {
        background: #dc2626;
    }

    50% {
        background: #991b1b;
    }
}

/* Discount Notice */
.ctd-discount-notice {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ctd-timer-applied {
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #86efac;
}

.ctd-coupon-better {
    background: #dbeafe;
    color: #2563eb;
    border: 1px solid #93c5fd;
}

.ctd-daily-limit {
    background: #fef3c7;
    color: #d97706;
    border: 1px solid #fcd34d;
}

.ctd-icon {
    font-size: 18px;
}

/* Responsive */
@media screen and (max-width: 600px) {
    .ctd-timer-wrapper {
        padding: 14px 16px;
    }

    .ctd-timer-content {
        flex-direction: column;
        text-align: center;
    }

    .ctd-timer-icon {
        font-size: 24px;
    }

    .ctd-message {
        font-size: 14px;
    }

    .ctd-countdown {
        font-size: 16px;
        padding: 3px 10px;
    }
}