.form-switch-lg .form-check-input {
    width: 3.5rem;
    height: 1.75rem;
    margin-top: 0;
    cursor: pointer;
}
.form-switch-lg .form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}
.form-switch-lg .form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}
.form-switch-lg .form-check-input:checked:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}
 
body {
    background-color: #f8f9fa;
}

.navbar-brand .brand-pill {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: #0d1b4c;
    color: #ffffff;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

.brand-pill a {
    color: #ffffff;
    text-decoration: none;
}

.brand-pill a:hover {
    text-decoration: underline;
}

#calendar {
    background: #ffffff;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.avatar-stack {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.avatar-stack img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #fff;
}

.like-badge {
    background-color: #0d6efd;
    color: #fff;
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
}

.favorite-btn[aria-pressed="true"] {
    background-color: #dc3545;
    color: #fff;
}

.favorite-btn[aria-pressed="false"] {
    background-color: #f8f9fa;
    color: #dc3545;
    border: 1px solid #dc3545;
}

#favorites-map {
    width: 100%;
    height: 400px;
    border-radius: 0.5rem;
}

#filterControlsRow {
    background-color: #ffffff;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

#categoryFilterRow .card {
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

#categoryFilters .btn.active,
#categoryFilters .btn:focus {
    background-color: #0d6efd;
    color: #fff;
}

.view-toggle .btn {
    min-width: 120px;
    font-weight: 600;
}

.form-switch-lg .form-check-input {
    width: 3.5rem;
    height: 1.75rem;
    margin-top: 0;
    cursor: pointer;
}

.form-switch-lg .form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-switch-lg .form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.event-detail-item {
    margin-bottom: 0.75rem;
}

.event-detail-label {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.event-detail-value {
    line-height: 1.4;
}

.event-id-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    border: 1px solid #ced4da;
    background-color: #f8f9fa;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    color: #6c757d;
}

.category-badge {
    display: inline-block;
    margin: 0 0.5rem 0.25rem 0;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background-color: #0d6efd;
    color: #fff;
    font-size: 0.75rem;
}

.has-calendar-like-badge {
    position: relative;
}

.calendar-like-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background-color: #000000;
    color: #ffffff;
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1;
}

.fc-event.calendar-event .fc-event-title {
    display: block;
    padding-right: 1.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#mapWrapper {
    min-height: 400px;
}

#calendarMap {
    width: 100%;
    min-height: 600px;
    height: clamp(420px, 70vh, 820px);
    border-radius: 0.5rem;
}

@media (max-width: 767.98px) {
    #calendarMap {
        min-height: 420px;
        height: 60vh;
    }
}

@media (max-width: 575.98px) {
    body {
        background-color: #f2f4f8;
    }

    #calendarWrapper {
        margin: 0 -0.5rem;
    }

    .fc .fc-scrollgrid,
    .fc .fc-scrollgrid-section > td,
    .fc .fc-scrollgrid-section > td > div {
        border: none !important;
    }

    .fc .fc-daygrid-day-frame,
    .fc .fc-timegrid-slot,
    .fc .fc-daygrid-day-top {
        border: none !important;
    }

    .fc .fc-daygrid-day,
    .fc .fc-timegrid-slot {
        border-bottom: 1px solid #e2e8f0 !important;
    }

    #filterControlsRow {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-areas:
            "filters view"
            "count count"
            "favorites favorites";
        gap: 0.6rem;
        padding: 1rem;
        border-radius: 1rem;
        background-color: #ffffff;
        box-shadow: 0 6px 18px rgba(15,23,42,0.08);
        margin-bottom: 1.5rem;
    }

    #filterControlsRow > div {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0;
        display: flex;
        align-items: center;
    }

    #filterControlsRow > div:nth-child(1) {
        grid-area: filters;
    }

    #filterControlsRow > div:nth-child(2) {
        grid-area: view;
        justify-content: flex-end;
        padding-right: 0;
    }

    .filter-toggle-col .filter-icon {
        display: none;
    }

    #filterControlsRow > div:nth-child(3) {
        grid-area: count;
        text-align: left !important;
        margin-top: 0.25rem;
    }

    #filterControlsRow > div:nth-child(4) {
        grid-area: favorites;
    }

    #toggleFilters {
        padding: 0;
        font-size: 0.95rem;
        width: 3.2rem;
        height: 3.2rem;
        color: #0d0d0d;
        border: 2px solid #0d0d0d;
    }

    .view-toggle {
        width: 100%;
        border-radius: 0.75rem;
        overflow: hidden;
        border: 2px solid #0d0d0d;
    }

    .view-toggle .btn {
        flex: 1 0 auto;
        padding: 0.6rem 1rem;
        font-size: 0.95rem;
        color: #0d0d0d;
        background-color: transparent;
        border: none;
    }

    .view-toggle .btn-check:checked + .btn,
    .view-toggle .btn.active {
        background-color: #0d0d0d;
        color: #ffffff;
    }

    .view-toggle .btn:hover,
    .view-toggle .btn:focus {
        background-color: rgba(13,13,13,0.08);
        color: #0d0d0d;
    }

    @media (max-width: 575.98px) {
        .filter-toggle-col .filter-icon {
            display: inline-flex;
            font-size: 0;
        }

        .filter-toggle-col .filter-text {
            display: none;
        }

        #toggleFilters {
            justify-content: center;
            width: 3.2rem;
            height: 3.2rem;
        }

        .view-toggle .btn {
            height: 3.2rem;
            display: flex;
            align-items: center;
            justify-content: center;
        }
    }

    #eventCount {
        display: block;
        text-align: left;
        font-size: 0.9rem;
        margin-bottom: 0;
    }

    .fc .fc-toolbar.fc-header-toolbar {
        flex-direction: column;
        gap: 0.5rem;
    }

    .fc .fc-toolbar-title {
        font-size: 1.3rem;
    }

    .fc .fc-button-group, .fc .fc-toolbar-chunk:first-child, .fc .fc-toolbar-chunk:last-child {
        width: 100%;
        justify-content: space-between;
    }

    .fc .fc-button {
        flex: 1 1 auto;
        padding: 0.55rem 0.4rem;
        font-size: 0.85rem;
        border-radius: 0.75rem !important;
    }

    .fc .fc-toolbar-chunk:first-child {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .fc .fc-toolbar-chunk:first-child .fc-button-group {
        width: auto;
        flex: 1 1 auto;
    }

    .fc .fc-toolbar-chunk:first-child .fc-button-group .fc-button {
        flex: 1 1 50%;
    }

    .fc .fc-toolbar-chunk:first-child .fc-today-button {
        width: auto;
        flex: 0 0 auto;
        min-width: 68px;
    }

    .card.shadow-sm.border-0 {
        background: transparent;
        box-shadow: none !important;
        border: none !important;
    }

    .card.shadow-sm.border-0 .card-body {
        padding: 0 !important;
        background: transparent;
    }

    #calendarWrapper {
        background: transparent;
    }

    #calendar {
        background: transparent;
        padding: 0;
        box-shadow: none;
        border-radius: 0;
    }

    .fc .fc-scrollgrid,
    .fc .fc-view-harness,
    .fc .fc-scrollgrid-liquid {
        border-radius: 0;
    }

    .fc {
        border-radius: 0;
    }
}
