/* Timeline Container Styles */
.timeline-container {
    display: flex;
    flex-direction: column;
    margin-top: 20px;
    position: relative;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 2px solid #ccc;
    background-color: #f9f9f9;
    position: relative;
    z-index: 10;
    width: 1733px;
}

.hour-block {
    display: flex;
    
    text-align: center;
    border-right: 1px solid #ddd;
    width: 90px;
    padding: 5px;
    font-weight: bold;
    color: #555;
}

.quarter-hour {
    border-top: 1px dashed #ddd;
    height: 15px;
    pointer-events: none;
}

/* Table Row Styles */
.table-row {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    margin-bottom: 5px;
    position: relative;
    width: 1733px;
}

.table-name {
    width: 200px;
    padding: 10px;
    background-color: #f4f4f4;
    font-weight: bold;
    z-index: 5;
}

.time-slot {
    flex-grow: 1;
    border-left: 1px solid #ddd;
    min-width: 15px;
    height: 40px;
    background-color: #fff;
    position: relative;
}

/* Reservation Styles */
.reservation {
    background-color: #ffdd57;
    padding: 5px;
    border-radius: 3px;
    cursor: grab;
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: absolute;
    z-index: 20;
    left: 0;
    top: 0;
    height: 30px;
        margin-left: 221px;
    /* Ensures the reservation spans the correct row height */
}

/* Adjust reservation width based on duration */
.reservation[data-duration] {
    width: calc(var(--slot-width, 25px) * (var(--duration-in-slots, 1)));
}

.reservation.dragging {
    opacity: 0.5;
    border: 1px dashed #333;
}

/* Draggable Overlay Styles */
.drag-overlay {
    position: absolute;
    background-color: rgba(0, 123, 255, 0.2);
    z-index: 15;
    pointer-events: none;
}

/* Utility Classes */
.hidden {
    display: none;
}

#prevDay,
#nextDay {
    padding: 10px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    cursor: pointer;
    margin: 5px;
    border-radius: 5px;
}

#prevDay:hover,
#nextDay:hover {
    background-color: #0056b3;
}

#datePicker {
    padding: 8px;
    margin-left: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {

    .timeline-header,
    .table-row {
        flex-direction: column;
    }

    .table-name {
        width: 100%;
        text-align: center;
    }

    .time-slot {
        width: 100%;
        height: 30px;
    }
}

.closed-hour {
    background-color: #e0e0e0;
}

.closed-slot {
    background-color: #f0f0f0;
    opacity: 0.5;
}