.cw-overview-v2 {
    --cw-overview-cols: 3;
    --cw-overview-rows: 3;
    --cw-overview-font: inherit;
    --cw-overview-sticky-top: 0px;
    font-family: var(--cw-overview-font);
}

.cw-overview-v2__grid {
    display: grid;
    grid-template-columns: repeat(var(--cw-overview-cols), minmax(0, 1fr));
    grid-template-rows: repeat(var(--cw-overview-rows), minmax(var(--cw-overview-row-min-height), auto));
    column-gap: var(--cw-overview-gap-col);
    row-gap: var(--cw-overview-gap-row);
    align-items: stretch;
}

.cw-overview-v2--vertical .cw-overview-v2__grid {
    grid-template-columns: minmax(140px, 220px) repeat(var(--cw-overview-cols), minmax(0, 1fr));
}

.cw-overview-v2__grid > .cw-overview-v2__cell {
    align-self: stretch;
}

.cw-overview-v2__cell {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: var(--cw-overview-item-inset-y) var(--cw-overview-item-inset-x);
    border-radius: var(--cw-overview-radius);
    border: var(--cw-overview-item-border-width, 0) solid var(--cw-overview-item-border, transparent);
    box-sizing: border-box;
    min-width: 0;
    min-height: 0;
}

.cw-overview-v2__cell--header {
    border: var(--cw-overview-header-border-width, 0) solid var(--cw-overview-header-border, transparent);
}

.cw-overview-v2--day-radius .cw-overview-v2__cell {
    border-radius: 0;
}

.cw-overview-v2--day-radius .cw-overview-v2__cell--day-top {
    border-radius: var(--cw-overview-day-radius) var(--cw-overview-day-radius) 0 0;
}

.cw-overview-v2--day-radius .cw-overview-v2__cell--day-bottom {
    border-radius: 0 0 var(--cw-overview-day-radius) var(--cw-overview-day-radius);
}

.cw-overview-v2--day-radius .cw-overview-v2__cell--day-top.cw-overview-v2__cell--day-bottom {
    border-radius: var(--cw-overview-day-radius);
}

.cw-overview-v2--day-radius .cw-overview-v2__day {
    border-radius: var(--cw-overview-day-radius);
    overflow: hidden;
}

.cw-overview-v2--day-radius .cw-overview-v2__day .cw-overview-v2__cell {
    border-radius: 0;
}

.cw-overview-v2--align-left .cw-overview-v2__cell {
    text-align: left;
    align-items: flex-start;
}

.cw-overview-v2--valign-top .cw-overview-v2__cell,
.cw-overview-v2--valign-top .cw-overview-v2__cell--stacked {
    justify-content: flex-start;
}

.cw-overview-v2--valign-bottom .cw-overview-v2__cell,
.cw-overview-v2--valign-bottom .cw-overview-v2__cell--stacked {
    justify-content: flex-end;
}

.cw-overview-v2__column-subtitle {
    margin: 0 0 0.5rem;
    font-size: var(--cw-overview-heading-sub-size);
    font-weight: var(--cw-overview-heading-sub-weight);
    line-height: 1.3;
    opacity: 0.95;
}

.cw-overview-v2__column-label {
    margin: 0;
    font-size: var(--cw-overview-heading-size);
    font-weight: var(--cw-overview-heading-weight);
    line-height: 1.25;
}

.cw-overview-v2__time {
    margin: 0 0 0.5rem;
    font-size: var(--cw-overview-item-time-size);
    font-weight: var(--cw-overview-item-time-weight);
    line-height: 1.3;
    opacity: 0.95;
}

.cw-overview-v2__title {
    margin: 0;
    font-size: var(--cw-overview-item-title-size);
    font-weight: var(--cw-overview-item-title-weight);
    line-height: 1.3;
    width: 100%;
    max-width: 100%;
    overflow-wrap: anywhere;
}

/* Rich text inside body cells — inherit the inline cell text colour. */
.cw-overview-v2__cell .cw-overview-v2__body * {
    color: inherit !important;
}

.cw-overview-v2__cell:not(.cw-overview-v2__cell--header) {
    overflow-x: hidden;
}

.cw-overview-v2__column-subtitle,
.cw-overview-v2__column-label,
.cw-overview-v2__time {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cw-overview-v2__body {
    margin-top: 0.5rem;
    font-size: var(--cw-overview-item-body-size);
    font-weight: var(--cw-overview-item-body-weight);
    line-height: 1.4;
    width: 100%;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.cw-overview-v2__body p:last-child {
    margin-bottom: 0;
}

.cw-overview-v2__cell a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

.cw-overview-v2__cell a:hover,
.cw-overview-v2__cell a:focus {
    color: inherit;
    opacity: 0.85;
}

.cw-overview-v2-single {
    padding: 2rem 1rem;
}

.cw-overview-v2-single__title {
    margin: 0 0 1.5rem;
    text-align: center;
}

.cw-overview-v2__mobile {
    display: none;
}

.cw-overview-v2__day {
    display: flex;
    flex-direction: column;
    gap: var(--cw-overview-gap-row);
}

.cw-overview-v2__day-cells {
    display: flex;
    flex-direction: column;
    gap: var(--cw-overview-gap-row);
}

.cw-overview-v2__cell--stacked,
.cw-overview-v2__row-spacer {
    --cw-cell-unit-height: var(--cw-overview-mobile-row-min-height);
    height: calc(var(--cw-cell-unit-height) * var(--cw-cell-row-span, 1));
    flex-shrink: 0;
    box-sizing: border-box;
}

.cw-overview-v2__cell--stacked {
    width: 100%;
    overflow: hidden;
    min-height: 0;
}

.cw-overview-v2__row-spacer {
    pointer-events: none;
}

@media (max-width: 768px) {
    .cw-overview-v2__desktop {
        display: none;
    }

    .cw-overview-v2__mobile {
        display: flex;
        flex-direction: column;
        gap: var(--cw-overview-gap-col);
    }

    .cw-overview-v2__day-head {
        position: sticky;
        top: var(--cw-overview-sticky-top);
        z-index: 5;
        margin-bottom: 0;
        border-bottom: 1px solid rgba(19, 41, 65, 0.08);
        box-shadow: 0 2px 8px rgba(19, 41, 65, 0.06);
    }

    .cw-overview-v2__cell--stacked {
        padding: var(--cw-overview-item-inset-y) var(--cw-overview-item-inset-x);
    }
}

@media (min-width: 769px) {
    .cw-overview-v2__mobile {
        display: none;
    }
}
