.calendar-card {
    overflow-x: auto;
}

.calendar-top {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    margin-bottom: 18px;
}

.calendar-title-block {
    text-align: center;
}

.calendar-title-block h1 {
    margin: 0;
    font-size: 30px;
}

.calendar-today-link {
    display: inline-block;
    margin-top: 6px;
    color: #7413dc;
    font-weight: 800;
    font-size: 14px;
    text-decoration: none;
}

.calendar-today-link:hover {
    text-decoration: underline;
}

.calendar-nav-link {
    color: #7413dc;
    font-weight: 800;
    text-decoration: none;
    font-size: 18px;
}

.calendar-nav-link:first-child {
    justify-self: start;
}

.calendar-nav-link:last-child {
    justify-self: end;
}

.calendar-nav-link:hover {
    text-decoration: underline;
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    background: #ffffff;
}

.calendar-table th {
    background: #7413dc;
    color: #ffffff;
    padding: 12px;
    text-align: center;
    font-size: 17px;
}

.calendar-table td {
    width: 14.28%;
    height: 135px;
    vertical-align: top;
    border: 1px solid #ddd;
    padding: 8px;
    background: #ffffff;
    position: relative;
}

.calendar-table td:hover {
    background: #fbf8ff;
}

.calendar-table .other-month {
    background: #f2f2f2;
    color: #999;
}

.calendar-table .today {
    outline: 3px solid #7413dc;
    outline-offset: -3px;
    background: #fbf8ff;
}

.day-number {
    font-weight: 800;
    font-size: 16px;
    margin-bottom: 6px;
    color: #222;
}

.today .day-number {
    color: #7413dc;
}

.booking-block {
    display: block;
    color: #ffffff;
    text-decoration: none;
    padding: 7px 8px;
    border-radius: 7px;
    margin-bottom: 6px;
    font-size: 13px;
    line-height: 1.2;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.booking-block strong {
    display: block;
    font-weight: 800;
}

.booking-block span {
    font-weight: 700;
}

.booking-block small {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    font-weight: 600;
}

.booking-block:hover {
    filter: brightness(0.95);
}

/* Booking colours */

.booking-cubs {
    background: #00a651;
    color: #ffffff;
}

.booking-beavers {
    background: #0072ce;
    color: #ffffff;
}

.booking-scouts {
    background: #7413dc;
    color: #ffffff;
}

.booking-squirrels {
    background: #e53935;
    color: #ffffff;
}

.booking-explorers {
    background: #d9c3a5;
    color: #222222;
}

.booking-group {
    background: #c9cdd3;
    color: #222222;
}

.booking-external {
    background: #f4c542;
    color: #222222;
}

.booking-maintenance {
    background: #6b7280;
    color: #ffffff;
}

@media screen and (max-width: 800px) {
    .calendar-top {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 10px;
    }

    .calendar-nav-link:first-child,
    .calendar-nav-link:last-child {
        justify-self: center;
    }

    .calendar-title-block {
        order: -1;
    }

    .calendar-title-block h1 {
        font-size: 24px;
    }

    .calendar-table {
        min-width: 850px;
    }

    .calendar-table th {
        font-size: 14px;
        padding: 9px;
    }

    .calendar-table td {
        height: 110px;
        padding: 5px;
    }

    .booking-block {
        font-size: 11px;
        padding: 5px 6px;
    }

    .booking-block small {
        font-size: 10px;
    }
}