/**
 * AI Countdown Widget Styles
 * 
 * @package Templines_Shortcodes_Core
 * @author Templines
 * @link https://templines.com
 */

/* Base Container Styles */
.tl-ai-countdown-container {
    position: relative;
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.tl-ai-countdown-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    pointer-events: none;
}

/* Title Styles */
.tl-countdown-title {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
}

.tl-countdown-description {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 30px 0;
    position: relative;
    z-index: 2;
}

/* Countdown Wrapper */
.tl-countdown-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 2;
}

/* Horizontal Layout (Default) */
.tl-layout-horizontal .tl-countdown-wrapper {
    flex-direction: row;
    flex-wrap: wrap;
}

/* Vertical Layout */
.tl-layout-vertical .tl-countdown-wrapper {
    flex-direction: column;
    gap: 15px;
}

.tl-layout-vertical .tl-countdown-item {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 200px;
}

.tl-layout-vertical .tl-countdown-number {
    min-width: 80px;
}

/* Circular Layout */
.tl-layout-circular .tl-countdown-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 20px;
    max-width: 300px;
    margin: 0 auto;
}

.tl-layout-circular .tl-countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tl-layout-circular .tl-countdown-number {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Countdown Items */
.tl-countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* Numbers */
.tl-countdown-number {
    font-size: 48px;
    font-weight: 700;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    padding: 15px 20px;
    border-radius: 10px;
    min-width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tl-countdown-number:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Labels */
.tl-countdown-label {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Separators */
.tl-countdown-separator {
    font-size: 36px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 5px;
    animation: tl-separator-pulse 2s infinite;
}

@keyframes tl-separator-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Hide separators when disabled */
.tl-no-separators .tl-countdown-separator {
    display: none;
}

/* Hide labels when disabled */
.tl-no-labels .tl-countdown-label {
    display: none;
}

.tl-no-labels .tl-countdown-item {
    gap: 0;
}

/* Animation Styles */

/* Flip Animation */
.tl-animation-flip .tl-countdown-number {
    perspective: 1000px;
}

.tl-animation-flip .tl-countdown-number.tl-flip {
    animation: tl-flip-animation 0.6s ease-in-out;
}

@keyframes tl-flip-animation {
    0% { transform: rotateY(0deg); }
    50% { transform: rotateY(-90deg); }
    100% { transform: rotateY(0deg); }
}

/* Slide Animation */
.tl-animation-slide .tl-countdown-number.tl-slide {
    animation: tl-slide-animation 0.5s ease-out;
}

@keyframes tl-slide-animation {
    0% { transform: translateY(-20px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* Fade Animation */
.tl-animation-fade .tl-countdown-number.tl-fade {
    animation: tl-fade-animation 0.5s ease-in-out;
}

@keyframes tl-fade-animation {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Pulse Animation */
.tl-animation-pulse .tl-countdown-number {
    animation: tl-pulse-animation 2s infinite;
}

@keyframes tl-pulse-animation {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Expired State */
.tl-countdown-expired {
    text-align: center;
    padding: 20px;
    background: rgba(255, 0, 0, 0.1);
    border: 2px solid rgba(255, 0, 0, 0.3);
    border-radius: 10px;
    color: #ff4444;
    font-size: 18px;
    font-weight: 600;
    margin-top: 20px;
}

/* AI Status Indicator */
.tl-ai-status {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.tl-ai-indicator {
    background: rgba(0, 255, 0, 0.2);
    color: #00ff00;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(0, 255, 0, 0.3);
    animation: tl-ai-pulse 2s infinite;
}

@keyframes tl-ai-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* AI Mode Specific Styles */
.tl-mode-ai_triggered {
    border: 2px solid rgba(0, 255, 0, 0.3);
}

.tl-mode-ai_triggered::after {
    content: 'AI';
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 255, 0, 0.2);
    color: #00ff00;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    z-index: 10;
}

.tl-mode-hybrid::after {
    content: 'HYBRID';
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 165, 0, 0.2);
    color: #ffa500;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    z-index: 10;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tl-ai-countdown-container {
        padding: 20px;
    }
    
    .tl-countdown-title {
        font-size: 24px;
    }
    
    .tl-countdown-wrapper {
        gap: 15px;
    }
    
    .tl-countdown-number {
        font-size: 36px;
        padding: 12px 16px;
        min-width: 60px;
    }
    
    .tl-layout-horizontal .tl-countdown-wrapper {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .tl-layout-circular .tl-countdown-wrapper {
        grid-template-columns: 1fr 1fr;
        max-width: 250px;
    }
    
    .tl-layout-circular .tl-countdown-number {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .tl-countdown-wrapper {
        gap: 10px;
    }
    
    .tl-countdown-number {
        font-size: 28px;
        padding: 10px 12px;
        min-width: 50px;
    }
    
    .tl-countdown-separator {
        font-size: 24px;
        margin: 0 2px;
    }
    
    .tl-layout-horizontal .tl-countdown-wrapper {
        flex-direction: column;
        align-items: center;
    }
    
    .tl-layout-horizontal .tl-countdown-separator {
        display: none;
    }
    
    .tl-layout-circular .tl-countdown-wrapper {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 1fr);
        max-width: 150px;
    }
}

/* Special Effects */
.tl-ai-countdown-container.tl-triggered {
    animation: tl-trigger-effect 1s ease-out;
}

@keyframes tl-trigger-effect {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Urgency States */
.tl-ai-countdown-container.tl-urgent {
    animation: tl-urgent-pulse 1s infinite;
}

@keyframes tl-urgent-pulse {
    0%, 100% {
        box-shadow: 0 10px 30px rgba(255, 0, 0, 0.2);
    }
    50% {
        box-shadow: 0 10px 30px rgba(255, 0, 0, 0.4);
    }
}

.tl-ai-countdown-container.tl-critical {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    animation: tl-critical-shake 0.5s infinite;
}

@keyframes tl-critical-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}
