/* More Filters button and #calendarLayout chooser (built by core/js/calendar.js) at the far right
   of the Month row, on /calendar and /events. When they don't fit, they wrap onto the line above it, at the left.
   Park and the rows below run full width under them. */
#filterTopRow
{
    display: flex;
    flex-wrap: wrap-reverse; /* The wrapped line goes above */
    align-items: flex-end; /* Top, with wrap-reverse */
    column-gap: 12px;
}
#filterTopFields
{
    margin-bottom: 10px;
}
#filterButtons
{
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin: 0 0 4px auto;
}
#filterTopRow.wrapped #filterButtons /* Set by calFilterButtonsWrapped() */
{
    margin-left: 0;
}
/* !important: default.css sets .button:link/:visited/:hover to white text with !important. */
#filterButtons .button,
#filterButtons .button:link,
#filterButtons .button:visited,
#eventsButtonRow .button,
#eventsButtonRow .button:link,
#eventsButtonRow .button:visited,
#calendarLayoutButton,
#calendarAdminButton
{
    display: inline-block;
    padding: 6px 16px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #999d5c;
    color: #6b7237 !important;
    font-size: 13px;
    font-weight: 600;
    line-height: normal;
    text-decoration: none;
    cursor: pointer;
}
#searchFilters #filterButtons .button:hover,
#eventsButtonRow .button:hover,
#searchFilters #calendarLayoutButton:hover,
#searchFilters #calendarAdminButton:hover,
#searchFilters #calendarAdminButton.active
{
    background: #999d5c !important;
    color: #fff !important;
}
/* /events: Add Event and the refresh buttons below the list, with their level 8+ notes */
#eventsButtonRow
{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 10px 0;
}
#eventsListButtons
{
    display: contents;
}
.eventsAdminNote
{
    padding: 0 10px;
    font-size: 12px;
}
#eventsStaffNote
{
    padding-top: 6px;
}
#eventsStaffNote .staffIncluded,
#eventsStaffNote.included .staffExcluded
{
    display: none;
}
#eventsStaffNote.included .staffIncluded
{
    display: inline;
}
#moreFiltersLink:focus:not(:focus-visible)
{
    outline: none; /* No highlight after a click; keyboard focus still shows */
}
#filterButtons #calendarAdminButton /* Circle, the height of its neighbors */
{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 50%;
}
/* "Use My Location" / "From Me" beside Distance (core/js/calendar.js) */
#myLocationButton
{
    margin-left: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #999d5c;
    color: #6b7237 !important;
    font-size: 13px;
    font-weight: 600;
    line-height: normal;
    vertical-align: middle;
    cursor: pointer;
}
#myLocationButton svg
{
    vertical-align: -2px;
    margin-right: 5px;
}
.calCenterMarker /* Leaflet divIcon at the distance search's center */
{
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2d6d8c;
}
#myLocationButton:hover
{
    background: #999d5c !important;
    color: #fff !important;
}
.dark #myLocationButton
{
    background: #2b2b24;
    color: #d8dca8 !important;
}
#myLocationButton.active,
.dark #myLocationButton.active,
#myLocationButton.active:hover
{
    background: #2d6d8c !important;
    border-color: #2d6d8c;
    color: #fff !important;
}
#calendarLayout
{
    position: relative;
}
#searchFilters select:focus,
#searchFilters select:focus-visible
{
    outline: none;
    box-shadow: none;
}
#calendarLayoutMenu
{
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 4px;
    min-width: 150px;
    padding: 6px 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
    z-index: 100;
}
#calendarLayoutMenu .layoutChoice
{
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    white-space: nowrap;
}
#calendarLayoutMenu .layoutChoice:hover
{
    background: #f4f5f7;
}
#calendarLayoutMenu .layoutChoice a
{
    flex: 1;
    color: #444;
    text-decoration: none;
}
#calendarLayoutMenu .layoutChoice a.active
{
    font-weight: bold;
    color: #5f6539;
}
.dark #filterButtons .button,
.dark #filterButtons .button:link,
.dark #filterButtons .button:visited,
.dark #eventsButtonRow .button,
.dark #eventsButtonRow .button:link,
.dark #eventsButtonRow .button:visited,
.dark #calendarLayoutButton,
.dark #calendarAdminButton
{
    background: #2b2b24;
    color: #d8dca8 !important;
}
.dark #calendarLayoutMenu
{
    background: #2b2b24;
    border-color: #555;
}
.dark #calendarLayoutMenu .layoutChoice:hover
{
    background: #3a3a30;
}
.dark #calendarLayoutMenu .layoutChoice a
{
    color: #ddd;
}
.dark #calendarLayoutMenu .layoutChoice a.active
{
    color: #d8dca8;
}

/* Calendar layout (FullCalendar): day-number badges and the "Today" marker. */
.ui-datepicker-div { z-index: 99999; font-size: 9pt}
#ui-datepicker-div { z-index: 99999; font-size: 9pt}
.ui-datepicker { z-index:99999; font-size: 9pt}
#ui-datepicker { z-index:99999; font-size: 9pt}

.fc-event
{
    z-index:-1;
}
#fc-event
{
    z-index:-1;
}
/* Event hover on /events' embedded calendar. localsite's a:hover turned the text dark; .dark mode is already fine. */
body:not(.dark) #calendarEmbed .fc-event:hover
{
    background-color: #2d6d8c;
    border-color: #2d6d8c;
    color: #fff;
}
/* .fc prefix: on /events fullcalendar.css loads after this file, and its float:right moved the number (and Today) over. */
.fc .fc-content .fc-day-number
{
    background:#666;
    color:#fff;
    min-width:16px;
    text-align:center;
    float:left;
    font-family: calibri, helvetica;
    font-size:10pt;
}
.fc-content .fc-state-highlight
{
    background:transparent;
    background: #f8fdfd;
}
/* Anchored on the day number, not the cell: a positioned cell throws off FullCalendar's column measurements. */
.fc-content .fc-state-highlight .fc-day-number
{
    position: relative;
}
.fc-content .fc-state-highlight .fc-day-number::after
{
    content: "Today";
    position: absolute;
    top: -1px;
    left: 21px;
    color: #b8860b;
    font-family: calibri, helvetica;
    font-size: 9pt;
    font-weight: bold;
    white-space: nowrap;
    background: none;
    pointer-events: none;
}
.dark .fc-content .fc-state-highlight
{
    background: #333;
}
.dark .fc-content .fc-state-highlight .fc-day-number::after
{
    color: #ffbf00;
}
.fc .fc-grid .fc-other-month .fc-day-number
{
    opacity: 0.5;
}

/* Map layout (Leaflet, loaded by core/js/calendar.js on first use). */
#eventMap
{
    position: relative;
    z-index: 0; /* Keeps Leaflet's pane z-indexes under #calendarLayoutMenu */
    height: 450px;
    margin: 0 0 12px;
    border-radius: 8px;
}
#eventMap .calMapLoading /* Spinner while the map's points load */
{
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    margin: -22px 0 0 -22px;
    z-index: 1000;
    pointer-events: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .85);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}
#eventMap .calMapLoading div
{
    box-sizing: border-box;
    width: 28px;
    height: 28px;
    margin: 8px;
    border: 3px solid rgba(45, 109, 140, .25);
    border-top-color: #2d6d8c;
    border-radius: 50%;
    animation: calMapSpin .8s linear infinite;
}
@keyframes calMapSpin
{
    to { transform: rotate(360deg); }
}
#eventMap .leaflet-popup-content
{
    font-size: 14px;
}
#eventMap .calMapScrollZoom
{
    padding: 4px 10px;
    background: #fff;
    border: 2px solid rgba(0, 0, 0, .2);
    border-radius: 4px;
    color: #333;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
#eventMap .calMapScrollZoom.active
{
    background: #2d6d8c;
    border-color: #2d6d8c;
    color: #fff;
}
