/* Look ▾ (look.js): a column of rows (Edges, See-through, Cut with its axis, flip and position
   controls) in the toolbar popover; the toolbar button shows the accent while any is on. */
.look-pop {
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  width: 260px;
  padding: 8px;
}

.look-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.look-row[hidden] {
  display: none;
}

.look-row + .look-row {
  padding-top: 6px;
  border-top: 1px solid var(--sv-border);
}

.look-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 32px;
  padding: 0 4px;
  cursor: pointer;
}

.look-switch input,
.look-cut__pos input {
  margin: 0;
  accent-color: var(--sv-accent);
  cursor: pointer;
}

.look-cut__tools {
  display: flex;
  gap: 6px;
}

.look-cut__axes {
  display: flex;
  flex: 1;
  gap: 2px;
}

#viewer .look-cut__axes button {
  flex: 1;
  padding: 0;
}

.look-cut__pos {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
  color: var(--sv-muted);
  font-size: 12px;
}

.look-cut__pos input {
  flex: 1;
  min-width: 0;
  height: 24px;
}

.look-cut__pos output {
  width: 3.5em;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Cut off: its axis tools stay usable (a pick turns it on) but read as secondary; the position
   text keeps full contrast. */
.look-row.is-off .look-cut__tools {
  opacity: 0.6;
}

#viewer .sv-dock #look-btn.is-on {
  color: var(--sv-accent);
  background: var(--sv-accent-soft);
}

/* 44px touch targets. */
@media (pointer: coarse) {
  .look-switch {
    min-height: 44px;
  }

  #viewer .look-cut__tools button {
    min-height: 44px;
  }

  .look-cut__pos input {
    height: 44px;
  }
}

/* Phones: as wide as the screen allows, above the toolbar's centre (dock.css). */
@media (max-width: 760px), (max-width: 1023px) and (max-height: 520px) and (min-aspect-ratio: 301/200) {
  .look-pop {
    width: min(320px, calc(100vw - 24px));
  }
}
