.comps-header-with-action {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(0, 560px) minmax(120px, 1fr);
    align-items: end;
    gap: 20px;
}

.comps-header-copy {
    grid-column: 2;
    text-align: center;
}

.public-calendar-trigger {
    grid-column: 3;
    display: inline-flex;
    align-items: center;
    justify-self: end;
    gap: 9px;
    min-height: 42px;
    padding: 8px 14px 8px 9px;
    border: 1px solid #bae6fd;
    border-radius: 11px;
    background: #ffffff;
    color: #087ec1;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
    box-shadow: 0 7px 18px rgba(15, 23, 42, .07);
    transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.public-calendar-trigger-icon {
    display: inline-grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    border-radius: 8px;
    background: #eaf8ff;
}

.public-calendar-trigger svg,
.public-calendar-heading-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

.public-calendar-trigger:hover,
.public-calendar-trigger:focus {
    border-color: #7dd3fc;
    background: #f0faff;
    color: #036da9;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(8, 126, 193, .13);
}

.public-calendar-trigger:focus-visible {
    outline: 3px solid rgba(0, 174, 239, .22);
    outline-offset: 2px;
}

#publicCalendarModal .public-calendar-dialog {
    width: calc(100% - 2rem);
    max-width: 1120px;
    margin: 1rem auto;
}

#publicCalendarModal .modal-content {
    overflow: hidden;
    border: 0;
    border-radius: 22px;
    box-shadow: 0 30px 85px rgba(15, 23, 42, .3);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

#publicCalendarModal .public-calendar-header {
    padding: 18px 22px;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
}

#publicCalendarModal .public-calendar-heading {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
}

#publicCalendarModal .public-calendar-heading-icon {
    display: inline-grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border-radius: 13px;
    background: linear-gradient(145deg, #00aeef, #007eb6);
    color: #ffffff;
    box-shadow: 0 7px 18px rgba(0, 141, 204, .24);
}

#publicCalendarModal .modal-title {
    margin: 0;
    color: #0f172a;
    font-size: 1.18rem;
    font-weight: 800;
}

#publicCalendarModal .public-calendar-subtitle {
    margin: 3px 0 0;
    color: #64748b;
    font-size: .84rem;
    line-height: 1.35;
}

#publicCalendarModal .public-calendar-close {
    flex: 0 0 auto;
    margin: 0;
    border-radius: 10px;
    opacity: .68;
    transition: background-color 180ms ease, opacity 180ms ease, transform 180ms ease;
}

#publicCalendarModal .public-calendar-close:hover,
#publicCalendarModal .public-calendar-close:focus {
    background-color: #e8f1f8;
    opacity: 1;
    transform: scale(1.05);
}

#publicCalendarModal .modal-body {
    padding: 20px 22px 24px;
    overflow-x: hidden;
    background: #ffffff;
}

#publicCalendarModal .public-calendar-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid #dbe7f0;
    border-radius: 14px;
    background: linear-gradient(135deg, #f8fbfe 0%, #f2f8fc 100%);
}

#publicCalendarModal .public-calendar-period-label {
    display: block;
    margin-bottom: 3px;
    color: #64748b;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .1em;
    line-height: 1.2;
    text-transform: uppercase;
}

#publicCalendarModal .public-calendar-period-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

#publicCalendarModal .public-calendar-month-label {
    margin: 0;
    color: #0f172a;
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.15;
}

#publicCalendarModal .public-calendar-event-count {
    display: inline-flex;
    min-height: 25px;
    align-items: center;
    padding: 4px 9px;
    border: 1px solid #bae6fd;
    border-radius: 999px;
    background: #eaf8ff;
    color: #036d9f;
    font-size: .72rem;
    font-weight: 800;
    white-space: nowrap;
}

#publicCalendarModal .public-calendar-event-count[hidden],
#publicCalendarModal .public-calendar-empty[hidden] {
    display: none;
}

#publicCalendarModal .public-calendar-navigation {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border: 1px solid #dbe7f0;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .06);
}

#publicCalendarModal .public-calendar-nav-button,
#publicCalendarModal .public-calendar-today-button {
    display: inline-flex;
    height: 38px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #334155;
    font-weight: 800;
    transition: background-color 170ms ease, color 170ms ease, transform 170ms ease;
}

#publicCalendarModal .public-calendar-nav-button {
    width: 38px;
    padding: 0;
    font-size: 1.6rem;
    line-height: 1;
}

#publicCalendarModal .public-calendar-today-button {
    padding: 0 14px;
}

#publicCalendarModal .public-calendar-nav-button:hover,
#publicCalendarModal .public-calendar-nav-button:focus,
#publicCalendarModal .public-calendar-today-button:hover,
#publicCalendarModal .public-calendar-today-button:focus {
    background: #eaf8ff;
    color: #007eb6;
    transform: translateY(-1px);
}

#publicCalendarModal .public-calendar-empty {
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid #dbe7f0;
    border-radius: 10px;
    background: #f8fafc;
    color: #64748b;
    font-size: .86rem;
}

#publicCalendar {
    width: 100%;
    min-width: 0;
    color: #334155;
}

#publicCalendar .fc-scrollgrid {
    overflow: hidden;
    border: 1px solid #d7e3ed;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .055);
}

#publicCalendar .fc-col-header-cell {
    border-color: #dfe8f0;
    background: #f3f7fb;
}

#publicCalendar .fc-col-header-cell-cushion {
    padding: 11px 6px;
    color: #526276;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-decoration: none;
    text-transform: uppercase;
}

#publicCalendar .fc-daygrid-day-number {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    margin: 5px;
    border-radius: 9px;
    color: #334155;
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
}

#publicCalendar .fc-day-today {
    background: #f0faff;
}

#publicCalendar .fc-day-today .fc-daygrid-day-number {
    background: #008dcc;
    color: #ffffff;
    box-shadow: 0 5px 12px rgba(0, 141, 204, .24);
}

#publicCalendar .fc-day-other .fc-daygrid-day-number {
    color: #a8b3c1;
}

#publicCalendar .fc-daygrid-day-frame {
    min-height: 82px;
    transition: background-color 160ms ease;
}

#publicCalendar .fc-daygrid-day-frame:hover {
    background: rgba(0, 174, 239, .045);
}

#publicCalendar .fc-event {
    margin: 2px 5px;
    padding: 4px 6px;
    overflow: hidden;
    border: 1px solid #bae6fd;
    border-left: 3px solid #008dcc;
    border-radius: 7px;
    background: #eaf8ff;
    color: #075985;
    text-decoration: none;
    box-shadow: none;
    transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

#publicCalendar .fc-event-main,
#publicCalendar .fc-event-title-container,
#publicCalendar .fc-event-title {
    min-width: 0;
    overflow: hidden;
    color: inherit;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#publicCalendar .fc-event-title {
    font-size: .74rem;
    font-weight: 800;
}

#publicCalendar .fc-event-title::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin: 0 6px 1px 0;
    border-radius: 50%;
    background: #00aeef;
}

#publicCalendar .fc-event:hover {
    border-color: #006f9f;
    background: #006f9f;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 5px 12px rgba(0, 111, 159, .24);
}

#publicCalendar .fc-more-link {
    display: inline-flex;
    margin: 3px 5px;
    padding: 3px 7px;
    border-radius: 999px;
    background: #eef2f7;
    color: #475569;
    font-size: .7rem;
    font-weight: 800;
    text-decoration: none;
}

#publicCalendarModal .public-calendar-footer {
    justify-content: space-between;
    gap: 16px;
    padding: 14px 22px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

#publicCalendarModal .public-calendar-hint {
    color: #64748b;
    font-size: .82rem;
}

#publicCalendarModal .public-calendar-done {
    min-width: 96px;
    padding: 9px 18px;
    border: 1px solid #008dcc;
    border-radius: 9px;
    background: #008dcc;
    color: #ffffff;
    font-weight: 750;
}

#publicCalendarModal .public-calendar-done:hover,
#publicCalendarModal .public-calendar-done:focus {
    border-color: #006f9f;
    background: #006f9f;
}

body.public-calendar-open .modal-backdrop.show {
    background: #0f172a;
    opacity: .55;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

@media (max-width: 760px) {
    .comps-header-with-action {
        grid-template-columns: 1fr;
    }

    .comps-header-copy,
    .public-calendar-trigger {
        grid-column: 1;
    }

    .public-calendar-trigger {
        justify-self: center;
        margin-top: 14px;
    }
}

@media (max-width: 640px) {
    #publicCalendarModal .public-calendar-dialog {
        width: calc(100% - 1rem);
        margin: .5rem auto;
    }

    #publicCalendarModal .public-calendar-header,
    #publicCalendarModal .modal-body {
        padding: 14px;
    }

    #publicCalendarModal .public-calendar-subtitle,
    #publicCalendarModal .public-calendar-hint {
        display: none;
    }

    #publicCalendarModal .public-calendar-toolbar {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }

    #publicCalendarModal .public-calendar-navigation {
        align-self: stretch;
        justify-content: space-between;
    }

    #publicCalendarModal .public-calendar-today-button {
        flex: 1 1 auto;
    }

    #publicCalendarModal .public-calendar-footer {
        justify-content: flex-end;
        padding: 12px 14px;
    }

    #publicCalendar .fc-col-header-cell-cushion {
        padding: 9px 2px;
        font-size: .62rem;
        letter-spacing: .02em;
    }

    #publicCalendar .fc-daygrid-day-frame {
        min-height: 70px;
    }

    #publicCalendar .fc-event {
        margin-right: 2px;
        margin-left: 2px;
        padding: 3px 4px;
        border-left-width: 2px;
    }

    #publicCalendar .fc-event-title {
        font-size: .67rem;
    }

    #publicCalendar .fc-event-title::before {
        display: none;
    }
}
