/*
 * Restaurant R7 — the floor plan (views-floor.js, views-floor-editor.js, floor-html.js). The till's CSP forbids a style
 * attribute, so an area's grid and a table's place are classes: `cols-N` and `rows-N` draw the canvas (4..60), `gx-N`
 * and `gy-N` put a table's corner (0-based), `gw-N` and `gh-N` span it (1..10). The canvas is its own dir="ltr" box, so
 * the plan matches the room. Every colour is a token (tokens.css, with its dark values); a status is said in words on
 * the tile too (never colour alone); spacing is logical; every table is at least 44 px.
 */

.floor-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-2);
}

.floor-areas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-block: var(--s-2);
}

.floor-area {
  min-block-size: 44px;
  padding-inline: var(--s-3);
  border: 1px solid var(--line-control);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink);
}

.floor-area--on {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.floor-canvas {
  display: grid;
  gap: var(--s-1);
  padding: var(--s-2);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface-2);
  overflow-x: auto;
}

.ftable {
  min-block-size: 44px;
  min-inline-size: 44px;
  display: grid;
  align-content: center;
  justify-items: center;
  /* browser drive defect 9: an occupied tile's four lines (code, state, seats, minutes) fit a two-row tile — tight
     lines and no gap between them, so nothing spills over the tile's edge */
  gap: 0;
  line-height: 1.2;
  padding: var(--s-1);
  border: 2px solid var(--line-control);
  border-radius: var(--r-control);
  background: var(--surface);
  color: var(--ink);
}

.ftable--available {
  border-color: var(--good);
  background: var(--good-bg);
}

.ftable--occupied {
  border-color: var(--warn);
  background: var(--warn-bg);
}

.ftable--chosen {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.shape--round {
  border-radius: 50%;
}

.shape--booth,
.shape--majlis {
  border-radius: var(--r-sheet);
}

.ftable__code {
  font-size: var(--t-title);
}

.ftable__status,
.ftable__meta,
.ftable__time {
  font-size: var(--t-meta);
}

.floor-chosen {
  display: grid;
  gap: var(--s-2);
  margin-block-start: var(--s-3);
  padding: var(--s-3);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
}

.floor-arealist {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--s-2);
}

.fe-moves {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}
