.calendarMonth {
    margin-top: 10px;
    margin-bottom: 80px;
}

/* =========================
   Container
   ========================= */

.calendarMonth__monthTableContainer {
    padding: 0 50px;
    max-width: 1278px;
    margin: 0 auto;
}

.calendarMonth__monthName,
.calendarMonth__monthAndYearName {
    display: none;
}

/* =========================
   Table layout
   ========================= */

.calendarMonth__monthTable {
    display: table;
    table-layout: fixed;
    width: 100%;
    border-spacing: 0 0.25rem;
    margin-top: -0.25rem;
}

.calendarMonth__tableRow {
    display: table-row;
}

.calendarMonth__tableRow--header {
    position: relative;
    top: 0.25rem;
}

.calendarMonth__dayName {
    display: table-cell;
    width: 14.2857%;
    text-align: center;
    color: #22222399 !important;
    height: 1.0625rem;
}

.calendarMonth__dayName:last-child {
    border-right-width: 1px;
}

/* First row holiday fixes */
.calendarMonth__tableRow:first-child
.calendarMonth__tableCell.holiday::before {
    top: 0;
}

.calendarMonth__tableRow:first-child
.calendarMonth__tableCell.holiday:not(:last-child)::after {
    top: 0;
}

/* =========================
   Table cell
   ========================= */

.calendarMonth__tableCell {
    display: table-cell;
    position: relative;
    background: rgba(var(--cBg-rgb), 0.45);
    border: solid var(--cBlack);
    border-width: 0 0 1px 1px;
    padding: 0.5rem;
    width: 14.2857%;
}

/* Hover positioning */
.calendarMonth__tableCell:first-child .calendarMonthEvent__hover {
    left: 0;
    transform: none;
}

.calendarMonth__tableCell:last-child {
    border-right-width: 1px;
}

.calendarMonth__tableCell:last-child .calendarMonthEvent__hover {
    left: auto;
    right: 0;
    transform: none;
}

/* =========================
   Holiday
   ========================= */

.calendarMonth__tableCell.holiday {
    background: var(--cWhite);
    border-color: var(--cTheme);
}

.calendarMonth__tableCell.holiday:not(.otherMonth),
.calendarMonth__tableCell.holiday:not(.otherMonth) .calendarMonth__dayNumber,
.calendarMonth__tableCell.weekend:not(.otherMonth),
.calendarMonth__tableCell.weekend:not(.otherMonth) .calendarMonth__dayNumber,
.calendarMonth__tableCell.working-day.weekend:not(.otherMonth) {
    color: #FF383C;
}

.calendarMonth__tableCell.working-day.weekend:not(.otherMonth) .calendarMonth__dayNumber {
    color: #005EB8;
}

/* =========================
   Other month
   ========================= */

.calendarMonth__tableCell.otherMonth {
    opacity: 0;
    pointer-events: none;
}

/* =========================
   Today
   ========================= */

.calendarMonth__tableCell.today:not(.otherMonth)::before {
    content: "";
    display: block;
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
}

.calendarMonth__tableCell.today:not(.otherMonth):not(:last-child)::after {
    content: "";
    display: block;
    position: absolute;
    z-index: 2;
    top: -1px;
    bottom: -1px;
    right: -1px;
}

/* =========================
   Cell hover (only cells with events)
   ========================= */

.calendarContainer .calendarMonth__tableCell:has(.calendarMonthEvent) {
    cursor: pointer;
}

.calendarContainer .calendarMonth__tableCell.is-hovered::before,
.calendarContainer .calendarMonth__tableCell.today:not(.otherMonth).is-hovered::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #FFB60F;
    z-index: 0;
}

/* =========================
   Single event dot
   ========================= */

.calendarMonth__dayEventList {
    text-align: center;
}

.calendarMonthEvent {
    display: inline-block;
    width: 0.25rem;
    height: 0.25rem;
    border-radius: 50%;
    background: #005EB8;
    margin-top: 0.1875rem;
}

.calendarMonth__tableCell.weekend .calendarMonthEvent,
.calendarMonth__tableCell.holiday .calendarMonthEvent {
    background: #FF383C;
}

.calendarMonth__tableCell.working-day.weekend .calendarMonthEvent {
    background: #005EB8;
}

/* =========================
   All-events popup (drops below the calendar)
   ========================= */

.calendarMonth__allEventsOverlay {
    display: none;
    position: fixed;
    inset: 0;
    background: #00000040;
    z-index: 149;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.calendarMonth__allEventsOverlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.calendarMonth__allEventsClose {
    display: none;
}

.calendarMonth__allEventsPopup {
    display: flex;
    flex-direction: column;
    position: absolute;
    z-index: 150;
    left: 0;
    right: 0;
    padding: 0.75rem;
    background: #fff;
    border: 1px solid #B1B3B333;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.5rem 0.125rem #22222314;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    overflow: hidden;
}

.calendarMonth__allEventsPopup.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.calendarMonth__allEventsDate {
    color: #002D74;
    padding: 0 0 0.75rem 0;
    border-bottom: 1px solid #B1B3B333;
}

.calendarMonth__allEventsItem {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.calendarMonth__allEventsItem:last-of-type {
    border-bottom: none;
}

.calendarMonth__allEventsItemTitle {
    color: #222223;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.calendarMonth__allEventsItemMeta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.calendarMonth__allEventsItemTime,
.calendarMonth__allEventsItemLoc {
    color: #22222399;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    overflow: hidden;
    white-space: nowrap;
}

.calendarMonth__allEventsItemTime i,
.calendarMonth__allEventsItemLoc i {
    font-size: 1rem;
    flex-shrink: 0;
}

.calendarMonth__allEventsItemText {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendarMonth__allEventsItemLink {
    color: #005EB8;
    align-self: flex-start;
}

.calendarMonth__allEventsItemLink:hover {
    text-decoration: underline;
}

.calendarMonth__allEventsMore {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 400;
    font-size: 0.875rem;
    color: #22222399;
    padding: 0.75rem 0;
    line-height: 100%;
}

.calendarMonth__allEventsBtn {
    border-radius: 0.5rem;
    padding: 0.65625rem 1rem;
    background: #005EB8;
    color: #fff;
    cursor: pointer;
    text-align: center;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendarMonth__allEventsBtn:hover {
    background: #002D74;
    color: #fff;
}

.calendarMonth__dayPageLink {
    display: none;
}

/* =========================
   Day number
   ========================= */


/* =========================================================
   TABLET (lg and down) — modal popover
   ========================================================= */

@media (max-width: 991.98px) {

    .calendarMonth__allEventsOverlay {
        display: block;
    }

    .calendarMonth__allEventsPopup {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: calc(100% - 2rem);
        max-width: 31.25rem;
        max-height: 80vh;
        overflow-y: auto;
        z-index: 1038;
    }

    .calendarMonth__allEventsDate {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-bottom: 0.75rem;
    }

    .calendarMonth__allEventsClose {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        cursor: pointer;
        color: #222223;
        font-size: 1.5rem;
        padding: 0;
        line-height: 1;
    }

    .calendarMonth__allEventsBtn {
        max-width: 19.125rem;
        align-self: center;
        width: 100%;
    }
}

/* =========================================================
   MOBILE (md and down)
   ========================================================= */

@media (max-width: 600px) {
    .calendarContainer {
        width: 100%;
        margin-top: 0;
    }

    .calendarMonth__allEventsPopup {
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        transform: none;
        width: 100%;
        max-width: 100%;
        overflow-y: auto;
        border-radius: unset;
        padding: 1rem 1rem 1.5rem 1rem;
    }

    .calendarMonth__allEventsBtn {
        max-width: unset;
    }

}