body {
    margin: 0;
    padding: 0 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: Arial, sans-serif;
}

h1 {
    margin-top: 20px;
    font-size: 1.5rem;
    text-align: center;
}

.instructions {
    width: 100%;
    max-width: 1200px;
    line-height: 1.5;
}

.table-container {
    width: 100%;
    max-width: 1200px;
    overflow-x: auto;
}

table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
}

th,
td {
    padding: 8px;
    border: 1px solid #aaa;
    text-align: center;
    white-space: nowrap;
    font-size: 0.9rem;
}

th {
    position: sticky;
    top: 0;
    z-index: 1;
    background-color: #f2f2f2;
}

.available {
    background-color: #d4edda;
}

.unavailable {
    background-color: #f8d7da;
}

.row-light {
    background-color: #f9f9f9;
}

.row-dark {
    background-color: #fff;
}

.free-label {
    color: #008000;
}

.navigation {
    width: 100%;
    max-width: 1200px;
    margin: 20px 0;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    text-align: center;
}

button {
    padding: 10px 20px;
    border: 0;
    background-color: #007bff;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
}

button:disabled {
    background-color: #ccc;
    cursor: default;
}

.date-form {
    margin: 20px;
    text-align: center;
}

.date-form form {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.date-form input[type="date"] {
    padding: 5px;
    font-size: 16px;
}

.date-form button {
    padding: 5px 10px;
    font-size: 16px;
}

.room-button {
    width: 90%;
    max-width: 220px;
    box-sizing: border-box;
    text-align: center;
}

.room-button.selected {
    background-color: #004aad;
    color: #fff;
    font-weight: bold;
    outline: 3px solid #ffcc00;
    outline-offset: 0;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 768px) {
    h1 {
        font-size: 1.2rem;
    }

    table {
        min-width: unset;
    }

    th,
    td {
        padding: 5px;
        font-size: 0.8rem;
    }

    button {
        padding: 8px 15px;
        font-size: 14px;
    }

    .date-form input[type="date"],
    .date-form button {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1rem;
    }

    th,
    td {
        padding: 4px;
        font-size: 0.7rem;
    }

    button,
    .date-form input[type="date"],
    .date-form button {
        font-size: 12px;
    }

    .navigation {
        align-items: stretch;
    }
}
