:root {
    --highlighted-button-bg: #ffe0b3; /* Default background color */
    --highlighted-button-border: #ff9800; /* Default border color */
    --highlighted-button-text: #000000; /* Default border color */
}

/*This hides the content visually, but makes it available to screen readers when use the sr-only class*/
.sr-only {  
    position: absolute;  
    width: 1px;  
    height: 1px;  
    padding: 0;  
    margin: -1px;  
    overflow: hidden;  
    clip: rect(0, 0, 0, 0);  
    white-space: nowrap;  
    border: 0;  
}

.calendar-day.highlighted {
    background-color: var(--highlighted-button-bg) !important;
    border: 2px solid var(--highlighted-button-border) !important;
    color: var(--highlighted-button-text) !important;
    cursor: pointer; /* Indicates the day is clickable */
}

#calendar {
    border: 2px solid #ccc;
    padding: 10px;
    border-radius: 5px;
    max-width: 100%; /* Ensure calendar fits within screen width */
    box-sizing: border-box; /* Include padding and border in element’s total width */
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.calendar-day {
    padding: 10px;
    border: 1px solid #ccc;
    margin: 5px;
    text-align: center;
    font-size: 14px;
}

.calendar-day.unavailable {
    background-color: #f0f0f0;
    color: #ccc !important;
    pointer-events: none; /* Make the greyed-out days unclickable */
}

.calendar-day.available {
    background-color: #fff;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    cursor: pointer; /* Indicates the day is clickable */
}

.calendar-day.available:hover {
    background-color: var(--highlighted-button-bg) !important;
    transition: background-color 0.2s ease;
}

/* Weekday headers */
.calendar-header {
    font-weight: bold;
    text-align: center;
}

#calendar-navigation {
    display: flex; /* Use flexbox for layout */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically if needed */
    margin: 20px 0; /* Optional: add vertical space */
    gap: 30px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    /* For tablets */
    .day-header { 
        display: none; /* Don't bother displaying the days of the week */
    }
    .calendar-grid {
        grid-template-columns: repeat(4, 1fr); /* 4 columns on tablets */
        gap: 5px;
    }

    .calendar-day {
        padding: 8px;
        font-size: 12px;
    }

    #calendar-navigation {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    /* For mobile phones */
    .calendar-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile */
        gap: 5px;
    }

    .calendar-day {
        padding: 6px;
        font-size: 10px;
    }

    #calendar-navigation {
        flex-direction: column; /* Stack navigation vertically */
        gap: 10px;
    }
}

#prev-month, #next-month {
    visibility: visible;
}

.available-time {
    padding: 5px;
    margin: 2px;
    border: 1px solid #ccc;
    cursor: pointer;
}

.time-button {
    background-color: #e0e0e0;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.time-button.selected {
    background-color: var(--highlighted-button-bg) !important;
    border: 2px solid var(--highlighted-button-border) !important;
    color: var(--highlighted-button-text) !important;
}

.time-button:hover:not([disabled]) {
    background-color: #d0d0d0;
}

/* Styling for booked slots */
.time-button.booked {
    text-decoration: line-through;  /* Add strikethrough */
    background-color: #f5f5f5;  /* A lighter background for booked slots */
    color: #a0a0a0;  /* Gray out the text */
    cursor: not-allowed;  /* Show not-allowed cursor */
    border: 1px solid #ccc; /* Regular border */
}

#venue-details {
    display: flex;
}

#venue-details > div {
    flex: 1;
    padding: 10px; /* Adjust as needed */
}

#venue-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px; /* Optional: to add rounded corners */
}

.book-button {
    background-color: var(--highlighted-button-bg); /* Same background color */
    border: 2px solid var(--highlighted-button-border); /* Same border style */
    color: var(--highlighted-button-text) !important;
    border-radius: 10px;
    padding: 10px 20px; /* Same padding as inline style */
    cursor: pointer; /* Pointer cursor */
    width: 100%; /* Full width like in the inline style */
    text-align: center; /* Center the text */
    display: inline-block; /* Ensure proper button display */
    font-weight: bold; /* Make the font bold */
}

.button-container {
    display: flex;
    gap: 10px; /* Space between buttons */
    justify-content: center; /* Center buttons if needed */
    align-items: center; /* Align buttons vertically */
}

.find-button {
    background-color: var(--highlighted-button-bg);
    border: 2px solid var(--highlighted-button-border);
    color: var(--highlighted-button-text) !important;
    border-radius: 10px;
    padding: 10px 20px;
    cursor: pointer;
    text-align: center;
    font-weight: bold;
    box-sizing: border-box;
    flex-shrink: 0; /* Prevent button from shrinking too much */
}

/* Adjust padding on smaller screens */
@media (max-width: 480px) {
    .find-button {
        padding: 10px 10px; /* Smaller left and right padding */
    }
}

.find-input {
    width: 50%; 
    margin-bottom: 10px; /* Space between input and buttons */
    padding: 10px 15px !important;
}

#retrieve-booking {
    width: 100%; /* Make the form full width */
}

.find-label {
    width: auto; /* Remove fixed width for centering */
    margin-bottom: 10px; /* Space between label and input */
    font-weight: bold;
}

.button-container {
    display: flex; /* Use flexbox to arrange buttons in a row */
    gap: 10px; /* Space between buttons */
    justify-content: center; /* Center the buttons horizontally */
    margin-top: 10px; /* Add some space above the button row */
    margin-bottom: 20px; /* Add space below the buttons */
}

.recurring-choices-container,
.booking-container {
    border: 2px solid #ccc; /* Adjust the border color and thickness */
    padding: 15px; /* Space inside the border */
    border-radius: 8px; /* Rounded corners */
    margin-top: 20px; /* Space above the container */
    background-color: #f9f9f9; /* Background color */
    display: flex; /* Flex layout for vertical alignment */
    flex-direction: column; /* Stack items vertically */
    align-items: center; /* Center align children */
    text-align: center; /* Center text inside */
    width: 100%; /* Full width */
    max-width: 600px; /* Limit max width on larger screens */
    margin-left: auto; /* Center container horizontally */
    margin-right: auto;
}

/* Default flex layout for larger screens */
#venue-details {
    display: flex;
}

/* Adjust flex layout on smaller screens */
@media (max-width: 768px) {
    /* Stack #venue-details content vertically */
    #venue-details {
        display: flex;
        flex-direction: column; /* Stack children in a column */
    }

    /* Make .booking-container take up 90% of viewport width */
    .booking-container {
        width: 100%;
        max-width: 100%; /* Ensure it doesn’t exceed available width */
        margin-left: auto;
        margin-right: auto;
    }

    /* Full width for input on mobile */
    .find-input {
        width: 100% !important;
    }

    /* Center the image and adjust width on smaller screens */
    #venue-image {
        width: 100%; /* Make image full width on mobile */
        margin-top: 20px; /* Add space between content and image */
    }
}


/*************************************************************************************/
/* AFFIRMATIONS STYLING */
/*************************************************************************************/

/* Style for the table */
.affirmations-table {
    width: 100%; /* Full width */
    border-collapse: collapse; /* Remove spacing between cells */
    margin-top: 10px;
}

.affirmations-table td {
    padding: 12px 5px;
    vertical-align: middle; /* Align checkbox vertically center with text */
}

.affirmations-table td:first-child {
    text-align: center; /* Center-align checkbox */
    width: 5%;
}

/*************************************************************************************/
/* SUCCESS MESSAGE STYLING */
/*************************************************************************************/

#booking-message {
    padding: 15px !important;
    border: 2px solid #4CAF50 !important;
    border-radius: 5px !important;
    background-color: #eafaf1 !important;
    color: #0B8935 !important;
    font-family: Arial, sans-serif !important;
    text-align: center !important; /* Centers the text */
    margin: 20px auto !important; /* Centers the box horizontally */
    max-width: 800px !important; /* Optional: Restricts the width of the box */
}

/***********************************************************************************
* VENUE GRID STYLING
*************************************************************************************/
/* Center the form */
#booking-date-selector {
    text-align: center !important;
    margin-bottom: 20px !important;
}

#booking-date-selector label {
    font-size: 16px;
    font-weight: bold;
    margin-right: 10px;
}

#booking-date-selector input[type="date"],
#booking-date-selector button[type="button"],
#booking-date-selector input[type="submit"] {
    padding: 5px 10px !important;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#booking-date-selector input[type="submit"] {
    font-weight: bold;
    color: #fff;
    background-color: #006FE6;
    cursor: pointer;
}
#booking-date-selector input[type="submit"]:hover {
    background-color: #0056b3;
}

#booking-date-selector button[type="button"]{
    font-weight: bold;
    color: #fff;
    background-color: #0B8935;
    cursor: pointer;
}

#booking-date-selector button[type="button"]:hover{
    background-color: #0B8935;
}


/* Style the table */
.booking-grid-table {
    width: 80% !important;
    margin: 0 auto !important; /* Center the table horizontally */
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 16px;
    text-align: center;
}

.booking-grid-table th,
.booking-grid-table td {
    border: 1px solid #dee2e6;
    padding: 10px;
    text-align: center;
    vertical-align: middle;
}

.booking-grid-table thead {
    background-color: #ced0d3;
}

.booking-grid-table tbody td {
    background-color: #ffffff; /*Don't need this if it's white but may want to change later*/
}

/* Style time slots column */
.booking-grid-table tbody td:first-child {
    background-color: #e9ecef; /* Light grey color */
    font-weight: bold;
    color: #272829; /* Darker text for contrast */
}

/* Style N/A cells */
.booking-grid-table .na-cell {
    background-color: #d6d8db; /* Light grey color */
    color: #4A5055; /* Darker grey text */
    font-weight: bold;
}

/* Base tooltip style */
.booking-grid-table td[data-tooltip] {
    position: relative;
    cursor: help;
}

/* Tooltip bubble */
.booking-grid-table td[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%; /* above the cell */
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    background-color: #333;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
    z-index: 10;
    margin-bottom: 5px;
}

/* Show tooltip on hover */
.booking-grid-table td[data-tooltip]:hover::after {
    opacity: 1;
}

/* Style Booked cells */
.booking-grid-table .booked-cell {
    background-color: #f8d7da; /* Light red color */
    color: #721c24; /* Dark red text */
    font-weight: bold;
}

/***********************************************************************************
* RECURRING BOOKING STYLING
*************************************************************************************/

#contact-form-container .info-icon,
#recurrence-details-container .info-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-color: var(--highlighted-button-bg);
    color: #fff;
    text-align: center;
    border-radius: 50%;
    font-size: 12px;
    line-height: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-left: 5px;
    position: relative;
}

#contact-form-container .info-icon::before,
#recurrence-details-container .info-icon::before {
    content: "i";
    display: inline-block;
    font-family: Arial, sans-serif;
}

/* Add margin above the table */
.existing-recurrence-container {
    margin-top: 50px !important;
}

/* Style the table */
#existing-recurrence-container .styled-table {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
    font-size: 14px;
    background-color: #f9f9f9;
    margin: 0 auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#existing-recurrence-container .styled-table thead tr {
    background-color: #4A5055;
    color: #ffffff;
    text-align: left;
}

#existing-recurrence-container .styled-table th, .styled-table td {
    padding: 10px 15px;
    border: 1px solid #ddd;
}

#existing-recurrence-container .styled-table tbody tr {
    transition: background-color 0.2s ease-in-out;
}

/* Add hover effect */
#existing-recurrence-container .styled-table tbody tr:hover {
    background-color: #f1f1f1;
}

/* Center the "View" link */
#existing-recurrence-container .styled-table td:last-child {
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #existing-recurrence-container .styled-table {
        font-size: 12px;
    }
}
