.error {
    color: red;
    display: none;
}

/*HTML Styles*/
h1 {
    text-align: center;
}

h4 {
    text-align: center;
}

table {
    margin: 0 auto;
    text-align: center;
}

table,
th,
td {
    border: 1px solid black;
    padding: 4px;
    width: 350px;
}

/* Form Styles */
form {
    max-width: 300px;
    margin: 0 auto;
}

form p {
    text-align: left;
    margin: 10px 0;
}

/* Keep lesson details centered */
#details {
    text-align: center !important;
    width: 100%;
    max-width: 300px;
}

/* Keep submit button centered */
input[type="submit"] {
    display: block;
    margin: 20px auto;
}

/* Calendar Styles */
.calendar-container {
    margin: 20px 0;
    text-align: center;
}

.calendar-header-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(6, 1fr);
    /* 1 header row + 5 date rows */
    gap: 1px;
    background-color: black;
    width: 350px;
    height: 300px;
    margin: 0 auto;
}

.calendar-header {
    background-color: white;
    padding: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid black;
}

.calendar-day {
    background-color: white;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid black;
    cursor: pointer;
}

.calendar-day.other-month {
    background-color: #f0f0f0;
    color: #999;
}

.calendar-day.today {
    background-color: #4CAF50;
    color: white;
    font-weight: bold;
}

.calendar-day.selected {
    background-color: #4CAF50 !important;
    color: white !important;
    font-weight: bold;
}

.calendar-day.has-booking {
    background-color: #ffeb3b;
    color: black;
    font-weight: bold;
}

.calendar-day.has-3bookings {
    background-color: #ff9d3b;
    color: black;
    font-weight: bold;
}

.calendar-day.disabled {
    background-color: #e0e0e0;
    color: #999;
    cursor: not-allowed !important;
}

.calendar-day.empty {
    background-color: #f9f9f9;
    cursor: default;
}

.invalid-date {
    color: red !important;
}

/* Bookings Display Styles */
.bookings-container {
    margin: 20px auto;
    max-width: 350px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.bookings-container h3 {
    margin-top: 0;
    color: #333;
    text-align: center;
}

.booking-item {
    background-color: white;
    padding: 15px;
    margin: 10px 0;
    border-radius: 5px;
    border-left: 4px solid #4CAF50;
}

.booking-item h4 {
    margin: 0 0 10px 0;
    color: #4CAF50;
}

.booking-item p {
    margin: 5px 0;
}