/* keep your CSS variables for calendar sizing */
:root{
  --border:#e5e7eb;
  --muted:#f6f7f9;
  --sub:#6b7280;

  --cellW: 44px;
  --rowH: 46px;
  --leftW: 140px;
}

/* One scroll: only gridWrap */
html, body { height: 100%; }


.gridWrap{
  overflow: auto;
}

/* Calendar grid */
.grid{ min-width: 980px; }

.gridHeader{
  position: sticky;
  top: 0;
  z-index: 5;
  background:#fff;
  border-bottom:1px solid var(--border);
  display:flex;
}

.leftHead{
  width: var(--leftW);
  min-width: var(--leftW);
  border-right:1px solid var(--border);
  padding:10px 12px;
  position: sticky;
  left: 0;
  z-index: 7;
  background: #fff;
}

.leftHead .t1{ font-size:12px; color:var(--sub); }
.leftHead .t2{ font-size:14px; font-weight:700; }

.daysHead{ display:flex; }
.dayH{
  width: var(--cellW);
  border-right:1px solid var(--border);
  text-align:center;
  padding:8px 2px;
  font-size:12px;
}
.dayH .dow{ color:var(--sub); font-size:11px; }
.dayH.weekend{ background: var(--muted); }
.dayH.today{ background: rgba(37,99,235,.10); }

.roomRow{
  display:flex;
  position:relative;
  height: var(--rowH);
  border-bottom:1px solid var(--border);
}
.roomLeft{
  width: var(--leftW);
  min-width: var(--leftW);
  border-right:1px solid var(--border);
  padding:8px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;

  position: sticky;
  left: 0;
  z-index: 6;
  background: #fff;
}
.roomName{ font-weight:700; font-size:14px; }
.roomId{ font-size:11px; color:var(--sub); margin-top:2px; }

.cells{
  position:relative;
  display:flex;
  height:100%;
}
.cell{
  width: var(--cellW);
  border-right:1px solid var(--border);
  cursor: crosshair;
  background:#fff;
  position:relative;
}
.cell.weekend{ background: var(--muted); }
.cell.sel{ background: rgba(37,99,235,.12); }
.cell.today{ box-shadow: inset 0 0 0 1px rgba(37,99,235,.22); }

/* price in cell */
.cell .cellPrice{
  position:absolute;
  bottom:4px;
  right:6px;
  font-size:11px;
  color: var(--sub);
  user-select:none;
  pointer-events:none;
}

/* Booking bars */
.bars{ position:absolute; inset:0; z-index:2; pointer-events:none; }
.bar{
  position:absolute;
  top:7px;
  height:32px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.08);
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
  overflow:hidden;
  pointer-events:auto;
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:8px;
  padding:0 10px;
  font-size:12px;
  min-width: 14px;

  background: var(--bar-bg, rgba(16,185,129,.15));
  color: var(--bar-fg, #065f46);
  border-color: var(--bar-border, rgba(16,185,129,.25));
}
.bar .name{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width: 180px; font-weight:700; }
.bar .time{ margin-left:auto; opacity:.85; font-size:11px; white-space:nowrap; }
.bar.cancelled{ filter: grayscale(0.4); opacity: .8; }

/* Modals (simple, because app.js controls display) */
.modalBack{
  position:fixed; inset:0;
  background: rgba(0,0,0,.45);
  display:none;
  align-items:center;
  justify-content:center;
  padding:16px;
  z-index: 1050;
}

.modalCard{
  width: min(980px, 100%);
  max-height: 92vh;
  background:#fff;
  border-radius: 16px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  box-shadow: 0 18px 50px rgba(0,0,0,.25);
}

.modalHeader{
  padding:12px 14px;
  border-bottom:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.modalBody{
  padding:14px;
  overflow:auto;       /* vertical scroll works */
}

.modalFooter{
  padding:12px 14px;
  border-top:1px solid var(--border);
  display:flex;
  gap:8px;
  align-items:center;
}

.roomsMulti{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding:10px;
  border:1px solid var(--border);
  border-radius:12px;
  background:#fff;
}
.roomChip{
  display:flex;
  align-items:center;
  gap:8px;
  border:1px solid var(--border);
  border-radius:999px;
  padding:6px 10px;
  cursor:pointer;
  user-select:none;
  font-size:13px;
}
.roomChip input{ transform: translateY(1px); }
.roomChip.sel{ background: rgba(37,99,235,.12); border-color: rgba(37,99,235,.25); }

.totalsBox{
  border:1px solid var(--border);
  border-radius: 12px;
  background: #f8f9fa;
  padding:10px 12px;
}
