/* Comic Calendar Container */
.cc-wrapper {
    max-width: 1000px;
    margin: 0 auto 2rem;
    text-align: center;
}

.cc-comic-display img {
    max-width: 100%;
    max-height: calc(90vh - 300px);
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .cc-comic-display img {
        max-height: calc(100vh - 180px);
    }
}

/* Controls */
.cc-controls-container {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

/* Navigation Buttons */
.cc-nav-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.cc-btn {
    padding: 8px 16px;
    background: #333;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.2s;
}

.cc-btn:hover {
    background: #555;
    color: #fff;
}

.cc-btn.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Calendar Grid */
.cc-calendar-grid table {
    width: 100%;
    border-collapse: collapse;
}

.cc-calendar-grid td {
    padding: 8px;
    border: 1px solid #eee;
}

.cc-calendar-grid td a {
    font-weight: bold;
    display: block;
}

.cc-calendar-grid td.cc-today {
    background: #333;
}
.cc-calendar-grid td.cc-today a {
    color: #fff;
}
.cc-calendar-grid .muted {
    color: #ccc;
}

/* --- Month Pager (New) --- */

/* Remove old dropdown form styles */
.cc-controls-container > form {
    display: none;
}

.cc-calendar-eyebrow {
    text-align: center;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    font-weight: 700;
    text-transform: uppercase;
    color: #666;
    margin: 0 0 6px;
}

/* Ensures the container is centered and clean */
.cc-controls-container {
    padding: 20px;
}

.cc-month-pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 300px;
    margin: 0 auto 20px; /* Separates it nicely from the buttons below */
    padding: 5px 0;
    border-bottom: 1px solid #ddd;
}

.cc-month-title {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    flex-grow: 1; /* Pushes the arrows to the sides */
    color: #333;
}

.cc-month-nav {
    display: inline;
    font-size: 1.5rem;
    padding: 5px 10px;
    line-height: 1;
    text-decoration: none;
    color: #333;
    transition: color 0.2s;
    font-family: Arial, sans-serif; /* Ensures the arrows look consistent */
}

.cc-month-nav:hover {
    color: #000;
}

.cc-month-nav.disabled {
    opacity: 0.3;
    pointer-events: none;
    cursor: default;
}

/* Cleanup - Hides the redundant header if it still exists */
.cc-calendar-grid .cc-cal-header {
    display: none;
}

/* --- Random Comic Widget Styles --- */
.cc-random-comic-widget {
    text-align: center;
    padding: 10px 0;
}

.cc-random-comic-widget img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.cc-random-comic-widget .cc-random-comic-title {
    font-size: 0.9em;
    font-weight: bold;
    text-align:center;
    margin-top:1em;
}


/* ============================================================
   Year View — compact iCal-style 12-month grid
   ============================================================ */

.cc-year-view .cc-year-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px 24px;
    margin-top: 1rem;
}

@media (max-width: 780px) {
    .cc-year-view .cc-year-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 520px) {
    .cc-year-view .cc-year-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px 16px;
    }
}

/* Individual month block */
.cc-mini-month {
    min-width: 0;
}

.cc-mini-month-name {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #c0392b;
    margin-bottom: 5px;
}

/* Mini calendar table */
.cc-mini-cal {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.cc-mini-cal th {
    font-size: 9px;
    font-weight: 600;
    color: #999;
    text-align: center;
    padding: 0 0 3px;
    text-transform: uppercase;
}

.cc-mini-cal td {
    text-align: center;
    padding: 1px 0;
    font-size: 11px;
    color: #bbb;
    line-height: 1.9;
}

/* Days with no comic — greyed, not linked */
.cc-mini-cal td span {
    color: #ccc;
    display: block;
}

/* Days with a comic — colored, linked */
.cc-mini-cal td.cc-has-comic {
    color: #222;
    font-weight: 600;
}

.cc-mini-cal td.cc-has-comic a {
    display: block;
    color: #222;
    text-decoration: none;
    border-radius: 3px;
    transition: background 0.12s, color 0.12s;
}

.cc-mini-cal td.cc-has-comic a:hover {
    background: #2d6a0a;
    color: #fff;
}

/* Currently displayed comic — highlighted */
.cc-mini-cal td.cc-current-day.cc-has-comic a {
    background: #2d6a0a;
    color: #fff;
    border-radius: 3px;
}

.cc-mini-cal td.cc-current-day span {
    color: #999;
}
