/**
 * Christmas Countdown Pro - Festive Styles
 * Version: 4.0.0 (Mobile First & Elf Workshop Theme)
 */

/* --- 1. Fonts & Global Styles --- */
@import url('https://fonts.googleapis.com/css2?family=Mountains+of+Christmas:wght@700&family=Poppins:wght@400;600&display=swap');

:root {
    --ccp-font-heading: 'Mountains of Christmas', cursive;
    --ccp-font-body: 'Poppins', sans-serif;
    --ccp-gold: #FFD700;
    --ccp-dark-wood: #3a2d1a;
    --ccp-light-wood: #5c482c;
    --ccp-parchment: #f5e8c9;
    --ccp-chalk: #fafafa;
    --ccp-chalkboard: #38423b;
}

/* Sitewide animated background */
.ccp-sitewide-background {
    background: linear-gradient(315deg, #2a6a3d, #8b0000, #2a6a3d, #8b0000);
    background-size: 400% 400%;
    animation: ccp-gradient-animation 25s ease infinite;
    color: white; /* Default text color for the site */
}

/* This helps the background show through theme wrappers */
.ccp-sitewide-background #page,
.ccp-sitewide-background .site-content,
.ccp-sitewide-background .entry-content {
    background-color: transparent !important;
}

@keyframes ccp-gradient-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#ccp-snowfall-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}


/* --- 2. Main Layout Containers --- */
.ccp-main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 1rem;
    max-width: 1200px;
    margin: 2rem auto;
    font-family: var(--ccp-font-body);
}

.ccp-countdown-wrap {
    background: rgba(10, 25, 15, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 20px;
    padding: 1.5rem;
    width: 100%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.ccp-extra-panels {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
}


/* --- 3. Core Countdown Timer --- */
.ccp-heading {
    font-family: var(--ccp-font-heading);
    font-size: 2rem;
    color: var(--ccp-gold);
    margin: 0 0 1.5rem 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.ccp-timer {
    display: flex;
    justify-content: space-around;
    margin-bottom: 1.5rem;
}

.ccp-timer-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ccp-timer-unit div {
    font-size: 2.5rem;
    font-weight: 600;
    color: #fff;
    line-height: 1;
}

.ccp-timer-unit label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}


/* --- 4. New "Elf Workshop" Panels --- */
.ccp-panel {
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.4), inset 0 0 15px rgba(0,0,0,0.3);
}

.ccp-panel-parchment {
    background: var(--ccp-parchment);
    color: var(--ccp-dark-wood);
    border: 8px solid var(--ccp-dark-wood);
}

.ccp-panel-chalkboard {
    background: var(--ccp-chalkboard);
    color: var(--ccp-chalk);
    border: 8px solid var(--ccp-light-wood);
}

.ccp-panel-heading {
    font-family: var(--ccp-font-heading);
    font-size: 1.8rem;
    margin: 0 0 1rem 0;
    text-align: center;
    border-bottom: 2px dashed rgba(0,0,0,0.2);
    padding-bottom: 0.5rem;
}

.ccp-panel-chalkboard .ccp-panel-heading {
    border-bottom-color: rgba(255,255,255,0.3);
}

.ccp-stats-list, .ccp-weekday-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 1rem;
}

.ccp-stats-list li, .ccp-weekday-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}
.ccp-panel-chalkboard li {
    border-bottom-color: rgba(255,255,255,0.15);
}

.ccp-stats-list li:last-child, .ccp-weekday-list li:last-child {
    border-bottom: none;
}

.ccp-stats-list span, .ccp-weekday-list span {
    font-weight: 600;
}


/* --- 5. Fact Button & Progress Bar --- */
.ccp-fact-button {
    background-color: var(--ccp-gold);
    color: var(--ccp-dark-wood);
    border: none;
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    font-family: var(--ccp-font-body);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}
.ccp-fact-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 215, 0, 0.4);
}

.ccp-fact-panel {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    color: #eee;
    text-align: left;
}
/* Definitive state management */
.ccp-fact-content, .ccp-fact-error {
    display: none;
}
.ccp-fact-panel {
    display: none;
}


.ccp-progress-bar {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 10px 0;
}
.ccp-progress-light {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #333;
    transition: all 0.5s ease;
}
.ccp-progress-light.lit {
    box-shadow: 0 0 15px 5px currentColor;
}
.ccp-progress-light.lit.red { color: #ff4d4d; background-color: #ff4d4d; }
.ccp-progress-light.lit.green { color: #4dff4d; background-color: #4dff4d; }
.ccp-progress-light.lit.gold { color: #ffd700; background-color: #ffd700; }
.ccp-progress-light.lit.blue { color: #4d4dff; background-color: #4d4dff; }


/* --- 6. Mobile First Responsive Layout --- */

/* Tablet view */
@media (min-width: 768px) {
    .ccp-heading {
        font-size: 2.5rem;
    }
    .ccp-timer-unit div {
        font-size: 3.5rem;
    }
    .ccp-timer-unit label {
        font-size: 0.8rem;
    }
    .ccp-extra-panels {
        flex-direction: row;
        align-items: flex-start;
        justify-content: center;
    }
    .ccp-panel {
        width: 50%;
    }
}

/* Desktop view */
@media (min-width: 1024px) {
    .ccp-main-container {
        flex-direction: row;
        align-items: flex-start;
    }
    .ccp-countdown-wrap {
        width: 45%;
        max-width: none;
    }
    .ccp-extra-panels {
        width: 55%;
        flex-direction: column;
    }
    .ccp-panel {
        width: 100%;
    }
}

