:root {
    --hoa-primary: #217225;
    --hoa-on-primary: #ffffff;
    --fc-list-event-hover-bg-color: #f5f5f5;
}
[data-bs-theme="dark"] {
    --fc-list-event-hover-bg-color: var(--bs-light-bg-subtle);
    .fc .fc-list-sticky .fc-list-day > * {
        background-color: var(--bs-secondary-bg);
    }
    .fc .fc-day-today {
        background-color: var(--bs-highlight-bg) !important;
    }
}

html,
body {
    height: 100%;
    margin: 0;
    overflow: hidden;
    font-family: "Inter", "Roboto", "Manrope", sans-serif;
}
.navbar-brand {
    font-family: "Inter", "Roboto", "Manrope", serif;
    letter-spacing: 0.2px;
}
#mainLayout {
    height: calc(100vh - 52px);
    display: flex;
}
#sidebar {
    width: 320px;
    min-width: 320px;
    height: 100%;
    overflow-y: auto;
    border-right: 1px solid var(--bs-border-color);
    padding: 1rem;
}
#calendarArea {
    flex: 1;
    padding: 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
#calendarToolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}
#calendar {
    flex: 1;
    min-height: 0;
}
.fc-event {
    cursor: pointer;
}
.my-booking .fc-event-main {
    border-left: 4px solid #198754;
    padding-left: 4px;
}
.tab-btn.active {
    background-color: #0d6efd;
    color: #fff;
}
.admin-panel {
    display: none;
}
.admin-panel.active {
    display: block;
}

.fc a.fc-col-header-cell-cushion, /* Week/Day/Month column headers */
.fc a.fc-daygrid-day-number,      /* Month/Week day numbers */
.fc a.fc-list-day-cushion, .fc a.fc-list-day-text, .fc a.fc-list-day-side-text        /* List/Agenda view date headers */ {
    pointer-events: none;
    cursor: default;
    text-decoration: none;
    color: inherit;
}
.fc .fc-day-past {
    background-color: var(--bs-tertiary-bg);
}

.hoa-navbar {
    background: var(--hoa-primary);
}
.hoa-navbar .navbar-brand,
.hoa-navbar #authStatus {
    color: var(--hoa-on-primary) !important;
}
.icon-btn i {
    font-size: 0.9rem;
    line-height: 1;
}

.my-alert-class {
    position: fixed;
    top: 64px;
    right: 0px;
    width: auto;
    font-family: var(--font-fbtubic-sans-eng-light);
    z-index: 9999;
}
@media (max-width: 1024px) {
    /* or 992px, or 1024px, etc. */
    .my-alert-class {
        font-size: 10px;
        bottom: 64px;
        top: unset;
    }
}

@media (max-width: 767px) {
    html,
    body {
        overflow: auto;
        height: auto;
        min-height: 100%;
    }
    #mainLayout {
        height: auto;
        min-height: calc(100vh - 52px);
        flex-direction: column;
    }
    #sidebar {
        width: 100%;
        min-width: 0;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid #dee2e6;
        padding: 0.75rem;
    }
    #calendarArea {
        padding: 0.75rem;
        min-height: 70vh;
    }
    #calendar {
        min-height: 60vh;
    }

    /* Keep mobile controls compact and hide oversized FullCalendar chrome. */
    #calendarToolbar {
        gap: 0.35rem;
        margin-bottom: 0.5rem !important;
    }
    #calendarToolbar .toolbar-date-label {
        display: none;
    }
    #calendarDatePicker {
        max-width: 132px !important;
        font-size: 0.8rem;
        padding: 0.18rem 0.4rem;
    }
    #calendarViewSelect {
        font-size: 0.8rem;
        padding: 0.18rem 1.35rem 0.18rem 0.4rem;
    }

    .fc .fc-toolbar {
        display: flex;
    }
    .fc .fc-toolbar-title {
        font-size: 0.95rem;
    }
    .fc .fc-button {
        font-size: 0.72rem;
        padding: 0.2rem 0.35rem;
    }
    .fc .fc-list,
    .fc .fc-daygrid,
    .fc .fc-timegrid {
        font-size: 0.82rem;
    }

    #legendSection {
        display: none !important;
    }
    #bookingSection {
        order: -1;
    }
    #loginSection {
        order: 0;
    }
    #adminTabSection {
        margin-top: 0.75rem;
    }
}

.my_loading {
    display: flex;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(var(--bs-body-bg-rgb), 0.95);
    color: var(--hoa-primary);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    /*transform: translate(-50%, -50%); */
    z-index: 1047;
}
.spinner-container {
    position: relative; /* This is crucial: allows absolute positioning of children */
    display: flex; /* Helps center the spinner initially */
    justify-content: center;
    align-items: center;
}
.spinner-logo {
    position: absolute; /* Position the logo relative to its parent (.spinner-container) */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Centers the logo perfectly */
    max-width: 60%; /* Adjust as needed - makes sure logo fits within spinner */
    max-height: 60%; /* Adjust as needed */
    height: auto; /* Maintain aspect ratio */
    /* You might want to add a z-index if the spinner content overlaps */
    /* z-index: 1; */
}
