/**
 * Countdown Timer Styles
 *
 * Styling for the SWSTRC countdown timer components.
 *
 * @since 1.0.0
 */

/* Base countdown timer container */
.swstrc-countdown-timer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.swstrc-countdown-timer::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: swstrc-timer-shimmer 3s infinite;
}

@keyframes swstrc-timer-shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Timer title */
.swstrc-timer-title h3 {
    margin: 0 0 20px 0;
    font-size: 24px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Timer display container */
.swstrc-timer-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

/* Timer blocks */
.swstrc-timer-block {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 15px 20px;
    min-width: 80px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.swstrc-timer-block:hover,
.swstrc-timer-block.swstrc-timer-block-hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.25);
}

.swstrc-timer-block::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.swstrc-timer-block:hover::after {
    left: 100%;
}

/* Timer values */
.swstrc-timer-value {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
    font-family: 'Courier New', monospace;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.swstrc-timer-value.swstrc-timer-updated {
    transform: scale(1.1);
    color: #ffeb3b;
}

/* Timer labels */
.swstrc-timer-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    font-weight: 500;
}

/* Timer separators */
.swstrc-timer-separator {
    font-size: 30px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 5px;
    animation: swstrc-timer-pulse 1s infinite alternate;
}

@keyframes swstrc-timer-pulse {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* Timer status */
.swstrc-timer-status {
    font-size: 18px;
    font-weight: 600;
    margin: 15px 0;
    color: #ffeb3b;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Timer description */
.swstrc-timer-description p {
    margin: 15px 0 0 0;
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.4;
}

/* Urgency states */
.swstrc-countdown-timer.swstrc-urgent {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.swstrc-countdown-timer.swstrc-very-urgent {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    animation: swstrc-timer-urgent-pulse 2s infinite;
}

.swstrc-countdown-timer.swstrc-critical {
    background: linear-gradient(135deg, #ff0844 0%, #ffb199 100%);
    animation: swstrc-timer-critical-pulse 1s infinite;
}

@keyframes swstrc-timer-urgent-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@keyframes swstrc-timer-critical-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 15px 40px rgba(255, 8, 68, 0.4);
    }
}

/* Expired timer state */
.swstrc-countdown-timer.swstrc-timer-expired {
    background: linear-gradient(135deg, #636363 0%, #a2ab58 100%);
    opacity: 0.7;
}

.swstrc-timer-expired-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 600;
    margin: 20px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 15px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
}

.swstrc-timer-expired-message:hover {
    background: rgba(0, 0, 0, 0.3);
    transform: scale(1.05);
}

.swstrc-expired-icon {
    font-size: 28px;
}

.swstrc-expired-text {
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Compact style */
.swstrc-countdown-timer.swstrc-timer-style-compact {
    padding: 15px;
    margin: 10px 0;
}

.swstrc-timer-style-compact .swstrc-timer-title h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

.swstrc-timer-style-compact .swstrc-timer-block {
    min-width: 60px;
    padding: 10px 15px;
}

.swstrc-timer-style-compact .swstrc-timer-value {
    font-size: 24px;
    margin-bottom: 5px;
}

.swstrc-timer-style-compact .swstrc-timer-label {
    font-size: 10px;
}

.swstrc-timer-style-compact .swstrc-timer-separator {
    font-size: 20px;
}

/* Minimal style */
.swstrc-countdown-timer.swstrc-timer-style-minimal {
    background: transparent;
    padding: 10px;
    margin: 10px 0;
    box-shadow: none;
    color: #333;
}

.swstrc-timer-style-minimal::before {
    display: none;
}

.swstrc-timer-style-minimal .swstrc-timer-title h3 {
    color: #333;
    font-size: 16px;
    margin-bottom: 10px;
    text-shadow: none;
}

.swstrc-timer-style-minimal .swstrc-timer-block {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
}

.swstrc-timer-style-minimal .swstrc-timer-value {
    color: #495057;
    text-shadow: none;
}

.swstrc-timer-style-minimal .swstrc-timer-label {
    color: #6c757d;
}

.swstrc-timer-style-minimal .swstrc-timer-separator {
    color: #6c757d;
}

/* Responsive design */
@media (max-width: 768px) {
    .swstrc-countdown-timer {
        padding: 20px 15px;
        margin: 15px 0;
    }

    .swstrc-timer-title h3 {
        font-size: 20px;
    }

    .swstrc-timer-display {
        gap: 8px;
    }

    .swstrc-timer-block {
        min-width: 70px;
        padding: 12px 15px;
    }

    .swstrc-timer-value {
        font-size: 28px;
    }

    .swstrc-timer-separator {
        font-size: 24px;
        margin: 0 3px;
    }
}

@media (max-width: 480px) {
    .swstrc-countdown-timer {
        padding: 15px 10px;
    }

    .swstrc-timer-title h3 {
        font-size: 18px;
    }

    .swstrc-timer-display {
        gap: 5px;
        flex-wrap: wrap;
    }

    .swstrc-timer-block {
        min-width: 60px;
        padding: 10px 12px;
    }

    .swstrc-timer-value {
        font-size: 24px;
    }

    .swstrc-timer-label {
        font-size: 10px;
    }

    .swstrc-timer-separator {
        font-size: 20px;
        margin: 0 2px;
    }
}

/* Admin preview styling */
.swstrc-countdown-preview {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.swstrc-countdown-preview .swstrc-countdown-timer {
    margin: 20px 0;
}

.swstrc-countdown-preview h3 {
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 8px;
    margin-top: 30px;
    margin-bottom: 15px;
}

.swstrc-countdown-preview h3:first-child {
    margin-top: 0;
}

/* Shortcode examples styling */
.swstrc-countdown-shortcodes {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.swstrc-shortcode-examples {
    background: #f8f9fa;
    border-left: 4px solid #0073aa;
    padding: 15px;
    margin: 15px 0;
}

.swstrc-shortcode-examples h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 14px;
}

.swstrc-shortcode-examples code {
    background: #e9ecef;
    color: #495057;
    padding: 8px 12px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    display: block;
    margin: 5px 0;
}

/* Print styles */
@media print {
    .swstrc-countdown-timer {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }

    .swstrc-timer-block {
        background: #f5f5f5 !important;
        color: black !important;
        border: 1px solid #ccc !important;
    }

    .swstrc-countdown-timer::before,
    .swstrc-timer-block::after {
        display: none !important;
    }

    .swstrc-timer-expired-message:hover {
        transform: none !important;
        background: transparent !important;
    }
}