/* Frontend Styles for Event Countdown Timer */

.ect-countdown-container {
    background-color: #f8f8f8;
    border-radius: 10px;
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 5px 0;
    position: relative;
    overflow: hidden;
}

.ect-countdown-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.ect-countdown-display {
    flex: 1;
    text-align: left;
    min-height: 50px;
    display: flex;
    align-items: center;
}

.ect-countdown-text {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    display: block;
    line-height: 1.4;
    transition: all 0.3s ease;
}

.ect-countdown-text.ongoing {
    color: #28a745;
    animation: pulse 2s infinite;
}

.ect-countdown-text.ended {
    color: #dc3545;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.ect-event-separator {
    font-size: 24px;
    color: #666;
    margin: 0 20px;
    font-weight: 300;
    opacity: 0.6;
}

.ect-event-info {
    flex: 1;
    text-align: right;
    min-height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ect-event-start,
.ect-event-end {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 4px;
    transition: color 0.2s ease;
}

.ect-event-start {
    font-weight: 500;
}

.ect-event-end {
    font-weight: 400;
    opacity: 0.9;
}

/* Hover Effects */
.ect-countdown-container:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
    transition: all 0.3s ease;
}

.ect-countdown-container:hover .ect-countdown-text {
    color: #0073aa;
}

.ect-countdown-container:hover .ect-event-start,
.ect-countdown-container:hover .ect-event-end {
    color: #333;
}

/* Error States */
.ect-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #f1aeb5;
    font-size: 14px;
    text-align: center;
    margin: 15px 0;
}

/* Loading State */
.ect-countdown-container.loading .ect-countdown-text {
    color: #999;
    animation: loadingPulse 1.5s infinite;
}

@keyframes loadingPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Different Background Themes */
.ect-countdown-container.theme-dark {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.ect-countdown-container.theme-dark .ect-countdown-text {
    color: white;
}

.ect-countdown-container.theme-dark .ect-event-start,
.ect-countdown-container.theme-dark .ect-event-end {
    color: rgba(255, 255, 255, 0.9);
}

.ect-countdown-container.theme-dark .ect-event-separator {
    color: rgba(255, 255, 255, 0.7);
}

.ect-countdown-container.theme-gradient {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    color: white;
}

.ect-countdown-container.theme-gradient .ect-countdown-text {
    color: white;
}

.ect-countdown-container.theme-gradient .ect-event-start,
.ect-countdown-container.theme-gradient .ect-event-end {
    color: rgba(255, 255, 255, 0.95);
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .ect-countdown-container {
        flex-direction: column;
        text-align: center;
        padding: 18px 15px;
        gap: 5px;
        align-items: center;
        justify-content: center;
    }
    
    .ect-countdown-display {
        text-align: center;
        width: 100%;
        flex: none;
        justify-content: center;
    }
    
    .ect-countdown-text {
        font-size: 16px;
        text-align: center;
        width: 100%;
    }
    
    .ect-event-info {
        text-align: center;
        width: 100%;
        flex: none;
        align-items: center;
    }
    
    .ect-event-start,
    .ect-event-end {
        font-size: 13px;
        text-align: center;
    }
    
    .ect-event-separator {
        margin: 0;
        transform: rotate(90deg);
        font-size: 20px;
        height: 0px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media screen and (max-width: 480px) {
    .ect-countdown-container {
        padding: 15px 12px;
        gap: 10px;
        text-align: center;
    }
    
    .ect-countdown-display {
        justify-content: center;
        text-align: center;
    }
    
    .ect-countdown-text {
        font-size: 15px;
        text-align: center;
    }
    
    .ect-event-info {
        text-align: center;
        align-items: center;
    }
    
    .ect-event-start,
    .ect-event-end {
        font-size: 12px;
        text-align: center;
    }
    
    .ect-event-separator {
        font-size: 18px;
    }
}

/* Animation for counting */
.ect-countdown-text.counting {
    animation: countingBlink 1s infinite;
}

@keyframes countingBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.7; }
}

/* Accessibility */
.ect-countdown-container:focus-within {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .ect-countdown-container {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        border: 1px solid #ddd;
    }
    
    .ect-countdown-text,
    .ect-event-start,
    .ect-event-end {
        color: black !important;
    }
}