/**
 * BPG Cascade Timer - Clean CSS
 */

/* ========================================
   CASCADE & TIMELINE
   ======================================== */

.bpg-cascade {
    display: block;
}

.bpg-timeline {
    padding: 0;
    margin: 0;
}

.bpg-timeline-track {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding: 30px 0;
}

.bpg-timeline-track::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 0;
    right: 0;
    height: 3px;
    background: #e0e0e0;
    z-index: 0;
}

.bpg-timeline-phase {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex: 1;
    z-index: 1;
}

.bpg-timeline-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ccc;
    border: 3px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

/* Active state - use higher specificity without !important */
.bpg-cascade .bpg-timeline .bpg-timeline-phase.active .bpg-timeline-dot {
    background: #2ecc71;
    box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.2), 0 2px 8px rgba(0,0,0,0.2);
    transform: scale(1.2);
    animation: pulse 2s ease-in-out infinite;
}

.bpg-timeline-phase.past .bpg-timeline-dot {
    background: #95a5a6;
}

.bpg-timeline-label {
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    line-height: 1.4;
    transition: all 0.3s ease;
    white-space: nowrap;
}

/* Active label - use higher specificity without !important */
.bpg-cascade .bpg-timeline .bpg-timeline-phase.active .bpg-timeline-label {
    color: #2ecc71;
    font-weight: 700;
}

.bpg-timeline-phase.past .bpg-timeline-label {
    color: #95a5a6;
}

.bpg-timeline-date {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: #999;
    margin-top: 4px;
    white-space: nowrap;
}

@keyframes pulse {
    0%, 100% { transform: scale(1.2); }
    50% { transform: scale(1.3); }
}

/* Mobile Timeline */
@media (max-width: 768px) {
    .bpg-timeline[data-mobile="vertical"] .bpg-timeline-track {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .bpg-timeline[data-mobile="vertical"] .bpg-timeline-track::before {
        width: 3px;
        height: 100%;
        left: 10px;
        top: 0;
        right: auto;
    }
    
    .bpg-timeline[data-mobile="vertical"] .bpg-timeline-phase {
        flex-direction: row;
        width: 100%;
        text-align: left;
    }
    
    .bpg-timeline[data-mobile="horizontal"] {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .bpg-timeline[data-mobile="active_only"] .bpg-timeline-phase {
        display: none;
    }
    
    .bpg-timeline[data-mobile="active_only"] .bpg-timeline-phase.active {
        display: flex;
    }
}

/* ========================================
   CASCADE CONTAINER
   ======================================== */

.bpg-cascade-container {
    display: block;
}

.bpg-cascade-content {
    display: block;
}

.bpg-container-countdown-wrapper {
    display: block;
    margin-bottom: 30px;
}

/* Inline countdown alignment */
.bpg-container-countdown-wrapper {
    display: inline-block;
    width: 100%;
}

/* ========================================
   COUNTDOWN
   ======================================== */

.bpg-countdown {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

.bpg-countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.bpg-countdown-number {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    color: #333;
}

.bpg-countdown-label {
    font-size: 14px;
    font-weight: 500;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Countdown Layouts */
.bpg-countdown.layout-vertical {
    flex-direction: column;
}

.bpg-countdown.layout-boxes .bpg-countdown-unit,
.bpg-countdown.layout-circles .bpg-countdown-unit {
    padding: 20px;
    background: #f5f5f5;
    min-width: 100px;
}

.bpg-countdown.layout-boxes .bpg-countdown-unit {
    border-radius: 8px;
}

.bpg-countdown.layout-circles .bpg-countdown-unit {
    border-radius: 50%;
    width: 120px;
    height: 120px;
    justify-content: center;
}

.bpg-countdown.layout-compact {
    gap: 10px;
}

.bpg-countdown.layout-compact .bpg-countdown-number {
    font-size: 32px;
}

.bpg-countdown.layout-compact .bpg-countdown-label {
    font-size: 11px;
}

/* Mobile Countdown */
@media (max-width: 768px) {
    .bpg-countdown {
        gap: 15px;
    }
    
    .bpg-countdown-number {
        font-size: 36px;
    }
    
    .bpg-countdown.layout-circles .bpg-countdown-unit {
        width: 90px;
        height: 90px;
    }
}

/* ========================================
   COUNTDOWN PRESET STYLES
   ======================================== */

/* Minimal - Clean text only */
.bpg-countdown.style-minimal .bpg-countdown-unit {
    background: transparent;
    border: none;
    padding: 10px;
}

/* Bordered - Simple border boxes */
.bpg-countdown.style-bordered .bpg-countdown-unit {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    background: transparent;
    transition: all 0.3s ease;
}

.bpg-countdown.style-bordered .bpg-countdown-unit:hover {
    border-color: #999;
    transform: translateY(-2px);
}

/* Filled - Solid background */
.bpg-countdown.style-filled .bpg-countdown-unit {
    background: #f5f5f5;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
}

.bpg-countdown.style-filled .bpg-countdown-unit:hover {
    background: #e8e8e8;
    transform: translateY(-2px);
}

/* Gradient - Colorful gradient background */
.bpg-countdown.style-gradient .bpg-countdown-unit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.bpg-countdown.style-gradient .bpg-countdown-number {
    color: #fff;
}

.bpg-countdown.style-gradient .bpg-countdown-label {
    color: rgba(255, 255, 255, 0.9);
}

.bpg-countdown.style-gradient .bpg-countdown-unit:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* 3D - Three dimensional boxes */
.bpg-countdown.style-3d .bpg-countdown-unit {
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.1),
        0 2px 4px rgba(0, 0, 0, 0.06),
        inset 0 -2px 4px rgba(0, 0, 0, 0.05);
    transform-style: preserve-3d;
    transition: all 0.3s ease;
}

.bpg-countdown.style-3d .bpg-countdown-number {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.bpg-countdown.style-3d .bpg-countdown-unit:hover {
    transform: translateY(-3px) rotateX(5deg);
    box-shadow: 
        0 8px 15px rgba(0, 0, 0, 0.15),
        0 4px 6px rgba(0, 0, 0, 0.08),
        inset 0 -2px 4px rgba(0, 0, 0, 0.05);
}

/* Glow - Glowing effect */
.bpg-countdown.style-glow .bpg-countdown-unit {
    background: #fff;
    border: 2px solid var(--glow-color, #2ecc71);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 
        0 0 10px rgba(46, 204, 113, 0.3),
        0 0 20px rgba(46, 204, 113, 0.2),
        inset 0 0 10px rgba(46, 204, 113, 0.05);
    transition: all 0.3s ease;
}

.bpg-countdown.style-glow .bpg-countdown-number {
    color: var(--glow-color, #2ecc71);
    text-shadow: 0 0 10px rgba(46, 204, 113, 0.3);
}

.bpg-countdown.style-glow .bpg-countdown-unit:hover {
    box-shadow: 
        0 0 15px rgba(46, 204, 113, 0.5),
        0 0 30px rgba(46, 204, 113, 0.3),
        inset 0 0 15px rgba(46, 204, 113, 0.08);
}

/* Pulse - Pulsing 3D effect */
.bpg-countdown.style-pulse .bpg-countdown-unit {
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border: 3px solid var(--glow-color, #2ecc71);
    border-radius: 15px;
    padding: 28px;
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.12),
        0 4px 8px rgba(0, 0, 0, 0.08),
        inset 0 -3px 6px rgba(0, 0, 0, 0.05),
        0 0 20px rgba(46, 204, 113, 0.3);
    transform-style: preserve-3d;
    animation: pulse-3d 2s ease-in-out infinite;
}

.bpg-countdown.style-pulse .bpg-countdown-number {
    color: var(--glow-color, #2ecc71);
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.1),
        0 0 15px rgba(46, 204, 113, 0.4);
    font-weight: 800;
}

.bpg-countdown.style-pulse .bpg-countdown-label {
    color: #555;
    font-weight: 600;
}

@keyframes pulse-3d {
    0%, 100% {
        transform: translateY(0) scale(1);
        box-shadow: 
            0 8px 16px rgba(0, 0, 0, 0.12),
            0 4px 8px rgba(0, 0, 0, 0.08),
            inset 0 -3px 6px rgba(0, 0, 0, 0.05),
            0 0 20px rgba(46, 204, 113, 0.3);
    }
    50% {
        transform: translateY(-6px) scale(1.03);
        box-shadow: 
            0 12px 24px rgba(0, 0, 0, 0.15),
            0 6px 12px rgba(0, 0, 0, 0.1),
            inset 0 -4px 8px rgba(0, 0, 0, 0.06),
            0 0 35px rgba(46, 204, 113, 0.5);
    }
}

/* Preset style responsive adjustments */
@media (max-width: 768px) {
    .bpg-countdown.style-filled .bpg-countdown-unit,
    .bpg-countdown.style-gradient .bpg-countdown-unit,
    .bpg-countdown.style-3d .bpg-countdown-unit,
    .bpg-countdown.style-glow .bpg-countdown-unit,
    .bpg-countdown.style-pulse .bpg-countdown-unit {
        padding: 15px;
    }
}
