.booking-floor-editor,
.booking-floor-map-wrap {
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #f8fafc;
  padding: 1rem;
}
#court-selection,
#restaurant-table-wrap { min-width: 0; }
.booking-floor-editor-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.booking-floor-controls {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(150px, 1.2fr);
  gap: .65rem;
  min-width: min(100%, 340px);
}
.booking-floor-controls input,
.booking-floor-controls select {
  display: block;
  width: 100%;
  margin-top: .25rem;
  border: 1px solid #cbd5e1;
  border-radius: .5rem;
  background: #fff;
  padding: .5rem .65rem;
  font-size: .875rem;
}
.booking-floor-editor-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
  gap: .75rem;
  align-items: start;
}
.booking-floor-item-list {
  display: grid;
  gap: .5rem;
  max-height: 25rem;
  overflow: auto;
}
.booking-floor-item {
  display: flex;
  min-height: 3.25rem;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: .4rem;
  border: 1px solid #cbd5e1;
  border-radius: .75rem;
  background: #fff;
  padding: .5rem .65rem;
  color: #334155;
  text-align: left;
  cursor: grab;
}
.booking-floor-item.is-selected,
.booking-floor-object.is-selected {
  border-color: #4f46e5 !important;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, .23);
}
.booking-floor-item.is-inactive { opacity: .55; }
.booking-floor-item[data-offering-color] { border-color: var(--offering-border); background: var(--offering-bg); color: var(--offering-text); }
.booking-floor-item[data-offering-color] small { color: var(--offering-text); }
.booking-floor-scroll {
  width: 100%;
  max-height: min(70vh, 42rem);
  overflow: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid #dbe3ee;
  border-radius: .8rem;
  background-color: #fff;
  padding: .6rem;
  -webkit-overflow-scrolling: touch;
}
.booking-floor-board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--floor-columns, 10), var(--floor-cell-width, 48px));
  grid-template-rows: repeat(var(--floor-rows, 8), var(--floor-cell-height, 44px));
  gap: 3px;
  width: max-content;
  min-width: max-content;
  touch-action: pan-x pan-y;
}
.booking-floor-board.is-painting { touch-action: none; }
.booking-floor-editor[data-editable="true"] .booking-floor-object { touch-action: none; user-select: none; }
.booking-floor-cell {
  display: block;
  min-width: 0;
  min-height: 0;
  border: 0;
  border-radius: .35rem;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.booking-floor-cell.is-block {
  border: 1px solid #cbd5e1;
  background: repeating-linear-gradient(135deg, #f8fafc 0, #f8fafc 7px, #f1f5f9 7px, #f1f5f9 14px);
}
.booking-floor-cell.is-editing {
  border: 1px dashed #94a3b8;
  background: #fff;
}
.booking-floor-cell.is-editing.is-block { border-style: solid; }
.booking-floor-cell.is-painting-add { outline: 1px solid rgba(79, 70, 229, .38); }
.booking-floor-cell.is-painting-remove { outline: 1px solid rgba(225, 29, 72, .32); }
.booking-floor-cell.is-drop-target { outline: 3px solid #4f46e5; outline-offset: -2px; background-color: #e0e7ff; }
.booking-floor-cell.is-drop-invalid { outline: 3px solid #dc2626; outline-offset: -2px; background-color: #fee2e2; }
.booking-floor-object {
  position: relative;
  z-index: 2;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #c7d2fe;
  border-radius: .65rem;
  background: #eef2ff;
  padding: 2px;
  color: #312e81;
  text-align: center;
  cursor: grab;
  isolation: isolate;
}
.booking-floor-drag-preview {
  position: absolute;
  z-index: 4;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 3px solid #dc2626;
  border-radius: .55rem;
  background: rgba(254, 226, 226, .82);
  color: #7f1d1d;
  opacity: .84;
  pointer-events: none;
}
.booking-floor-drag-preview.is-valid { border-color: #4f46e5; background: rgba(224, 231, 255, .78); color: #312e81; }
.booking-floor-drag-preview .booking-resource-symbol { position: absolute; inset: 0; }
.booking-floor-drag-preview > span:last-child { position: relative; z-index: 1; border-radius: .25rem; background: rgba(255,255,255,.9); padding: .1rem .3rem; font-size: .65rem; font-weight: 800; }
.booking-resource-symbol {
  position: absolute;
  z-index: 0;
  inset: 3px;
  display: grid;
  place-items: center;
  overflow: hidden;
  pointer-events: none;
  color: var(--resource-stroke, #475569);
  opacity: .82;
}
.booking-resource-symbol-art { display: block; width: 100%; height: 100%; }
.booking-floor-object > strong,
.booking-floor-object > small { position: relative; z-index: 1; border-radius: .2rem; background: rgba(255,255,255,.76); padding-inline: .12rem; }
.booking-floor-object.is-unavailable .booking-resource-symbol { opacity: .52; }
.booking-floor-object.is-selected .booking-resource-symbol { opacity: 1; }
.booking-floor-object.is-resize-invalid { outline: 3px solid #dc2626; outline-offset: 2px; }
.booking-floor-selection-count { align-self: center; color: #4338ca; font-size: .75rem; font-weight: 700; }
.booking-floor-object[data-kind="court"] { border-color: #bae6fd; background: #f0f9ff; color: #075985; }
.booking-floor-object[data-kind="room"] { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.booking-floor-object[data-kind="table"] { border-color: #fed7aa; background: #fff7ed; color: #9a3412; }
.booking-floor-object[data-offering-color] {
  border-color: var(--offering-border);
  background: var(--offering-bg);
  color: var(--offering-text);
}
.restaurant-offering-option[data-offering-color] {
  border-color: var(--offering-border);
  background: var(--offering-bg);
  color: var(--offering-text);
}
.restaurant-offering-color-preview,
.restaurant-offering-swatch {
  display: inline-block;
  flex: none;
  width: .9rem;
  height: .9rem;
  border: 1px solid var(--offering-border);
  border-radius: 50%;
  background: var(--offering-accent);
}
.restaurant-offering-color-preview { width: 1.15rem; height: 1.15rem; }
.booking-floor-item[data-offering-color] { border-color: var(--offering-border); background: var(--offering-bg); color: var(--offering-text); }
.restaurant-offering-color-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: .65rem;
}
.booking-offering-color-card {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  border: 1px solid var(--offering-border, #dbe3ee);
  border-radius: .75rem;
  background: var(--offering-bg, #fff);
  padding: .65rem .75rem;
}
.booking-offering-color-info { display: flex; min-width: 0; flex-direction: column; gap: .15rem; }
.booking-offering-color-info strong { overflow: hidden; color: #1e293b; font-size: .875rem; text-overflow: ellipsis; white-space: nowrap; }
.booking-offering-color-info small { color: #64748b; font-size: .75rem; }
.booking-setup .booking-offering-color-picker {
  display: block;
  width: 2.75rem !important;
  min-width: 2.75rem !important;
  max-width: 2.75rem !important;
  height: 2.4rem;
  flex: 0 0 2.75rem !important;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  border-radius: .5rem;
  background: white;
  padding: .2rem;
}
.booking-floor-object[data-shape="round"] { border-radius: 50%; }
.booking-floor-object[data-shape="rectangle"] { border-radius: .45rem; }
.booking-floor-object[data-kind="court"] { border-radius: .65rem; }
.booking-floor-resize-handle { position: absolute; z-index: 5; display: none; border: 1px solid #fff; border-radius: 999px; background: #4f46e5; box-shadow: 0 0 0 1px #4338ca; touch-action: none; }
.booking-floor-object.is-selected .booking-floor-resize-handle { display: block; }
.booking-floor-resize-handle--east { top: 25%; right: 2px; bottom: 25%; width: 8px; cursor: ew-resize; }
.booking-floor-resize-handle--south { right: 25%; bottom: 2px; left: 25%; height: 8px; cursor: ns-resize; }
.booking-floor-resize-handle--corner { right: 2px; bottom: 2px; width: 12px; height: 12px; cursor: nwse-resize; }
.booking-floor-editor-tools,
.booking-floor-zoom-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.booking-floor-properties { min-width: 0; max-height: min(76vh, 54rem); overflow: auto; border: 1px solid #dbe3ee; border-radius: .8rem; background: #fff; padding: .9rem; }
.booking-floor-property-preview { position: relative; display: grid; min-height: 6rem; place-items: center; overflow: hidden; border: 1px solid var(--offering-border, #cbd5e1); border-radius: .75rem; background: var(--offering-bg, #f8fafc); color: var(--offering-text, #334155); }
.booking-floor-property-preview .booking-resource-symbol { position: absolute; inset: .3rem; }
.booking-floor-property-preview strong { position: relative; z-index: 1; max-width: 95%; overflow: hidden; border-radius: .25rem; background: rgba(255,255,255,.92); padding: .15rem .35rem; text-overflow: ellipsis; white-space: nowrap; }
.booking-offering-color-field { display: flex; flex-wrap: wrap; align-items: end; gap: .5rem .8rem; border-top: 1px solid #e2e8f0; padding-top: .75rem; }
.booking-color-input-wrap { display: flex; align-items: center; gap: .6rem; }
.booking-color-input-wrap input[type="color"] { width: 2.75rem !important; min-width: 2.75rem !important; height: 2.4rem; border: 1px solid #cbd5e1; border-radius: .5rem; padding: .2rem; }
.booking-color-input-wrap [data-offering-color-swatch] { display: inline-block; width: 1.4rem; height: 1.4rem; border: 1px solid #64748b; border-radius: 50%; background: var(--offering-swatch, #64748b); }
.booking-floor-tool-button,
.booking-floor-zoom-button { min-height: 2.35rem; border: 1px solid #cbd5e1; border-radius: .55rem; background: #fff; padding: .35rem .6rem; color: #334155; font-size: .75rem; font-weight: 700; }
.booking-floor-tool-button[aria-pressed="true"] { border-color: #4f46e5; background: #eef2ff; color: #3730a3; }
.booking-floor-tool-button:disabled,
.booking-floor-zoom-button:disabled { cursor: not-allowed; opacity: .45; }
.booking-floor-tool-button[hidden] { display: none !important; }
.booking-floor-dimension-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.booking-floor-dimension-count { min-width: 5.6rem; color: #64748b; font-size: .7rem; text-align: center; }
.booking-floor-zoom-label { min-width: 2.8rem; color: #475569; font-size: .75rem; font-weight: 700; text-align: center; }
.booking-floor-resize-controls { display: flex; flex-wrap: wrap; gap: .65rem; }
.booking-floor-resize-controls[hidden] { display: none !important; }
.booking-floor-resize-controls label { display: grid; gap: .2rem; color: #475569; font-size: .75rem; font-weight: 600; }
.booking-floor-resize-controls input { width: 5rem; border: 1px solid #cbd5e1; border-radius: .5rem; padding: .4rem .5rem; }
.booking-floor-object.is-inactive { opacity: .45; filter: grayscale(1); }
.booking-floor-object strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  font-size: .65rem;
  line-height: .85rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.booking-floor-object small { display: block; font-size: .57rem; line-height: .75rem; white-space: nowrap; }
.booking-floor-board.is-compact-zoom .booking-floor-object > small { display: none; }
.booking-floor-empty {
  grid-column: 1 / -1;
  align-self: center;
  padding: .75rem;
  color: #64748b;
  font-size: .875rem;
}
.booking-floor-map-controls {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: .75rem;
}
.booking-floor-map-floor {
  min-height: 2.75rem;
  border: 1px solid #cbd5e1;
  border-radius: .65rem;
  background: #fff;
  padding: .5rem .8rem;
  color: #334155;
  font-size: .875rem;
  font-weight: 600;
}
.booking-floor-map-floor[aria-pressed="true"] {
  border-color: #4f46e5;
  background: #eef2ff;
  color: #3730a3;
}
.restaurant-offering-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: .65rem;
}
.restaurant-offering-option {
  display: flex;
  min-width: 0;
  min-height: 3.75rem;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: .25rem;
  border: 1px solid #cbd5e1;
  border-radius: .75rem;
  background: #fff;
  padding: .7rem .85rem;
  color: #334155;
  text-align: left;
}
.restaurant-offering-option:hover { border-color: var(--offering-accent, #fb923c); }
.restaurant-offering-option:focus-visible { outline: 2px solid #ea580c; outline-offset: 2px; }
.restaurant-offering-option[aria-pressed="true"] {
  border-color: var(--offering-accent, #ea580c);
  background: var(--offering-bg, #fff7ed);
  color: var(--offering-text, #9a3412);
  box-shadow: 0 0 0 2px var(--offering-border, rgba(234, 88, 12, .16));
}
.restaurant-offering-option strong { font-size: .9rem; line-height: 1.2rem; }
.restaurant-offering-option span { color: #64748b; font-size: .75rem; line-height: 1rem; }
.restaurant-offering-title { display: flex; align-items: center; gap: .5rem; }
.restaurant-offering-option[aria-pressed="true"] span { color: var(--offering-text, #9a3412); }
.booking-floor-object.is-unavailable {
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
  opacity: .62;
}
.booking-floor-object[data-offering-color].is-unavailable {
  border-color: var(--offering-border);
  background: var(--offering-muted-bg);
  color: var(--offering-text);
  opacity: .82;
}
.booking-floor-object.is-available { cursor: pointer; }
.booking-floor-object.is-switchable { cursor: pointer; border-style: dashed; }
.booking-floor-object.is-switchable:hover { filter: brightness(.96); }
.booking-floor-object.is-switchable:focus-visible { outline: 3px solid #4f46e5; outline-offset: 2px; }
.owner-occupancy-object { cursor: pointer !important; }
.owner-occupancy-object.is-free:not([data-offering-color]) { border-color: #86efac; background: #f0fdf4; color: #166534; }
.owner-occupancy-object.is-free[data-offering-color] { border-color: var(--offering-border); background: var(--offering-bg); color: var(--offering-text); }
.owner-occupancy-object.is-booked { border-width: 2px; }
.owner-occupancy-object.is-awaiting-payment { border-style: dashed; border-color: #ca8a04; }
.owner-occupancy-object.is-requested { border-style: dashed; border-color: #d97706; }
.owner-occupancy-object.is-reserved { border-color: #ea580c; }
.owner-occupancy-object.is-checked-in { border-style: double; border-color: #7c3aed; }
.owner-occupancy-object.is-room-assignment-needed { border: 2px dotted #b45309; }
.owner-occupancy-object.is-held { border: 2px dashed #d97706; background: #fef3c7; color: #92400e; }
.owner-occupancy-object.is-held[data-offering-color] { background: var(--offering-bg); color: var(--offering-text); }
.owner-occupancy-object.is-disabled { border-color: #64748b; background: #e2e8f0; color: #475569; filter: grayscale(.8); }
.owner-occupancy-object.is-disabled[data-offering-color] { background: var(--offering-muted-bg); color: var(--offering-text); }
.owner-occupancy-object.is-booked small:last-child { font-weight: 700; text-transform: capitalize; }
.owner-occupancy-object.is-selected { box-shadow: 0 0 0 3px rgba(99, 102, 241, .28); }
.booking-floor-object[aria-pressed="true"] {
  border: 2px solid #0f172a;
  background: var(--offering-bg, #ffedd5);
  color: var(--offering-text, #9a3412);
  box-shadow: 0 0 0 2px rgba(15, 23, 42, .2), inset 0 0 0 1px var(--offering-accent, #ea580c);
}
.booking-floor-legend { display: flex; flex-wrap: wrap; gap: .75rem; color: #475569; font-size: .75rem; }
.booking-floor-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.booking-floor-legend i { display: inline-block; width: .7rem; height: .7rem; border: 1px solid #cbd5e1; border-radius: 50%; background: #fff7ed; }
.booking-floor-legend i.is-offering-color { border-color: var(--offering-border); background: var(--offering-accent); }
.booking-floor-legend .is-unavailable { background: #f1f5f9; }
.booking-floor-legend .is-selected { border: 2px solid #0f172a; background: #e2e8f0; }
@media (max-width: 640px) {
  .booking-floor-scroll { max-height: min(64vh, 30rem); }
  .booking-floor-editor, .booking-floor-map-wrap { padding: .75rem; }
  .booking-floor-editor-heading { display: block; }
  .booking-floor-controls { grid-template-columns: minmax(0, 1fr); min-width: 0; margin-top: .85rem; }
  .booking-floor-editor-body { grid-template-columns: minmax(0, 1fr); }
  .booking-floor-properties { max-height: 42vh; }
  .booking-floor-item { min-height: 2.9rem; padding: .4rem; font-size: .75rem; }
  .booking-floor-editor-tools { align-items: stretch; }
  .booking-floor-tool-button { flex: 1 1 auto; }
  .booking-floor-zoom-controls { justify-content: flex-start; }
}
