/* Upright phone previews and a focused reader in either screen orientation. */
.pdf-inline-zoom,
.pdf-zoom-hint { display: none; }

.has-inline-zoom .pdf-toolbar { flex-direction: row; gap: 8px 12px; }
.has-inline-zoom .pdf-toolbar-group { width: auto; }
.has-inline-zoom .pdf-control { min-height: 44px; touch-action: manipulation; }
.has-inline-zoom .pdf-inline-zoom {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: center;
}
.has-inline-zoom .pdf-zoom-in,
.has-inline-zoom .pdf-zoom-out { font-size: 21px; line-height: 1; min-width: 44px; }
.has-inline-zoom .pdf-zoom-fit { min-width: 54px; }
.has-inline-zoom .pdf-zoom-value {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 48px;
  text-align: center;
}
.has-inline-zoom .pdf-zoom-hint {
  background: #f2f1ec;
  color: #52615c;
  display: block;
  font-size: 11px;
  line-height: 1.5;
  margin: 0;
  padding: 8px 12px;
  text-align: center;
}
.has-inline-zoom .pdf-stage {
  display: block;
  height: var(--pdf-fit-height, 420px);
  overflow: auto;
  overscroll-behavior: auto;
  padding: 10px;
  touch-action: pan-x pan-y;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}
.has-inline-zoom .pdf-stage:active { cursor: grabbing; }
.has-inline-zoom .pdf-pages {
  margin: 0;
  max-width: none;
  transform: none;
}
.has-inline-zoom .pdf-page canvas,
.has-inline-zoom .pdf-page img { -webkit-user-drag: none; }

.pdf-expand { min-height: 44px; white-space: nowrap; }
.pdf-expand[hidden] { display: none; }

.pdf-reader-dialog {
  background: #f2f1ec;
  border: 0;
  height: 100%;
  height: 100dvh;
  inset: 0;
  margin: 0;
  max-height: none;
  max-width: none;
  overflow: hidden;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  width: 100%;
}
.pdf-reader-dialog::backdrop { background: #303331; }
.pdf-reader-dialog .pdf-frame {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  max-width: none;
  width: 100%;
}
.pdf-reader-dialog .pdf-toolbar,
.pdf-reader-dialog .pdf-zoom-hint { flex-shrink: 0; }
.pdf-reader-dialog .pdf-stage {
  flex: 1;
  height: auto;
  min-height: 0;
  overscroll-behavior: contain;
}
.pdf-reader-dialog .pdf-pages { margin: 0 auto; }
.pdf-reader-dialog .pdf-toolbar { justify-content: space-between; }

@media (max-width: 620px) {
  .has-inline-zoom .pdf-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .has-inline-zoom .pdf-page-navigation { grid-column: 1 / -1; }
  .has-inline-zoom .pdf-inline-zoom { gap: 4px; justify-content: start; }
  .has-inline-zoom .pdf-zoom-value { min-width: 40px; }
  .has-inline-zoom .pdf-zoom-fit { min-width: 44px; padding-inline: 8px; }
  .pdf-expand { font-size: 12px; padding-inline: 9px; }
}

@media (max-width: 360px) {
  .has-inline-zoom .pdf-inline-zoom { grid-column: 1 / -1; justify-content: center; }
  .pdf-expand { grid-column: 1 / -1; }
}

.mobile-returns-shortcut { display: none; }
.returns-welcome { border: 0; padding: 0; }

@media (max-width: 760px), (max-width: 1000px) and (max-height: 500px) and (pointer: coarse) {
  .mobile-returns-shortcut {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    bottom: max(14px, env(safe-area-inset-bottom));
    box-shadow: 0 8px 28px rgba(8, 28, 52, .18);
    display: block;
    left: 50%;
    max-width: 360px;
    padding: 13px 12px 12px;
    position: fixed;
    transform: translateX(-50%);
    width: calc(100% - 28px);
    z-index: 10;
  }
  .returns-shortcut-label {
    color: var(--gold);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .06em;
    margin: 0 32px 12px 0;
    text-transform: uppercase;
  }
  .returns-shortcut-open {
    align-items: center;
    background: var(--navy);
    border: 1px solid var(--navy);
    border-radius: 7px;
    color: var(--white);
    cursor: pointer;
    display: flex;
    font: inherit;
    font-size: 15px;
    font-weight: 750;
    gap: 12px;
    justify-content: space-between;
    min-height: 50px;
    padding: 12px 16px;
    touch-action: manipulation;
    width: 100%;
  }
  .returns-shortcut-open:hover { background: #102d4c; }
  .returns-shortcut-dismiss {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 7px;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    height: 44px;
    justify-content: center;
    padding: 12px;
    position: absolute;
    right: 2px;
    top: 0;
    touch-action: manipulation;
    width: 44px;
  }
  .mobile-returns-shortcut svg,
  .returns-welcome svg { fill: none; flex-shrink: 0; height: 19px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 19px; }
  .returns-shortcut-dismiss svg { height: 16px; width: 16px; }
  .returns-welcome {
    background: var(--paper);
    border-radius: 22px 22px 0 0;
    bottom: 0;
    box-shadow: 0 -8px 30px rgba(8, 28, 52, .2);
    color: var(--ink);
    left: 0;
    margin: auto 0 0;
    max-height: 100%;
    max-height: 100dvh;
    max-width: none;
    overflow: auto;
    position: fixed;
    right: 0;
    top: auto;
    width: 100%;
  }
  .returns-welcome::backdrop { background: rgba(8, 28, 52, .34); }
  .returns-welcome-sheet { margin: 0 auto; max-width: 520px; padding: 28px 24px max(14px, env(safe-area-inset-bottom)); position: relative; }
  .returns-welcome-rule { background: var(--gold); height: 3px; margin-bottom: 16px; width: 32px; }
  .returns-welcome .returns-shortcut-dismiss { right: 8px; top: 8px; }
  .returns-welcome h2 { color: var(--heading-ink); font-size: 30px; font-weight: 400; line-height: 1.05; margin: 0 0 14px; }
  .returns-welcome p { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0 0 20px; }
  .returns-welcome-continue { background: transparent; border: 0; border-radius: 6px; color: var(--muted); cursor: pointer; display: block; font: inherit; font-size: 13px; min-height: 44px; padding: 12px; width: 100%; }
}
