.selectMove {
  /* overflow handled by .space-grid-scroll so the legend stays visible */
}

.space-grid-scroll {
  overflow: auto;
}
.space-selection {
  border: 1px solid #e7e7e7;
  background: #f5f5f5;
  padding: 20px;
  min-width: 50vw;
}
@media (max-width : 768px) {
  min-width: 80vw;
}
.container {
  margin: 150px auto;
}
.space-selection {
  margin: 10px auto;
  width: 950px;
}
.space-selection * {
  padding: 0;
  margin: 0;
}
.space-selection .space-area {
  text-align: center;
}
.space-selection .space-area .space-area-desc {
  line-height: 20px;
}
.space-selection .space-row-space {
  display: inline-block;
  border: 1px solid transparent;
  text-align: center;
  width: 26px;
  height: 26px;
  margin: 2px;
  vertical-align: -webkit-baseline-middle;
  border-radius: 3px;
}

.space-selection .space-row-space span {
  display: block;
  width: 18px;
  height: 18px;
  margin: 3px;
  background: #b9b9b9;
  border-radius: 3px;
  border: 1px solid #fff;
  transition: background-color 120ms ease;
}


.space-selection-info {
  margin-bottom: 12px;
}

.space-selection-counter {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #1a56db;
  color: #fff;
  border-radius: 999px;
  padding: 5px 16px 5px 12px;
  font-size: 0.85em;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.space-counter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  background: #fff;
  color: #1a56db;
  border-radius: 999px;
  font-size: 0.95em;
  font-weight: 700;
  padding: 0 5px;
}

.space-selection-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.space-selection-list li {
  background: #eff6ff;
  border: 1px solid #93c5fd;
  border-radius: 5px;
  padding: 3px 10px;
  font-size: 0.82em;
  color: #1e40af;
  white-space: nowrap;
}

.space-track-bar {
  position: relative;
  margin: 12px auto 0;
  width: 100%;
  aspect-ratio: 680 / 110;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
}

.space-track-bar--left {
  background-image: url('../images/drag-strip-left-start.svg');
}

.space-track-bar--right {
  background-image: url('../images/drag-strip-right-start.svg');
}

.space-track-bar-name {
  color: #fff;
  font-weight: 700;
  font-size: clamp(0.65em, 2vw, 1em);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.95), 0 0 12px rgba(0, 0, 0, 0.7);
}

.space-selection .space-row-space.is-space {
  border-color: #8a8a8a;
  background-color: #fafafa;
  box-shadow: 0 0 10px #d3d3d3;
}

/* Not available (sold, held, reserved, etc.) — a real seat that can't be booked */
.space-selection .space-row-space.is-space:not(.can-select) {
  cursor: not-allowed;
}
.space-selection .space-row-space.is-space:not(.can-select) span {
  background: repeating-linear-gradient(
    -45deg,
    #c4c4c4 0,
    #c4c4c4 2px,
    #e4e4e4 2px,
    #e4e4e4 6px
  );
}

.space-selection .space-row-space.not-a-space {
  background-color: inherit !important;
}

.space-selection .space-row-space.not-a-space span {
  display: none;
}

.space-selection .space-row-space.can-select {
  background-color: #fff;
  cursor: pointer;
}
.space-selection .space-row-space.can-select span {
  background-color: #fff;
  font-size: 0.8em;
}

.space-selection .space-row-space.current-selected.can-select span {
  background-color: #41db41;
}
.space-selection .space-row-space.current-selected.can-select:hover span {
  background-color: #41db41;
}
.space-selection .space-row-space.can-select:hover span {
  background-color: #dcdcdc;
}
.space-selection .row-indicator {
  margin-right: 10px;
  color: green;
}
.space-selection .track-screen {
  width: 100%;
  text-align: center;
  margin: 40px 0px 15px 0px;
  font-size: 0.8em;
  color: #626573;
  box-shadow: inset 0px 7px 12px 0px #9c9c9c;
}
.space-selection .layout-action-btn {
  padding: 5px 20px;
  color: #fff;
  cursor: pointer;
  background-color: burlywood;
  border: 1px solid #e7e7e7;
  box-shadow: 0px 2px 5px 0px #2b2b2b;
  border-radius: 2px;
}
.space-selection .layout-action-btn[disabled] {
  box-shadow: none;
  background-color: #b1b1b1 !important;
  border-color: #828282 !important;
  cursor: not-allowed;
}
.space-selection .layout-action-btn.layout-btn-done {
  border: 1px solid #7ca07d;
  background-color: #228b22;
}

.set_msg .alert-success::before {
  display: none !important;
}
.set_msg .alert-dismissible {
  padding-right: 2rem !important;
}
#tooltip {
  text-align: left;
  color: #1a202c;
  background: #fff;
  border: 1px solid #d1d5db;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
  position: absolute;
  border-radius: 6px;
  z-index: 1000;
  padding: 10px 14px;
  font-size: 0.8125rem;
  line-height: 1.65;
  pointer-events: auto;
}

#tooltip a {
  color: #2563eb;
  text-decoration: underline;
}

#tooltip a:hover {
  color: #1d4ed8;
}

/* Triangle — ::before is the border layer, ::after is the white fill on top. */
#tooltip::before,
#tooltip::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  position: absolute;
  left: 50%;
  margin-left: -10px;
}

#tooltip::before {
  border-top: 10px solid #d1d5db;
  bottom: -11px;
}

#tooltip::after {
  border-top: 10px solid #fff;
  bottom: -10px;
}

#tooltip.top::before {
  border-top: none;
  border-bottom: 10px solid #d1d5db;
  top: -11px;
  bottom: auto;
}

#tooltip.top::after {
  border-top: none;
  border-bottom: 10px solid #fff;
  top: -10px;
  bottom: auto;
}

#tooltip.left::before,
#tooltip.left::after {
  left: 12px;
  margin: 0;
}

#tooltip.right::before,
#tooltip.right::after {
  right: 12px;
  left: auto;
  margin: 0;
}
.space-selection-legend {
  margin: 1.5rem auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
}

.space-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875em;
}

.space-color {
  display: inline-block;
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.space-color::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: #fff;
  border-radius: 1px;
}

/* State legend — solid-fill swatches, one per event space state. */
.space-state-legend {
  margin: 0.75rem auto 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
}

.space-state-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875em;
}

.space-state-color {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}
