/* FG26 abstracts v6.3.0 - viewer-only quality + selectable text update.
   Purpose: open the PDF immediately, without the per-abstract title/speaker
   landing card. The programme layout and every responsive programme rule remain
   in styles-v6-2-6.css and are deliberately untouched. */

/* Normal abstract view: PDF fills all space above the persistent nav. */
.abstract-stage {
  padding: 0;
  overflow: hidden;
  background: #1f1f1f;
}

.abstract-card {
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: #1f1f1f;
}

/* The programme row already identifies the presentation, so don't show the
   variable PDF/metadata title screen before the document. */
.abstract-header {
  display: none;
}

.abstract-content-shell {
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
  margin: 0;
  overflow: hidden;
  border: 0;
  background: #1f1f1f;
}

.abstract-pending {
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
  border: 0;
}

.abstract-pdf,
.abstract-preview {
  width: 100%;
  height: 100%;
}

.abstract-preview {
  padding: 8px;
}

/* Full-screen/clean mode remains the existing v6.2.7 behaviour: a second tap
   hides Previous / Back to list / Next, renders all pages for scrolling and
   leaves the persistent return-to-controls hint visible. */


/* v6.2.9 desktop-only persistent hint: compensate for desktop browser zoom
   so the pill stays one line and approximately the same physical size.
   Hover/fine-pointer gating deliberately leaves phones and tablets unchanged. */
@media (hover: hover) and (pointer: fine) {
  .abstract-viewer.focus-mode .abstract-focus-hint {
    left: 50%;
    right: auto;
    bottom: calc(10px * var(--desktop-hint-scale, 1));
    width: max-content;
    max-width: none;
    white-space: nowrap;
    padding: calc(7px * var(--desktop-hint-scale, 1)) calc(12px * var(--desktop-hint-scale, 1));
    font-size: calc(11px * var(--desktop-hint-scale, 1));
    line-height: 1.15;
    transform: translateX(-50%);
    box-shadow: 0 calc(2px * var(--desktop-hint-scale, 1)) calc(12px * var(--desktop-hint-scale, 1)) rgba(0, 0, 0, .25);
  }
}


/* v6.3.0 HIGH-DPI PDF LAYERS
   The canvas stays the visible source of truth. The page wrapper keeps the
   transparent selectable text layer exactly over the rendered PDF. */
.abstract-page-layer {
  position: relative;
  display: block;
  max-width: 100%;
  height: auto;
  flex: 0 0 auto;
}

.abstract-page-layer > .abstract-page-canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  box-shadow: 0 1px 8px rgba(0,0,0,.18);
}

/* Minimal PDF.js text-layer styling. Text is deliberately transparent so the
   author's PDF appearance cannot change; selection highlighting is visible. */
.abstract-text-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  opacity: 1;
  line-height: 1;
  text-align: initial;
  text-size-adjust: none;
  -webkit-text-size-adjust: none;
  forced-color-adjust: none;
  transform-origin: 0 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.abstract-text-layer :is(span, br) {
  position: absolute;
  color: transparent;
  white-space: pre;
  transform-origin: 0 0;
  cursor: text;
}

.abstract-text-layer .markedContent {
  position: absolute;
  top: 0;
  height: 0;
}

.abstract-text-layer span[role="img"] {
  user-select: none;
  -webkit-user-select: none;
  cursor: default;
}

/* Keep the existing tap-to-enter-full-screen behaviour in the normal viewer.
   Once in the clean reading view, text can be selected/copied normally. */
.abstract-viewer.focus-mode .abstract-text-layer {
  pointer-events: auto;
  user-select: text;
  -webkit-user-select: text;
}

.abstract-text-layer ::selection {
  background: rgba(0, 94, 255, .28);
}
