/* FullCalendar styling adjustments */
.fc-theme-standard td,
.fc-theme-standard th {
    border: 2px solid #fff;
}

.fc-daygrid-day-number {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    height: auto;
    width: auto;
    padding: 0;
    margin: 0;
    /* Remove margin to ensure proper centering */
}

.fc .fc-scroller-liquid-absolute {
    inset: 0px;
    position: relative;
}

.fc .fc-scroller-harness {
    position: relative;
    margin-bottom: 60px;
    overflow: hidden;
}

.fc-scroller {
    overflow: auto !important;
    /* Make calendar scrollable */
    touch-action: none;
    /* Prevent the default swipe action from scrolling the entire screen */
    -webkit-overflow-scrolling: touch;
    /* Enable smooth scrolling on mobile devices */
}

.fc-toolbar button {
    margin: initial;
    padding: initial;
    box-sizing: initial;
}

.fc td,
.fc th,
.fc .fc-view-harness,
.fc .fc-scroller-harness,
.fc .fc-daygrid-day-number {
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
}

.fc .fc-daygrid-day-top {
    display: none;
}

.fc .fc-bg-event .fc-event-title {
    font-size: 12px;
    /* Adjust the font size as needed */
    display: flex;
    justify-content: center;
    /* Center horizontally */
    align-items: center;
    /* Center vertically */
    height: 100%;
    /* Ensure full height for centering */
    text-align: center;
    /* Center text */
    line-height: normal;
    /* Ensure line height doesn't stretch */
    opacity: 1 !important;
    /* Override any opacity settings */
}

.fc .fc-bg-event .fc-event-title {
    font-style: normal !important;
    margin: 0 !important;
}

.fc .fc-cell-shaded,
.fc .fc-day-disabled {
    background: hsl(0, 2%, 67%);
}

.fc-bg-event {
    opacity: 1 !important;
    /* Ensure full opacity for the event background */
}

.fc-daygrid-day {
    border: 1px solid #ddd;
    background-color: #fff;
}

/* Custom styling for dates in the current month */
.fc-daygrid-day.fc-day-other-month {
    color: lightgrey !important;
    /* Grey font for days not in the current month */
}

/* Custom styling for background and border for dates not in the current month */
.fc-daygrid-day.fc-other-month {
    background-color: #f9f9f9;
    /* Light background for non-current month days */
    border: 1px dashed #ddd;
    /* Dashed border to visually distinguish */
}

/* For current month dates */
.fc-event.current-month .fc-event-title {
    color: black !important;
    /* Ensures black text for current month */
}

/* For other month dates */
.fc-event.other-month .fc-event-title {
    color: darkgrey !important;
    /* Ensures grey text for other months */
}

/* Change the color of the selected dates */
.fc-highlight {
    background-color: #cce5ff;
    /* Light blue background for selected dates */
    border: 3px solid #007bff;
    /* Blue border for selected dates */
}

/* Optional: Add hover effect for selected dates */
.fc-highlight:hover {
    background-color: #b3d9ff;
    /* Slightly darker blue for hover effect */
}

/* Custom container for both calendar and booking details */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

#calendarSection,
#bookingDetails,
#adminTable,
#adminControls {
    flex: 1;
    min-width: 300px;
}

/* Booking details container */
#adminTable {
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
    text-align: center;
    /* Center align text */


}

#adminControls {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
}

.admin-field select {
    /* Ensure it’s rendered as a block-level box */
    display: block;
    /* If flex is giving it zero width, override with 100% of its flex container */
    width: 100%;
    /* Or, if you’d rather a fixed width: */
    /* width: 150px; */
  
    /* Basic styling */
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
  
    /* In a flex container, allow it to shrink/grow */
    flex: 1 1 auto;
    min-width: 0; /* critical to let it shrink if needed */
  }

/* Align label + control */
.admin-field {
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
  }
  .admin-field label {
    flex: 0 0 120px;
    font-weight: bold;
  }
  
  /* Make both inputs and selects fill the remaining space */
  .admin-field input,
  .admin-field select {
    flex: 1;
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
  }

#bookingDetails {
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
    text-align: center;
    /* Center align text */
}

/* Table styling for check-in and check-out */
#checkInOutTable {
    width: 100%;
    margin: 2px 0;
    background-color: rgb(142, 223, 130);
    /* Blue background */
    color: white;
    /* White text */
    border-radius: 4px;
}

#checkInOutTable td {
    background-color: white;
    /* White background */
    color: #000000;
    font-size: 18px;
    text-align: center;
    border-radius: 4px;
}

#checkInOutTable th,
#checkInOutTable td {
    padding: 10px;
    font-size: 18px;
}

#guestsContainer {
    background-color: rgb(142, 223, 130);
    /* Blue background */
    color: white;
    /* White text */
    border-radius: 4px;
}

#guestsContainer table {
    width: 100%;
    /* Ensures the table takes full width */
    table-layout: fixed;
    /* Ensures equal spacing */
}

#guestsContainer td {
    vertical-align: middle;
    /* Vertically align the text and dropdown */
}

#guestsContainer td:first-child {
    text-align: center;
    /* Align the label to the left */
    font-size: 18px;
}

#guestsContainer td:last-child {
    text-align: center;
    /* Align the dropdown to the right */
}

#guestsDropdown {
    width: 150px;
    /* Adjust width of the dropdown */
    display: block;
}

/* Style for the guest dropdown and reserve button */

#reserveButton, #updateButton   {
    display: block;
    width: 60%;
    padding: 15px;
    margin: 0 auto;
    /* Center the button horizontally */
}

#reserveButton, #updateButton {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

#reserveButton:hover, #updateButton:hover {
    background-color: #0056b3;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .container {
        flex-direction: column;
    }

    #calendarSection,
    #bookingDetails {
        width: 100%;
    }
}

/* Styles for diagonal split */
.diagonal-split {
    position: relative;
    overflow: hidden;
}

.diagonal-split::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 11;
    background: linear-gradient(to top right, rgba(143, 223, 130, 0.5), rgba(143, 223, 130, 0.5) 50%, rgba(255, 204, 203, 0.5) 50%, rgba(255, 204, 203, 0.5)) !important;
}

/* Container for the legend */
.legend-container {
    margin: 20px auto;
    padding: 10px;
    max-width: 600px;
    background-color: #f9f9f9;
    /* Match the booking details background color */
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: center;
    /* Center align the legend items */
    display: flex;
    justify-content: space-around;
    /* Space out the items evenly */
    flex-wrap: wrap;
    /* Wrap items to the next line if they overflow */
}

/* Title for the legend */
.legend-container h3 {
    width: 100%;
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #007bff;
}

/* Individual legend items */
.legend-item {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 150px;
    /* Limit the width of each item */
}

/* Color boxes for the legend */
.legend-color {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    margin-right: 10px;
}

/* Available color box */
.legend-color.available {
    background-color: rgb(142, 223, 130);
}

/* Not available color box */
.legend-color.not-available {
    background-color: rgb(255, 204, 203);
}

/* Diagonal split color box */
.legend-color.diagonal-split {
    background: linear-gradient(to top right,
            rgba(143, 223, 130, 1) 50%,
            rgba(255, 204, 203, 1) 50%);
}

/* Text next to the color box */
.legend-text {
    font-size: 12px;
    color: #333;
}