﻿/* ============================
   Events.css — Baby Grace Calendar Page
   ============================ */
#calendarContainer {
    display: flex;
    align-items: center;
    max-width: 1150px;
    margin: 0 auto;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 600;
    color: #0078D4;
    margin-top: 10px;
}

#calendarHeaderRow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    margin-bottom: 12px;
    padding: 0 20px;
    max-width: 1150px;
    margin-left: auto;
    margin-right: auto;
}

#customCalendarHeader {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 600;
    color: #0078D4;
}

#prevMonthBtn,
#nextMonthBtn {
    background-color: #0078D4;
    color: #fff;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 1.5rem;
    cursor: pointer;
}

#calendarTitle {
    font-size: 1.5rem;
    font-weight: 600;
    color: #0078D4;
}

#siteSelectorWrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #f5faff;
    border: none;
    padding: 6px 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    font-size: 0.95rem;
}

#siteSelectorWrapper::after {
    content: "";
    display: block;
    width: 100%;
    max-width: 600px;
    height: 1px;
    background-color: #ccc;
    margin-top: 16px;
    margin-bottom: 4px;
}

#siteSelectorWrapper label {
    white-space: nowrap;
    font-size: 1rem;
    font-weight: 600;
    color: #0078D4;
    margin-bottom: 6px;
    margin-right: 8px;
}

.selector-label {
    display: flex;
    width: 75px;
}

#siteSelector {
    font-size: 0.95rem;
    padding: 6px 8px;
    min-width: 180px;
    /*box-sizing: border-box;*/
}

    #siteSelector:hover {
        border-color: #0078D4;
        box-shadow: 0 0 4px rgba(0,120,212,0.3);
    }


    #calendarContainer .fc td, .fc th {
        border: 1px solid #222 !important;
    }

    #calendarContainer .fc-col-header-cell {
        border-bottom: 2px solid rgb(0, 0, 0);
    }

    #calendarContainer .fc-daygrid-day-frame {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 4px;
        min-height: 40px; /* or 60px if you want it even tighter */
        overflow: visible;
    }

    #calendarContainer .fc-daygrid-day:not(.fc-day-other) {
        background-color: #e6f4ff; /* Light blue for current month */
    }

    #calendarContainer .fc-daygrid-day {
        min-height: 60px;
        border: 1px solid rgba(0,0,0,0.5);
    }

        /* Style day numbers for the current month */
        #calendarContainer .fc-daygrid-day:not(.fc-day-other) #calendarContainer .fc-daygrid-day-number {
            color: #0078D4; /* Baby Grace blue or any color you prefer */
            font-weight: 600;
        }

    /* Optional: style day numbers for other months */
    #calendarContainer .fc-day-other #calendarContainer .fc-daygrid-day-number {
        color: #999;
        font-weight: 400;
    }

    #calendarContainer .fc-daygrid-day-top {
        padding: 2px 4px;
    }

    #calendarContainer .fc-daygrid-event {
        white-space: normal; /* allow wrapping */
        overflow: visible; /* show full content */
        height: auto; /* let it grow */
        line-height: 1.2; /* tighter spacing */
        word-break: break-word; /* break long words */
        margin-bottom: 2px; /* reduce spacing between stacked events */
        padding: 2px 4px; /* keep it readable but compact */
        font-size: 0.85rem; /* optional: slightly smaller text */
        min-height: 10px;
    }

    #calendarContainer .fc-daygrid-day.selected-date {
        background-color: #ffefc6 !important; /* or whatever your current date color is */
        border-radius: 4px;
    }

    #calendarContainer .fc-day-other {
        background-color: #e0e0e0; /* Light gray */
        color: #444; /* Optional: muted text */
        font-weight: 500;
        background-color: #f0f0f0;
        border-color: #ddd;
    }

        #calendarContainer .fc-day-other:hover {
            background-color: #e0e0e0;
        }

        #calendarContainer .fc-day-other .fc-daygrid-day-number {
            color: #181313; /* Ensures date number is legible */
            font-size: 1rem; /* Optional: slightly larger */
            font-weight: 600;
        }

    #calendarContainer .fc-event-title {
        color: #0078D4;
        text-decoration: underline;
        cursor: pointer;
    }


    #calendarContainer .fc-view-harness {
        min-height: 600px; /* or whatever fits your layout */
        height: auto !important;
        transition: height 0.3s ease;
    }

#eventPageContainer {
    padding-top: 120px; /* adjust based on header height */
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

/* 🔽 Site Selector */
.event-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 20px;
}

    .event-filter label {
        font-weight: bold;
        font-size: 1rem;
    }

    .event-filter select {
        padding: 6px 10px;
        font-size: 1rem;
        border-radius: 4px;
        border: 1px solid #ccc;
    }

#eventPageContainer select {
    padding: 6px;
    font-size: 1rem;
}


/* 📅 Calendar Container */
#eventPageContainer  {
    margin-top: 160px;
    margin-bottom: 2em;
}


.calendar-heading {
    margin-bottom: 10px;
    font-size: 1.5rem;
    font-weight: 600;
}

/* 📋 Event Lists */
#eventPageContainer .event-list {
    margin-bottom: 2em;
}

    #eventPageContainer .event-list h3 {
        font-size: 1.2rem;
        margin-bottom: 0.5em;
    }

    #eventPageContainer .event-list ul {
        list-style-type: none;
        padding-left: 0;
    }

    #eventPageContainer .event-list li {
        padding: 6px 10px;
        border-bottom: 1px solid #ccc;
    }

        /* 🎨 Optional: Baby Grace Branding */
        #eventPageContainer .event-list li:hover {
            background-color: #f0f8ff; /* Soft highlight */
        }

.monthly-events h3 {
    color: #2a4d69;
}

.daily-events h3 {
    color: #2a4d69;
}

#eventPageContainer #eventLists {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 2rem;
    max-width: 90%;
    margin: 0 auto 2em;
}

    #eventPageContainer #eventLists .event-list {
    flex: 1 1 48%;
    box-sizing: border-box;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    padding: 1em;
    border-radius: 6px;
    min-width: 280px;
}

        #eventPageContainer #eventLists .event-list.daily-events {
            flex: 1 1 50%;
        }

.daily-events {
    order: 1;
}

.monthly-events {
    order: 2;
}

#eventPageContainer .event-list ul:empty::before {
    content: "No events to display.";
    display: block;
    padding: 10px;
    color: #666;
    font-style: italic;
}

#calendar {
    width: 100%;
    max-width: 2500px;
    margin-top: 20px; /* adjust based on header height */
    margin: 0 auto; /* centers it horizontally */
    height: auto; /* lets it grow as needed */
}



.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 6px;
    width: 320px;
    max-width: 90%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    position: relative;
}

.close-button {
    font-size: 1.75rem; /* Bigger and more visible */
    font-weight: bold; /* Darker and thicker */
    color: #333; /* Dark charcoal for contrast */
    width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    border-radius: 50%;
    background-color: #e0e0e0; /* Light gray background */
    cursor: pointer;
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: background-color 0.2s ease;
}

    .close-button:hover {
        background-color: #ccc; /* Slight darkening on hover */
    }

.hidden {
    display: none;
}


/*************************************************************************************/
/*                          Below are styles for smaller screens                     */
/*************************************************************************************/
@media (max-width: 600px) {
    #eventPageContainer .event-filter,
    #eventPageContainer #calendarContainer,
    #eventPageContainer .event-list {
        margin-bottom: 1.5em;
    }

    #eventPageContainer select {
        width: 100%;
    }

    #eventPageContainer .event-list li {
        padding: 8px;
        font-size: 0.95rem;
    }

    #calendar {
        width: 70%;
    }

    #eventPageContainer #eventLists {
        flex-direction: column;
        gap: 1.5em;
    }

        #eventPageContainer #eventLists .event-list {
            width: 100%;
        }

    #siteSelectorWrapper {
        position: static;
        margin-top: 8px;
        align-self: flex-end;
    }
}

@media (max-width: 768px) {
    #calendarContainer {
        position: relative;
        max-width: 1500px;
        padding: 0 16px; /* Optional: adds side breathing room */
        margin: 0 auto;
        box-sizing: border-box;
    }

    #calendar {
        width: 100% !important;
        max-width: 100% !important;
    }

    .fc {
        width: 100% !important;
    }

    .fc-daygrid-day {
        min-height: 60px;
    }

    .close-button {
        font-size: 1.5rem; /* Makes the "×" larger */
        width: 32px; /* Increases tap target */
        height: 32px;
        line-height: 32px;
        text-align: center;
        border-radius: 50%;
        background-color: #0078D4; /* Optional: Baby Grace blue */
        color: #fff;
        cursor: pointer;
        position: absolute;
        top: 8px;
        right: 8px;
        z-index: 10;
    }

    .fc-view-harness {
        overflow-x: auto;
    }
}

/* Firefox Hacks */
@-moz-document url-prefix() {
    .fc-daygrid-event {
        margin-bottom: 1px !important;
        padding: 2px 4px !important;
        line-height: 1.1 !important;
    }

    .fc-daygrid-day-frame {
        display: block !important;
        padding: 4px !important;
    }
}
