/* style.css
   - Sticky Header + Sticky Time Column (innerhalb Scroll-Wrapper)
   - Nur der Tabellenbereich scrollt
   - Booking blocks + Experience Colors
   - Volle Stunde: 50% größere Schrift
   - Zeitspalte rechts: Border
*/

:root{
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;

  --line: #e5e7eb;
  --line-strong: #cbd5e1;

  --col-sep: #e2e8f0;

  --exp-bg: rgba(47,108,246,0.12);
  --exp-border: rgba(47,108,246,0.35);
}

body { background: var(--bg); color: var(--text); }

/* ===== Legend ===== */
.exp-legend{
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;

  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;

  padding: 10px 12px;
  margin-bottom: 10px;
}

.exp-item{
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;

  border: 1px solid var(--line);
  background: rgba(255,255,255,0.7);
}

.exp-label{
  font-size: 0.85rem;
  color: var(--text);
  white-space: nowrap;
}

.exp-dot{ display:none; }

/* ===== Scroll-Wrapper: nur Tabelle scrollt ===== */
.grid-table-scroll{
  max-height: calc(100vh - 220px);
  overflow-y: auto;
  overflow-x: auto;
  position: relative;
}

/* ===== Table ===== */
.booking-grid{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 0;

  border-collapse: separate;
  border-spacing: 0;
}

.booking-grid th,
.booking-grid td{
  border-color: var(--line) !important;
}

.room-header{
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  background: var(--surface);
}

/* Sticky Header */
.booking-grid thead th{
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface);
  border-bottom: 1px solid var(--line) !important;
}

/* Time column */
.time-col{
  width: 90px;
  min-width: 90px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  background: var(--surface);

  border-right: 2px solid var(--col-sep) !important;
}

/* Sticky first column */
.sticky-col{
  position: sticky;
  left: 0;
  z-index: 11;
  background: var(--surface);
}

/* Corner cell */
.booking-grid thead .time-col{
  z-index: 12;
}

/* Cells */
.grid-cell{
  min-width: 150px;
  height: 44px;
  padding: 6px !important;
  background: var(--surface);
  vertical-align: top;
}

.grid-cell.is-empty{ cursor: pointer; }
.grid-cell.is-empty:hover{ background: rgba(47,108,246,0.04); }

/* Column separator */
.col-sep{
  border-left: 2px solid var(--col-sep) !important;
}

/* full hour thick line */
.booking-grid tbody tr.hour-line td,
.booking-grid tbody tr.hour-line th{
  border-top: 2px solid var(--line-strong) !important;
}

/* full hour time bigger */
.time-hour{
  font-weight: 800;
  color: var(--text);
  font-size: 1.425rem;
}

/* ===== Booking styles ===== */
.booking-block{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 10px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  user-select: none;

  color: var(--text);

  background: var(--exp-bg);
  border: 1px solid var(--exp-border);

  /* optional: leicht größer */
  font-size: 1.15rem;
}

/* chips (kleine) */
.booking-block.booking-chip{
  height: 30px;
  width: 64px;
  max-width: 100%;
  font-size: 1.05rem;
}

/* spanning blocks (rowspan/colspan) */
.booking-block.booking-span{
  width: 100%;
  height: 100%;
  min-height: 32px;
  font-size: 1.35rem;
}

/* multi-chip layout */
.booking-wrap{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-start;
}

/* spanning cells */
.grid-cell.span-cell{
  vertical-align: top;
}

/* big groups marker */
.booking-block.booking-big{
  padding-left: 10px;
}

.booking-block.booking-big::before{
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  border-radius: 10px 0 0 10px;
  background: #111827;
}