/* OCP-00528: optical setup picker in the help pages. */
.setup-picker {
  margin: 0.8rem 0 1rem;
}

.setup-picker-stage {
  position: relative;
  background: #050505;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.setup-slide {
  position: relative;
}

.setup-slide[hidden] {
  display: none;
}

.setup-zoom {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  cursor: zoom-in;
}

.setup-zoom img {
  display: block;
  width: 100%;
  height: auto;
}

.setup-badge {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 900;
  line-height: 1.1;
  pointer-events: none;
}

.setup-badge--beta {
  background: var(--brand-lime);
  color: #050505;
}

.setup-badge--soon {
  background: rgba(5, 5, 5, 0.85);
  border: 1px solid var(--brand-lime);
  color: var(--brand-lime);
}

.setup-badge--consider {
  background: rgba(5, 5, 5, 0.85);
  border: 1px dashed var(--muted);
  color: var(--muted);
}

.setup-picker-nav {
  position: absolute;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-top: -1.375rem;
  padding: 0 0 0.15rem;
  background: rgba(5, 5, 5, 0.72);
  border: 1px solid var(--lime-border);
  border-radius: 50%;
  color: var(--brand-lime);
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.setup-picker-nav:hover,
.setup-picker-nav:focus-visible {
  background: rgba(5, 5, 5, 0.92);
  border-color: var(--brand-lime);
}

.setup-picker-prev {
  left: 0.6rem;
}

.setup-picker-next {
  right: 0.6rem;
}

.setup-caption {
  margin: 0.6rem 0 0;
  text-align: center;
  font-weight: 900;
}

.setup-dots {
  display: flex;
  justify-content: center;
  gap: 0.1rem;
  margin-top: 0.2rem;
}

.setup-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}

.setup-dot::before {
  content: "";
  width: 0.7rem;
  height: 0.7rem;
  border: 1px solid var(--muted);
  border-radius: 50%;
}

.setup-dot[aria-current="true"]::before {
  background: var(--brand-lime);
  border-color: var(--brand-lime);
}

.setup-panel[hidden] {
  display: none;
}

.setup-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow: auto;
  background: rgba(0, 0, 0, 0.94);
  -webkit-overflow-scrolling: touch;
}

.setup-lightbox img {
  display: block;
  width: max(100%, 1000px);
  height: auto;
  margin: 3.5rem 0 1rem;
}

.setup-lightbox-close {
  position: fixed;
  top: 0.6rem;
  right: 0.6rem;
  min-height: 2.75rem;
  padding: 0 1rem;
  background: #1b1b1b;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 900;
  cursor: pointer;
}

@media (max-width: 480px) {
  .setup-badge {
    top: 0.35rem;
    left: 0.35rem;
    padding: 0.2rem 0.5rem;
    font-size: 0.65rem;
  }

  .setup-picker-nav {
    width: 2.25rem;
    height: 2.25rem;
    margin-top: -1.125rem;
    font-size: 1.4rem;
  }

  .setup-picker-prev {
    left: 0.35rem;
  }

  .setup-picker-next {
    right: 0.35rem;
  }
}

/*
 * The page gradient is sized to the whole page, so switching setups (which changes the page
 * height) shifted its colours. Draw it once behind the viewport instead. Old iOS keeps the
 * original page gradient: it cannot draw this layer behind the page.
 */
@supports (inset: 0) {
  body {
    background: #050505;
  }

  body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(140deg, #050505 0%, #2b2b2b 58%, #050505 100%);
    pointer-events: none;
  }
}

/* Old iOS (10) cannot read min() and clamp(), so the logo and headings lose their sizes. */
@supports not (width: min(1px, 2px)) {
  .instructions-shell {
    width: auto;
    max-width: 72rem;
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .brand-mark {
    width: 15rem;
    max-width: 64%;
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 1.6rem;
  }
}

/*
 * Picker arrows are drawn as chevrons: the text characters sit off-centre in the round buttons
 * on old iPads.
 */
.setup-picker-nav {
  padding: 0;
  font-size: 0;
}

.setup-picker-nav::before {
  content: "";
  display: block;
  width: 0.6rem;
  height: 0.6rem;
  border-top: 3px solid var(--brand-lime);
  border-left: 3px solid var(--brand-lime);
}

.setup-picker-prev::before {
  margin-left: 0.2rem;
  -webkit-transform: rotate(-45deg);
  transform: rotate(-45deg);
}

.setup-picker-next::before {
  margin-right: 0.2rem;
  -webkit-transform: rotate(135deg);
  transform: rotate(135deg);
}

/*
 * The header's Close button column used min(), which old iPads ignore, so it stretched into a tall
 * empty box. Give it a plain width and keep it from stretching.
 */
.help-header-actions {
  min-width: 12rem;
  align-self: flex-start;
  align-content: start;
  grid-auto-rows: min-content;
}

.help-close-button {
  height: 2.8rem;
}
