/* ĐĂNG KÝ PHÒNG HỌC CSS */

.page-title-bar {
    background-color: #9cd2fd;
    color: var(--primary-blue);
    padding: 12px;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    border-top: 1px solid var(--container-border);
    border-bottom: 2px solid var(--container-border);
    letter-spacing: 0.5px;
}

.booking-container {
    background-color: #ffffff;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.booking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background-color: #ffffff;
}

.booking-title {
    font-size: 18px;
    font-weight: 700;
    color: #212529;
}

.status-legend {
    display: flex;
    gap: 20px;
    font-size: 14px;
    font-weight: 600;
}

.mobile-legend {
    display: none;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-block;
}

.status-empty {
    background-color: #81abd6; /* Blueish color from image */
}

.status-busy {
    background-color: #d1d5db; /* Gray color from image */
}

.status-my-booked {
    background-color: #0ea5a8;
}

.booking-main-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 5px; /* Minimal gap between sidebar and content */
    background-color: #f0f7fc; /* Small gap color */
    flex: 1;
}

/* Sidebar Styling */
.booking-sidebar {
    background-color: #ffffff;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-right: 1px solid #e0e0e0;
}

.sidebar-block {
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 15px 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.block-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 5px;
}

.input-field {
    position: relative;
    width: 100%;
}

.input-field select, 
.input-field textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #a0a0a0;
    border-radius: 8px;
    font-size: 15px;
    appearance: none; /* Remove default arrow */
    background-color: #ffffff;
    color: #333;
}

.field-arrow {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #666;
    font-size: 12px;
}

.textarea-field textarea {
    height: 100px;
    resize: none;
}

.btn-submit-booking {
    background-color: #0b5aa9;
    color: #ffffff;
    border: none;
    border-radius: 50px;
    padding: 15px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
    margin-top: auto; /* Push to bottom */
}

.btn-submit-booking:hover {
    background-color: #1976d2;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.25);
}

.btn-my-room-bookings {
    display: block;
    text-align: center;
    text-decoration: none;
    background-color: #0f766e;
    color: #ffffff;
    border-radius: 50px;
    padding: 13px;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.2s;
}

.btn-my-room-bookings:hover {
    background-color: #115e59;
    transform: translateY(-1px);
}

/* Content / Table Styling */
.booking-content {
    background-color: #ffffff;
    padding: 20px;
}

.timetable-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.timetable {
    width: 100%;
    border-collapse: collapse;
}

.timetable th {
    padding: 10px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.timetable td {
    padding: 5px;
    text-align: center;
}

.time-label {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    white-space: nowrap;
    text-align: left !important;
    padding-right: 15px !important;
}

.slot-btn {
    width: 100%;
    max-width: 90px;
    height: 38px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s;
}

.slot-btn:hover {
    transform: scale(1.05);
}

.slot-btn.empty {
    background-color: #81abd6;
    color: #ffffff;
}

.slot-btn.empty.selected {
    background-color: #16a34a;
    color: #ffffff;
}

.slot-btn.busy {
    background-color: #d1d5db;
    color: #212529;
}

.slot-btn.my-booked {
    background-color: #0ea5a8;
    color: #ffffff;
}

.row-divider td {
    height: 40px;
}

/* Responsive */
@media (max-width: 992px) {
    .booking-main-layout {
        grid-template-columns: 1fr;
    }
    .booking-sidebar {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
}

@media (max-width: 600px) {
    .booking-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .page-title-bar {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .booking-main-layout {
        display: flex;
        flex-direction: column;
        gap: 12px;
        background-color: #ffffff;
    }

    /* Flatten sidebar children so we can place action buttons at the end on mobile */
    .booking-sidebar {
        display: contents;
    }

    .booking-sidebar .sidebar-block {
        order: 1;
        margin: 0 12px;
        background-color: #ffffff;
    }

    .booking-content {
        order: 2;
        margin: 0 12px;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        background-color: #ffffff;
        padding: 12px;
    }

    .header-legend {
        display: none;
    }

    .mobile-legend {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 10px;
        font-size: 13px;
    }

    .mobile-legend .status-dot {
        width: 22px;
        height: 22px;
    }

    .btn-submit-booking {
        order: 3;
        margin: 0 12px;
    }

    .btn-my-room-bookings {
        order: 4;
        margin: 0 12px 12px 12px;
    }

    .timetable {
        table-layout: fixed;
        min-width: 0;
    }

    .timetable th {
        padding: 6px 4px;
        font-size: 12px;
    }

    .timetable td {
        padding: 4px 3px;
    }

    .time-label {
        font-size: 12px;
        padding-right: 8px !important;
    }

    .slot-btn {
        max-width: 58px;
        height: 34px;
        font-size: 12px;
        border-radius: 7px;
        padding: 0;
    }
}

