html {
    font-size: 23px;
}

body {
    margin: 0;
    background-color: #fdf6e3;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    font-family: "Caveat Brush", sans-serif;
    --bs-body-font-family: "Mali", sans-serif;
    --bs-body-line-height: 1.2;
    --bs-body-font-size: 0.9rem;
    min-height: 100vh;
}

header {
    text-align: center;
    padding: 1rem;
    background-color: #f8d94e;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header h1 {
    margin: 0.5rem 0;
    font-family: 'Comic Sans MS', 'Patrick Hand', cursive;
}

.signup-btn {
    color: black;
    border: 2px solid black;
    padding: 0.6rem 1.2rem;
    border-radius: 0.7rem;
    font-size: 1rem;
    font-weight: 600;
    @media (max-width: 576px) {
        font-size: 0.8rem;
        margin-top: 16px;
    }
    cursor: pointer;
    background-color: #ffcd09;
}

.signup-btn:hover {
    background-color: #d28c20;
}

.fc {
    --fc-button-bg-color: black;
    --bs-link-color-rgb: white;
    --bs-link-hover-color-rgb: black;
    --fc-button-hover-border-color: black;

    --fc-small-font-size: 1em;
    --fc-page-bg-color: #fff;
    --fc-neutral-bg-color: white; /* changed */
    --fc-neutral-text-color: #808080;
    --fc-border-color: black;

    --fc-button-text-color: #fff;
    --fc-button-border-color: black;
    --fc-button-hover-bg-color: #1e2b37;
    --fc-button-active-bg-color: #1a252f;
    --fc-button-active-border-color: black;

    --fc-event-bg-color: #3788d8;
    --fc-event-border-color: black;
    --fc-event-text-color: #fff;
    --fc-event-selected-overlay-color: rgba(0, 0, 0, 0.25);

    --fc-more-link-bg-color: #d0d0d0;
    --fc-more-link-text-color: inherit;

    --fc-event-resizer-thickness: 8px;
    --fc-event-resizer-dot-total-width: 8px;
    --fc-event-resizer-dot-border-width: 1px;

    --fc-non-business-color: rgba(215, 215, 215, 0.3);
    --fc-bg-event-color: rgb(143, 223, 130);
    --fc-bg-event-opacity: 0.3;
    --fc-highlight-color: rgba(188, 232, 241, 0.3);
    --fc-today-bg-color: initial;
    --fc-now-indicator-color: red;


    /* FullCalendar grid: black background, thick black borders */

    .fc-daygrid-day-frame {
        min-height: 200px;
        height: 100%;
        padding: 0 10px;
    }
    .fc-daygrid-day {
        height: 100%; /*fixes problem on firefox where it doesn't take up whole parent*/
    }

    .fc-daygrid-dot-event.fc-event-mirror, .fc-daygrid-dot-event:hover {
        background-color: white;
        border-radius: 5px;
        color: #05868a;
    }

    .fc-daygrid-day, .fc-daygrid-day-frame {
        border: 3px solid black;
    }


    .fc-daygrid-day-number {
        color: black;
        text-decoration: none;
    }


    .fc-toolbar.fc-header-toolbar {
        /* Calendar Header Bar */
        background: black;
        margin: 0;
        padding: 0.5rem;
        justify-content: center;
        flex-wrap: wrap;
        border-radius: 10px 10px 0 0; /* rounded top corners */

        .fc-toolbar-title {
            /*the month title*/
            color: white;
            font-family: "Caveat Brush", cursive;
            font-size: 3rem;
            text-align: center;
            @media (max-width: 992px) {
                font-size: 3rem;
            }
            @media (max-width: 576px) {
                font-size: 2rem;
            }
        }

        .fc-button, .fc-button-primary {
            /* buttons to change months*/
            background: black;
            color: white;
            margin: 0 20px;
            font-family: "Caveat Brush", cursive;
            font-size: 2rem;

            &:hover {
                background: black;
                border-color: white;
            }

            @media (max-width: 992px) {
                font-size: 1.3rem;
                margin: 0 10px;
            }
        }

        @media (max-width: 992px) {
            display: block;
            .fc-toolbar-chunk {
                display: flex;
                justify-content: space-between;
            }

            .fc-toolbar-title {
                width: 100%;
            }
        }
    }

    .fc-col-header-cell {
        /* day of week names */
        color: white;
        font-family: "Caveat Brush", cursive;
        font-size: 1.5rem;

        a:hover {
            color: white;
        }

        a {
            text-decoration: none;
        }

        background: black;
    }

    .fc-view-harness {
        /*border-radius: 0 0 10px 10px; !* rounded bottom corners *! doesn't work*/
    }

    /*make events fit better by removing the dot and allowing it to wrap*/

    .fc-daygrid-event-dot {
        display: none;
    }

    .fc-daygrid-event {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        white-space: normal;

        .fc-event-time, .fc-event-title {
            width: 100%;
            text-align: left;
            white-space: normal;
        }

        .fc-event-time {
            font-size: .8em;
        }
    }

}

/* css */
@media (max-width: 576px) {
    /* Ensure table fits and columns respect widths */
    .fc .fc-list-table {
        width: 100%;
        box-sizing: border-box;
    }

    td {
        /*width: 50% !important; doesn't work */
        white-space: wrap !important;
    }

    .fc-list-event-time {
        /* Allow wrapping */
        white-space: normal;
        word-break: normal;
    }

    .fc-list-event-time::after {
        content: "\200B"; /* zero-width space */
        display: inline;
    }

    /* Dot graphic (small) */
    .fc .fc-list-event-graphic {
        display: none;
    }

    /* Reduce padding on the day header cushion so it doesn't push horizontally */
    .fc .fc-list-day-cushion {
        padding-right: 0.4rem;
        padding-left: 0.4rem;
    }

    /* Prevent calendar container from producing horizontal scroll */
    #calendar, #calendar-container {
        overflow: hidden;
        -webkit-overflow-scrolling: touch;
    }
}

/* Global helpful rules (keeps anchors from expanding inline) */
.fc .fc-list-event-title a {
    color: inherit;
    text-decoration: none;
}

#calendarModal {
    a {
        color: #05868a
    }

    .date-time {
        font-size: .9rem;
    }

    .location {
        font-size: .9rem;
        text-decoration: underline;
        text-decoration-thickness: 1px;
    }
}

#modalTitle {
    line-height: 1.2;
}

.side-flowers {
    position: absolute;
    top: 0;
    bottom: 0;
    height: 100%;
    width: 20%;
    max-width: 220px;
    background-repeat: repeat-y;
    background-position: center top;
    background-size: 100% auto;
    z-index: -1;
}


#left-side-flowers {
    background-image: url('images/sides-left.png');
    left: 0;
    top: 90px;
    height: calc(100% - 90px);
}

#left-butterfly {
    top: 10px;
    left: 0;
    background: url('images/left-butterfly.png') no-repeat center top / contain;
}

#right-side-flowers {
    background-image: url('images/sides-right.png');
    background-position: center;
    right: 0;
}

#header-image {
    width: 70%;
    margin-top: 60px;
}


#calendar-container {
    position: relative;
    width: calc(100% - min(160px, 30%)); /* account for side flowers */

    .signup-btn {
        display: block;
        margin: 0 auto;
    }

    #calendar {
        margin: 1rem auto;
        z-index: 1;
        position: relative;
        background: white;

        &::after {
            /*ugly hack to remove weird white line on the right and have a nice border radius*/
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            width: calc(100% + 2px);
            height: calc(100% + 2px);
            border: 5px solid black;
            border-radius: 10px;
            z-index: 99;
            pointer-events: none;
        }
    }

    #bottom-image {
        width: 70%;
        max-width: 1000px;
        position: relative;
        left: 50%;
        transform: translateX(-50%);
        margin-top: -30px;

        @media (max-width: 992px) {
            margin-top: -27px;
        }
    }

}


#debug-box {
    position: fixed;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #333;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    padding: 12px 16px;
    z-index: 1000;
    font-size: 1rem;
}

#debug-box label {
    display: block;
    margin-bottom: 4px;
    cursor: pointer;
}
