/* The Arrange pane (js/arrange.js): scope, layout choices with their miniatures, options, the
   preview bar and pins. Pins on the chart itself are styled in app.css (.node .pin). */

.seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: #fff;
}
.seg button {
  height: 28px;
  border: 0;
  border-radius: 100px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.seg button:hover { color: var(--navy); }
.seg button[aria-pressed="true"] { background: var(--navy); color: var(--white); }
.seg button:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }

.layouts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.layout-choice {
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 10px 4px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-size: 12px;
  color: var(--muted);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.layout-choice:hover { border-color: var(--navy); color: var(--navy); transform: translateY(-1px); }
.layout-choice:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.layout-choice[aria-pressed="true"] { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); color: var(--navy); }
.layout-choice svg { width: 56px; height: 41px; overflow: visible; }
.layout-choice svg circle, .layout-choice svg rect { fill: #fff; stroke: var(--navy); stroke-width: 1.5; }
.layout-choice svg path { fill: none; stroke: var(--wire); stroke-width: 1.3; stroke-linecap: round; }
.layout-choice svg .ghost { fill: none; stroke: var(--line); stroke-dasharray: 2.5 2.5; }
.layout-choice svg .arrow { stroke: var(--blue); stroke-width: 1.6; stroke-linejoin: round; }
.layout-choice[aria-pressed="true"] svg circle:not(.ghost), .layout-choice[aria-pressed="true"] svg rect:not(.ghost) { stroke: var(--blue); }
.layout-hint { font-size: 13px; color: var(--text); margin: 10px 0 0; min-height: 3.9em; }

.arrange-select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 28px 8px 12px;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M0 0h10L5 6z' fill='%23242424'/></svg>") no-repeat right 10px center;
  -webkit-appearance: none; appearance: none;
  outline: none;
}
.arrange-select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--sky); }

/* Sticks to the bottom of the pane while a preview is up, so Apply is always in reach. */
.preview-bar {
  position: sticky;
  bottom: 12px;
  z-index: 2;
  margin: 4px 0 22px;
  padding: 14px 16px 12px;
  border: 1px solid var(--blue);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 14px 34px -16px rgba(36, 36, 36, .35);
  animation: card-in .18s ease;
}
.preview-bar p { margin: 0 0 12px; font-size: 13px; color: var(--navy); }
.preview-actions { display: flex; gap: 8px; margin-bottom: 8px; }
.preview-actions .btn { flex: 1; border-color: var(--line); }
.preview-actions .btn.primary { border-color: var(--navy); }

.pins { padding-top: 18px; border-top: 1px solid var(--line-soft); }
.pins .lab { display: flex; justify-content: space-between; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.pins output { text-transform: none; color: var(--navy); }
.pins-note { margin: 8px 0 12px; }
.pin-actions { display: flex; align-items: center; gap: 14px; }
.pin-actions .btn { border-color: var(--line); }
.pin-actions button:disabled { opacity: .45; cursor: default; }

/* While a layout is previewed, entities cannot be dragged: the pointer says so. */
body.arranging .node { cursor: default; }

/* Pins are an editing aid: presenting and share links never show them. */
body.present .node .pin { display: none; }
