/* Course Countdown Styles */

.course-countdown-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 25px;
    text-align: center;
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
}

/* Course Selector */
.course-selector {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.course-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.course-select {
    width: 100%;
    max-width: 300px;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.course-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Countdown Header */
.countdown-header {
    margin-bottom: 25px;
}

.countdown-header .course-title {
    font-size: 22px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.countdown-label {
    font-size: 14px;
    color: #7f8c8d;
    margin: 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Countdown Timer */
.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.time-unit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 20px 15px;
    min-width: 80px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.time-unit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

.time-unit .number {
    display: block;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.time-unit .label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

/* Countdown Expired */
.countdown-expired {
    background: #f8d7da;
    color: #721c24;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    font-weight: 500;
}

.countdown-expired p {
    margin: 0;
    font-size: 16px;
}

/* Style Variations */
.course-countdown-container.minimal {
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 20px;
}

.course-countdown-container.minimal .time-unit {
    background: #34495e;
    box-shadow: 0 2px 10px rgba(52, 73, 94, 0.2);
}

.course-countdown-container.bold {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.course-countdown-container.bold .countdown-header .course-title {
    color: white;
}

.course-countdown-container.bold .countdown-label {
    color: rgba(255, 255, 255, 0.8);
}

.course-countdown-container.bold .time-unit {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.course-countdown-container.bold .course-select {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Size Variations */
.course-countdown-container.small {
    padding: 15px;
}

.course-countdown-container.small .countdown-header .course-title {
    font-size: 18px;
}

.course-countdown-container.small .time-unit {
    padding: 15px 10px;
    min-width: 60px;
}

.course-countdown-container.small .time-unit .number {
    font-size: 22px;
}

.course-countdown-container.small .time-unit .label {
    font-size: 10px;
}

.course-countdown-container.large {
    padding: 35px;
}

.course-countdown-container.large .countdown-header .course-title {
    font-size: 28px;
}

.course-countdown-container.large .time-unit {
    padding: 25px 20px;
    min-width: 100px;
}

.course-countdown-container.large .time-unit .number {
    font-size: 36px;
}

.course-countdown-container.large .time-unit .label {
    font-size: 12px;
}

/* Animation */
.time-unit .number {
    transition: transform 0.3s ease;
}

.time-unit:hover .number {
    transform: scale(1.05);
}

/* Pulse Animation for Urgency */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.countdown-timer.urgent .time-unit {
    animation: pulse 2s infinite;
}

.countdown-timer.urgent .time-unit:nth-child(1) {
    animation-delay: 0s;
}

.countdown-timer.urgent .time-unit:nth-child(2) {
    animation-delay: 0.5s;
}

.countdown-timer.urgent .time-unit:nth-child(3) {
    animation-delay: 1s;
}

.countdown-timer.urgent .time-unit:nth-child(4) {
    animation-delay: 1.5s;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .countdown-timer {
        gap: 15px;
    }
    
    .time-unit {
        min-width: 70px;
        padding: 15px 12px;
    }
    
    .time-unit .number {
        font-size: 24px;
    }
    
    .countdown-header .course-title {
        font-size: 20px;
    }
    
    .course-select {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .course-countdown-container {
        padding: 20px 15px;
    }
    
    .countdown-timer {
        gap: 10px;
    }
    
    .time-unit {
        min-width: 60px;
        padding: 12px 8px;
    }
    
    .time-unit .number {
        font-size: 20px;
    }
    
    .time-unit .label {
        font-size: 10px;
    }
    
    .countdown-header .course-title {
        font-size: 18px;
    }
    
    /* Stack time units in 2x2 grid on very small screens */
    .countdown-timer {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        max-width: 200px;
        margin: 0 auto;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .course-countdown-container {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .countdown-header .course-title {
        color: #e2e8f0;
    }
    
    .countdown-label {
        color: #a0aec0;
    }
    
    .course-select {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .countdown-expired {
        background: #fed7d7;
        color: #822727;
    }
}

/* Print Styles */
@media print {
    .course-countdown-container {
        box-shadow: none;
        border: 1px solid #000;
        break-inside: avoid;
    }
    
    .time-unit {
        background: #f0f0f0 !important;
        color: #000 !important;
        box-shadow: none;
    }
}

/* Accessibility */
.time-unit:focus-within {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .time-unit,
    .time-unit .number {
        transition: none;
    }
    
    .countdown-timer.urgent .time-unit {
        animation: none;
    }
}