:root {
    --line: #e5e7eb;
    --muted: #f7f7f7;
    --accent: #0ea5e9;
    --busy: #ef4444;
    --text: #111827;
    --subtext: #6b7280;
    --rowheader-w: 180px;
    --cell-w: 50px;
    --cell-h: 35px;
    --caption-h: 44px;
    --select: #22c55e;
    --bowling-green: #001802;
    --gray-light: #aaaaaa;
    --secondary: #707885;
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
    color: var(--text);
    background: #001802;
}

header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: #001802;
    border-bottom: 1px solid var(--line)
}

.text {
    color: var(--subtext);
}

.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between
}

h1 {
    font-size: 20px;
    margin: 0;
    font-weight: 700
}

.week-range {
    color: var(--subtext);
    font-size: 14px
}

button.btn-outline {
    border: 1px solid var(--line);
    background: #fff
}

button.btn-outline:hover {
    background: var(--muted)
}

.calendar-input {
    border: 1px solid var(--line);
    padding: 8px 10px;
    border-radius: 8px;
    background: #707885;
    font: inherit
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    align-content: start;
    gap: 8px;
    margin-top: 12px;
    overflow: auto;
    padding-bottom: 8px;    
}

.tab {
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    color: white;
    background: var(--secondary);
}

.tab:hover {
    background: var(--gray-light);
}

.tab.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent)
}

.tab .small {
    opacity: .9;
    font-size: 12px
}

.disabled {
    opacity: 0.5;
    pointer-events: none;
    background: #f3f4f6;
    color: #b0b0b0;
    border-color: #e5e7eb;
    cursor: not-allowed;
}   

.tables {
    margin-top: 12px
}

.tbl_horizontal {
    width: 100%;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    margin-bottom: 18px;
    position: relative
}

table.schedule {
    border-collapse: separate;
    border-spacing: 0;
    width: max-content;
    min-width: 100%;
    table-layout: fixed;
    font-size: 14px
}

thead th {
    position: sticky;
    top: var(--caption-h);
    background: #fff;
    z-index: 4;
    border-bottom: 1px solid var(--line);
}

.horizontalRowHeader {
    position: sticky;
    left: 0;
    z-index: 49;
    background: #fff;
    border-right: 1px solid var(--line);
    text-align: center;
    padding: 0 10px;
    width: var(--rowheader-w);
    min-width: var(--rowheader-w)
}

tbody th.horizontalRowHeader {
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 3;
    vertical-align: middle;
    border-bottom: 1px solid var(--line);
    /* continue the row line under the lane header */
}

/* Vertically center the lane label text */
.horizontalRowHeader p {
    margin: 0;
    /* kill default p margins */
    line-height: var(--cell-h);
    /* match the cell height for vertical centering */
}

caption {
    text-align: left;
    padding: 10px 12px;
    font-weight: 600;
    color: var(--subtext);
    position: sticky;
    top: 0;
    z-index: 5;
    background: #fff;
    border-bottom: 1px solid var(--line);
    min-height: var(--caption-h)
}

.heading th {
    position: sticky;
    top: var(--caption-h);
    background: #fff;
    z-index: 4;
    border-bottom: 1px solid var(--line);
    text-align: center;
    font-weight: 600;
    color: var(--subtext);
    min-width: var(--cell-w);
    width: var(--cell-w);
    height: var(--cell-h)
}

.schedule_table_day_header_cell {
    position: sticky;
    left: 0;
    top: var(--caption-h);
    z-index: 51;
    background: #fff;
    text-align: left;
    padding: 0 10px;
    width: var(--rowheader-w);
    min-width: var(--rowheader-w);
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.header_date_part {
    font-weight: 400;
    color: var(--subtext)
}



.lh {
    height: var(--cell-h)
}

.scheduleCell {
    width: var(--cell-w);
    min-width: var(--cell-w);
    height: var(--cell-h);
    border-left: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    text-align: center;
    vertical-align: middle;
    background: #fff;
    cursor: crosshair
}

.read-only .scheduleCell {
    cursor: default
}

.full_hour_horiz {
    background: #fafafa
}

.slot {
    position: relative
}

.reservation {
    position: absolute;
    inset: 2px;
    background: #0ea5e9;
    /*border: 1px solid var(--accent);*/
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #0369a1;
    font-weight: 600
}

/* .reservation.busy {
    background: #ef4444;
    border-color: var(--busy);
    color: #fff
} */

.selected {
    outline: 2px solid var(--select);
    outline-offset: -2px;
    background: rgba(34, 197, 94, .12)
}

.legend {
    display: flex;
    gap: 10px;
    align-items: center;
    color: var(--subtext);
    font-size: 13px;
    margin-top: 8px
}

.legend .dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block
}

.dot-free {
    background: rgba(14, 165, 233, .15);
    border: 1px solid var(--accent)
}

.dot-busy {
    background: rgba(239, 68, 68, .14);
    border: 1px solid #ef4444
}

.day-table {
    display: none
}

.day-table.active {
    display: block
}

.overlay-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2
}

.overlay-layer .reservation {
    pointer-events: auto
}

.reservation {
    position: absolute;
    height: calc(var(--cell-h) - 4px);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    padding: 0 6px
}

.badge-mode {
    font-size: 12px
}

caption {
    position: static;
    top: auto;
    z-index: auto;
}

thead th,
.heading th {
    position: static;
    top: auto;
    z-index: auto;
    background: #fff;
    border-bottom: 1px solid var(--line);
}


.schedule_table_day_header_cell {
    position: static;
    left: auto;
    top: auto;
    z-index: auto;
}

thead th,
.heading th {
    position: static;
}


thead th.schedule_table_day_header_cell {
    position: sticky;
    left: 0;
    top: auto;
    z-index: 10;
    background: #fff;
    border-right: 1px solid var(--line);
    box-shadow: 6px 0 8px rgba(0, 0, 0, .04);
}