/* Completed booking row */
    .booking-completed {
        background: #f1f1f1 !important;
        opacity: 0.65;
    }

    .booking-completed input,
    .booking-completed select {
        pointer-events: none;
        background: #e9e9e9;
    }

    .booking-completed .save-booking-btn {
        opacity: 0.5;
        cursor: not-allowed;
    }

    /* Booking filters - desktop in columns, mobile stacked */
    .booking-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* Make all filters consistent */
.booking-filters select,
.booking-filters input[type="date"] {
    height: 40px;
    padding: 0 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
}

/* ?? Make search wider + priority */
#filter-search {
    flex: 2;              /* takes more space than others */
    width:100%;
    /* height: 40px; */
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #bbb;
    font-size: 14px;
}

/* Optional: make others smaller */
.booking-filters select {
    flex: 1;
    min-width: 150px;
}

/* Optional: date inputs smaller */
.booking-filters label {
    display: flex;
    align-items: center;
    gap: 5px;
}

.notes-short,
.notes-full {
    display: block;
}
.booking-filters input[type="date"] {
    min-width: 140px;
}
		
		.booking-table-wrapper {
    width: 100%;
    overflow: auto;
    height: 75vh;

    contain: layout paint;
    will-change: scroll-position;
}

.spa-table {
    width: 100% !important; /* Makes the table expand to fit all columns */
    border-collapse: collapse;
	font-size:12px;
	font-weight:bold;
}

.spa-table th,
.spa-table td {
    padding: 8px 12px;
    text-align: left;
    white-space: nowrap; /* Prevent text wrapping */
}
		.scroll-top-wrapper {
    overflow-x: auto;
    height: 16px; /* scrollbar height */
}



.booking-table-wrapper {
    overflow-x: auto;
}

/* Sync scroll positions */
.scroll-top-wrapper::-webkit-scrollbar {
    height: 8px;
}
		.booking-table-wrapper {
    scroll-snap-type: x mandatory;
}

.spa-table th, .spa-table td {
    scroll-snap-align: start;
}
		.scroll-top-wrapper {
    overflow-x: auto;
    height: 16px; /* scrollbar height */
}

.scroll-top {
    width: 100%; /* will be updated dynamically via JS */
    height: 1px;
}
		body[data-booking-mode="confirmed_default"] tr.is-completed {
    display: none;
}

.booking-reminder {
    max-width: 700px;
    margin: 10px auto 20px;
    padding: 12px 16px;
    background: #fff8e5;
    border-left: 5px solid #f0ad4e;
    color: #6b4f00;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
    animation: reminderPulse 2s infinite;
}

@keyframes reminderPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(240,173,78,0);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 15px rgba(240,173,78,.45);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(240,173,78,0);
    }
}

/* FILTER WRAPPER */
.spa-booking-filters {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
    align-items: start;
}

/* FILTER GROUP */
.filter-group {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
}

/* LABEL */
.filter-group label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
}

/* INPUTS + SELECTS */
.filter-group select,
.filter-group input[type="text"],
.filter-group input[type="date"] {
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    box-sizing: border-box;
}

/* HELP TEXT */
.filter-help {
    margin-top: 5px;
    font-size: 11px;
    color: #777;
    line-height: 1.4;
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    .spa-booking-filters {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .spa-booking-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .spa-booking-filters {
        grid-template-columns: 1fr;
    }
}

.top-scroll {
    height: 1px;
    width: 100%; /* JS will set exact width */
}

.booking-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border-left: 1px solid #CCC;
}

/* IMPORTANT FIX */
.spa-table {
    width: 100%;
    min-width: 1200px; /* ensures horizontal scroll instead of broken layout */
    border-collapse: collapse;
    font-size: 12px;
    font-weight: bold;
    table-layout: fixed; /* KEY FIX */
}

.spa-table th,
.spa-table td {
    padding: 8px 12px;
    text-align: left;
	white-space: normal;
    vertical-align: top;
    overflow: hidden;
    text-overflow: ellipsis;
}
		
		.spa-table th:nth-child(1),
.spa-table td:nth-child(1) { width: 120px; } /* Location */

.spa-table th:nth-child(2),
.spa-table td:nth-child(2) { width: 140px; } /* Customer */

.spa-table th:nth-child(3),
.spa-table td:nth-child(3) { width: 120px; } /* Phone */

.spa-table th:nth-child(4),
.spa-table td:nth-child(4) { width: 150px; } /* Service */

.spa-table th:nth-child(5),
.spa-table td:nth-child(5) { width: 130px; } /* Therapist */

.spa-table th:nth-child(6),
.spa-table td:nth-child(6) { width: 90px; }  /* Party */

.spa-table th:nth-child(7),
.spa-table td:nth-child(7) { width: 150px; } /* Date */

.spa-table th:nth-child(8),
.spa-table td:nth-child(8) { width: 100px; } /* Status */

.spa-table th:nth-child(9),
.spa-table td:nth-child(9) { width: 250px; } /* NOTES FIX */

.spa-table th:nth-child(10),
.spa-table td:nth-child(10) { width: 180px; } /* Reason */

.spa-table th:nth-child(11),
.spa-table td:nth-child(11) { width: 140px; } /* Assigned */

.spa-table th:nth-child(12),
.spa-table td:nth-child(12) { width: 120px; } /* Action */
.spa-table th:nth-child(13),
.spa-table td:nth-child(13) { width: 120px; } /* Action */
		.spa-table th:nth-child(14),
.spa-table td:nth-child(14) { width: 160px; } /* Action */

#booking-edit-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    display: none;
    z-index: 9999;

    /* ? allow full screen scroll fallback */
    overflow-y: auto;
}

#booking-edit-modal .modal-overlay {
    position: absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background: rgba(0,0,0,0.6);
}

#booking-edit-modal .modal-content {
    position: relative;
    max-width: 500px;

    /* ? better vertical spacing */
    margin: 40px auto;

    background: #fff;
    padding: 20px;
    border-radius: 8px;

    /* ? THIS FIXES YOUR ISSUE */
    max-height: 90vh;
    overflow-y: auto;

    /* optional polish */
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
		#booking-view-mode .view-content p {
    margin: 6px 0;
    font-size: 14px;
}
#booking-view-mode strong {
    display: inline-block;
    width: 140px;
}
.booking-edit-note{
    margin:10px 0 18px;
    padding:10px 14px;
    background:#fff8e5;
    border-left:4px solid #f0ad4e;
    border-radius:4px;
    font-size:13px;
    color:#6b5200;
    line-height:1.5;
}

.booking-edit-note strong{
    color:#8a5a00;
}

#booking-edit-form label{
display:block;
margin-bottom:10px;
font-weight:600;
}

#booking-edit-form input,
#booking-edit-form select{
width:100%;
padding:6px;
margin-top:4px;
}
	#booking-view-mode,
#booking-edit-mode {
    display:none;
}
	.view-content p {text-align:left !important;}
	.view-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.view-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 8px;
    border-bottom: 1px solid #eee;
}

.view-row .label {
    font-weight: 700;
    color: #444;
    width: 140px;
}

.view-row .value {
    flex: 1;
    text-align: right;
    color: #111;
}

.view-row.highlight {
    background: #fff7f7;
    border-left: 3px solid #b44446;
    padding-left: 10px;
}