/* Installation thumbnails and their full-size viewer. */
#install-steps { scroll-margin-top: 88px; }
.setup-gallery-hint { margin-top: 10px; color: #565c66; font-size: .875rem; line-height: 1.45; }

.setup-step {
  display: grid;
  grid-template-columns: clamp(108px, 11vw, 148px) minmax(0, 1fr);
  align-items: start;
  gap: 13px;
  min-width: 0;
}

.setup-shot {
  position: relative;
  display: block;
  min-width: 0;
  cursor: zoom-in;
}

.setup-step .setup-shot {
  aspect-ratio: 8 / 5;
  border: 1px solid #d5d7db;
  border-radius: 5px;
  background: #eef0f3;
}

.setup-step .setup-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
}

.setup-shot::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 23px;
  height: 23px;
  border-radius: 4px;
  background: #1c1f25 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='1.3' stroke-linecap='round'%3E%3Ccircle cx='6.5' cy='6.5' r='4'/%3E%3Cpath d='m9.4 9.4 3.2 3.2M4.8 6.5h3.4m-1.7-1.7v3.4'/%3E%3C/svg%3E") center no-repeat;
  pointer-events: none;
}

.setup-shot:hover::after { background-color: var(--scena-action, #a63118); }

:is(.setup-shot, .setup-viewer button):focus-visible {
  outline: 2px solid var(--scena-action, #a63118);
  outline-offset: 3px;
}

@media (max-width: 1023px) {
  .setup-methods { grid-template-columns: minmax(0, 1fr) !important; }
}

@media (max-width: 599px) {
  .setup-step { grid-template-columns: minmax(0, 30%) minmax(0, 1fr); gap: 10px; }
  .setup-shot::after { width: 19px; height: 19px; right: 3px; bottom: 3px; }
}

html:has(.setup-viewer[open]) { overflow: hidden; }

.setup-viewer {
  box-sizing: border-box;
  width: min(1080px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 1px solid #d7d9dd;
  border-radius: 9px;
  background: #fff;
  color: #191b20;
}

.setup-viewer::backdrop { background: rgb(12 15 20 / 82%); }

.setup-viewer-header,
.setup-viewer-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px clamp(10px, 2vw, 22px);
}

.setup-viewer-header p { margin-bottom: 3px; color: #565c66; font-size: .8125rem; }
.setup-viewer-header h2 { font-size: clamp(1rem, 2.3vw, 1.25rem); line-height: 1.25; }

.setup-viewer-stage {
  min-width: 0;
  height: min(70dvh, max(100px, calc(100dvh - 170px)));
  overflow: hidden;
  border-block: 1px solid #dce0e5;
  background: #e8ebef;
  touch-action: pan-y pinch-zoom;
  user-select: none;
}

.setup-viewer-stage img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

.setup-viewer button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #d6d8dd;
  border-radius: 5px;
  background: #fff;
  color: #21252b;
}

.setup-viewer button:hover { background: #eff1f4; }
.setup-viewer button svg { width: 18px; height: 18px; }
.setup-viewer-controls { direction: ltr; }
.setup-viewer-controls output { color: #565c66; font-size: .875rem; font-variant-numeric: tabular-nums; }

@media (max-width: 599px) {
  .setup-viewer-stage { height: min(105vw, 56dvh); }
}
