.ccgce-wrap {
    --ccgce-primary: #0F4C75;
    --ccgce-accent: #E8F2F8;
    font-family: inherit;
    color: #222;
}

/* VIEW SELECTOR */

.ccgce-view-selector {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: auto;
    max-width: 100%;
    margin: 0 0 18px;
}

.ccgce-view-selector label {
    font-size: 14px;
    font-weight: 800;
    color: #222;
    white-space: nowrap;
}

.ccgce-view-selector select {
    width: auto;
    min-width: 170px;
    max-width: 230px;
    padding: 9px 36px 9px 14px;
    border: 1px solid #d8d8d8;
    border-radius: 999px;
    background-color: #fff;
    color: #222;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

/* MONTHLY */

.ccgce-month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    border: 1px solid #e1e6ea;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
}

.ccgce-weekday {
    padding: 11px;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    background: var(--ccgce-primary);
    color: #fff;
}

.ccgce-day {
    min-height: 115px;
    padding: 9px;
    border-top: 1px solid #e1e6ea;
    border-right: 1px solid #e1e6ea;
    background: #fff;
}

.ccgce-day:nth-child(7n) {
    border-right: 0;
}

.ccgce-day-number {
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 7px;
}

.ccgce-muted {
    background: #fafafa;
    color: #aaa;
}

/* WEEKLY / 3 DAYS */

.ccgce-days-grid {
    display: grid;
    gap: 12px;
    align-items: start;
}

.ccgce-days-7 {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.ccgce-days-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ccgce-column {
    min-height: 0;
    border: 1px solid #e1e6ea;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,.04);
}

.ccgce-view-weekly .ccgce-column {
    min-height: 190px;
}

.ccgce-view-3days .ccgce-column {
    min-height: 220px;
}

.ccgce-column-date {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 13px;
    background: var(--ccgce-primary);
    color: #fff;
    font-size: 14px;
    line-height: 1;
}

.ccgce-column-date strong {
    font-weight: 800;
}

.ccgce-column-date span {
    opacity: .9;
}

/* EVENTS */

.ccgce-event {
    margin: 8px 10px;
    padding: 9px 10px;
    border-radius: 11px;
    background: var(--ccgce-accent);
    border-left: 3px solid var(--ccgce-primary);
}

.ccgce-event-compact {
    margin: 6px 0;
    padding: 7px;
    border-radius: 9px;
}

.ccgce-event-summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    cursor: pointer;
    list-style: none;
}

.ccgce-event-summary::-webkit-details-marker {
    display: none;
}

.ccgce-event-main {
    min-width: 0;
}

.ccgce-event-time {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: var(--ccgce-primary);
    margin-bottom: 4px;
    line-height: 1.25;
}

.ccgce-event-title {
    display: block;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
}

.ccgce-event-plus {
    flex: 0 0 21px;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background: var(--ccgce-primary);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    line-height: 21px;
    text-align: center;
    transition: transform .18s ease;
}

.ccgce-event[open] .ccgce-event-plus {
    transform: rotate(45deg);
}

.ccgce-event-more {
    margin-top: 8px;
}

.ccgce-event-location,
.ccgce-event-description {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.4;
}

.ccgce-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 9px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--ccgce-primary);
    color: #fff !important;
    font-size: 10px;
    font-weight: 800;
    text-decoration: none !important;
}

.ccgce-no-day-events,
.ccgce-empty,
.ccgce-error {
    padding: 13px;
    color: #777;
    font-size: 13px;
}

.ccgce-error {
    border: 1px solid #f0c4c4;
    background: #fff5f5;
    color: #9b1c1c;
    border-radius: 12px;
}

/* MOBILE */

@media (max-width: 900px) {

    .ccgce-view-selector {
        display: flex;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 14px;
    }

    .ccgce-view-selector label {
        width: 100%;
        font-size: 13px;
    }

    .ccgce-view-selector select {
        width: auto;
        min-width: 180px;
        max-width: 100%;
        font-size: 13px;
    }

    /* Weekly mobile = horizontal scroll */
    .ccgce-view-weekly .ccgce-days-grid {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        padding-bottom: 10px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .ccgce-view-weekly .ccgce-column {
        flex: 0 0 78%;
        max-width: 320px;
        min-height: 190px;
        scroll-snap-align: start;
        border-radius: 14px;
    }

    /* 3 days mobile = keep all 3 in same row */
    .ccgce-view-3days .ccgce-days-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        overflow: visible;
        padding-bottom: 0;
        scroll-snap-type: none;
    }

    .ccgce-view-3days .ccgce-column {
        flex: none;
        max-width: none;
        min-height: 160px;
        scroll-snap-align: none;
        border-radius: 12px;
    }

    .ccgce-view-3days .ccgce-column-date {
        padding: 8px 7px;
        font-size: 11px;
    }

    .ccgce-view-3days .ccgce-event {
        margin: 6px;
        padding: 7px;
    }

    .ccgce-view-3days .ccgce-event-time {
        font-size: 10px;
    }

    .ccgce-view-3days .ccgce-event-title {
        font-size: 10px;
    }

    .ccgce-view-3days .ccgce-event-plus {
        flex: 0 0 18px;
        width: 18px;
        height: 18px;
        font-size: 13px;
        line-height: 18px;
    }

    .ccgce-column-date {
        padding: 10px 12px;
        font-size: 13px;
    }

    .ccgce-event {
        margin: 8px;
        padding: 9px;
    }

    .ccgce-event-title {
        font-size: 12px;
    }

    .ccgce-event-time {
        font-size: 11px;
    }

    .ccgce-event-location,
    .ccgce-event-description {
        font-size: 12px;
    }

    .ccgce-button {
        padding: 6px 10px;
        font-size: 10px;
    }

    .ccgce-no-day-events {
        padding: 11px;
        font-size: 12px;
    }

    /* Monthly mobile */
    .ccgce-month-grid {
        display: block;
        border: 0;
        border-radius: 0;
    }

    .ccgce-weekday {
        display: none;
    }

    .ccgce-day {
        min-height: auto;
        margin-bottom: 10px;
        border: 1px solid #e1e6ea;
        border-radius: 14px;
    }

    .ccgce-muted {
        display: none;
    }
}