.gcl-calendar {
    --gcl-border: #e2e5e9;
    --gcl-muted: #6b7280;
    --gcl-surface: #ffffff;
    --gcl-today: #f3f7ff;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}

.gcl-calendar *,
.gcl-calendar *::before,
.gcl-calendar *::after { box-sizing: border-box; }

.gcl-title { margin: 0 0 14px; }

.gcl-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.gcl-month-label {
    min-width: 180px;
    font-weight: 700;
    font-size: 1.15rem;
    text-align: center;
}

.gcl-nav,
.gcl-today {
    appearance: none;
    border: 1px solid var(--gcl-border);
    background: var(--gcl-surface);
    color: inherit;
    border-radius: 7px;
    min-height: 36px;
    cursor: pointer;
    font: inherit;
}

.gcl-nav { width: 38px; font-size: 1.35rem; line-height: 1; }
.gcl-today { padding: 0 12px; margin-left: auto; }
.gcl-nav:hover, .gcl-today:hover { background: #f6f7f8; }

.gcl-filters {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 14px;
    padding: 10px 12px;
    border: 1px solid var(--gcl-border);
    border-radius: 8px;
    background: #fafafa;
    font-size: .86rem;
}

.gcl-filters:empty { display: none; }

.gcl-filter-label {
    flex: 0 0 auto;
    padding-top: 2px;
    font-weight: 600;
}

.gcl-filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 14px;
}

.gcl-filter-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    cursor: pointer;
    font-weight: 400;
    line-height: 1.25;
}

.gcl-filter-option input {
    margin: 0;
    width: 15px;
    height: 15px;
}

.gcl-filter-swatch {
    width: 11px;
    height: 11px;
    border-radius: 3px;
    display: inline-block;
    flex: 0 0 auto;
}

.gcl-filter-name { font-weight: 400; }

.gcl-status { margin: 8px 0; color: var(--gcl-muted); }
.gcl-status:empty { display: none; }
.gcl-status.gcl-error { color: #b42318; }

.gcl-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    border-top: 1px solid var(--gcl-border);
    border-left: 1px solid var(--gcl-border);
    background: var(--gcl-surface);
}

.gcl-weekday {
    padding: 8px 6px;
    text-align: center;
    font-size: .82rem;
    font-weight: 700;
    color: var(--gcl-muted);
    border-right: 1px solid var(--gcl-border);
    border-bottom: 1px solid var(--gcl-border);
}

.gcl-day {
    min-height: 116px;
    padding: 6px;
    overflow: hidden;
    border-right: 1px solid var(--gcl-border);
    border-bottom: 1px solid var(--gcl-border);
}

.gcl-day.gcl-outside { background: #fafafa; }
.gcl-day.gcl-is-today { background: var(--gcl-today); }

.gcl-day-number {
    font-size: .82rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.gcl-outside .gcl-day-number { color: #a0a5ad; }

.gcl-event {
    display: block;
    padding: 4px 6px;
    margin: 0 0 4px;
    border-radius: 5px;
    font-size: .72rem;
    font-weight: 400 !important;
    line-height: 1.2;
    text-decoration: none !important;
    overflow: hidden;
}

.gcl-event:hover { filter: brightness(.96); }
.gcl-event-time { font-weight: 700; margin-right: 5px; }
.gcl-event-title { overflow-wrap: anywhere; font-weight: 400 !important; }

@media (max-width: 760px) {
    .gcl-filters { flex-direction: column; gap: 7px; }
    .gcl-filter-label { padding-top: 0; }
    .gcl-toolbar { flex-wrap: wrap; }
    .gcl-month-label { min-width: 140px; flex: 1; }
    .gcl-today { margin-left: 0; }

    .gcl-grid { min-width: 700px; }
    .gcl-grid-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .gcl-day { min-height: 100px; }
}

/* Event details popup */
.gcl-event {
    width: 100%;
    border: 0;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.gcl-event:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

body.gcl-modal-open { overflow: hidden; }

.gcl-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .42);
}

.gcl-modal {
    position: relative;
    width: min(560px, 100%);
    max-height: min(80vh, 700px);
    overflow-y: auto;
    background: #fff;
    color: #202124;
    border-radius: 14px;
    box-shadow: 0 16px 50px rgba(0, 0, 0, .28);
    padding: 28px 30px 30px;
    font-family: inherit;
}

.gcl-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #5f6368;
    font: inherit;
    font-size: 29px;
    line-height: 36px;
    cursor: pointer;
}

.gcl-modal-close:hover,
.gcl-modal-close:focus-visible { background: #f1f3f4; }

.gcl-modal-title {
    margin: 0 42px 8px 0;
    color: #202124;
    font: inherit;
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.35;
}

.gcl-modal-range {
    margin: 0 0 20px;
    color: #5f6368;
    font-size: .96rem;
    line-height: 1.45;
}

.gcl-modal-description {
    padding-top: 18px;
    border-top: 1px solid #e8eaed;
    color: #3c4043;
    font-size: .96rem;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

@media (max-width: 600px) {
    .gcl-modal-overlay { align-items: flex-end; padding: 12px; }
    .gcl-modal { width: 100%; max-height: 86vh; border-radius: 14px; padding: 24px 22px 26px; }
    .gcl-modal-title { font-size: 1.2rem; }
}
