/* Airdate PDF Viewer. Per-instance values arrive as CSS variables on the block (see module.html). */
.airdate-pdf-viewer { --apv-accent: #0F6E5C; --apv-text: #17201D; --apv-muted: #55605C; --apv-panel: #F4F1EA; --apv-line: #DAD5C8; --apv-stage: #E7E3D9; --apv-radius: 12px; --apv-height: 680px;
  color: var(--apv-text); line-height: 1.5; }
.airdate-pdf-viewer [hidden] { display: none; }
:where(.airdate-pdf-viewer > p, .airdate-pdf-viewer__panel > p, .airdate-pdf-viewer__cover > p) { margin: 0; } /* never the form's own paragraphs (consent text) */
.airdate-pdf-viewer__heading { margin: 0 0 .3em; color: inherit; }
.airdate-pdf-viewer__intro { margin-bottom: 1.2em; color: var(--apv-muted); }

.airdate-pdf-viewer__body { display: grid; gap: 16px; }
.airdate-pdf-viewer__viewer { min-width: 0; overflow: hidden; border: 1px solid var(--apv-line); border-radius: var(--apv-radius); background: var(--apv-stage); }

/* Toolbar */
.airdate-pdf-viewer__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; padding: 6px 8px; border-bottom: 1px solid var(--apv-line); background: var(--apv-panel); }
.airdate-pdf-viewer__group { display: flex; align-items: center; gap: 2px; }
.airdate-pdf-viewer__count { min-width: 7.5em; padding: 0 4px; text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; color: var(--apv-muted); white-space: nowrap; }
.airdate-pdf-viewer__tool { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: calc(var(--apv-radius) * .6);
  background: transparent; color: var(--apv-text); cursor: pointer; }
.airdate-pdf-viewer__tool:hover:not(:disabled) { background: var(--apv-line); }
.airdate-pdf-viewer__tool:disabled { opacity: .35; cursor: default; }
.airdate-pdf-viewer__download { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; margin-left: 6px; padding: 0 14px; border: 0; border-radius: calc(var(--apv-radius) * .6);
  background: var(--apv-accent); color: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.airdate-pdf-viewer__download:hover { filter: brightness(1.08); }
:is(.airdate-pdf-viewer__tool, .airdate-pdf-viewer__download, .airdate-pdf-viewer__more, .airdate-pdf-viewer__out):focus-visible { outline: 2px solid var(--apv-accent); outline-offset: 2px; }

/* Pages: the stage scrolls, pages are centered and keep their own proportions; zoomed in, they scroll sideways too */
.airdate-pdf-viewer__stage { position: relative; height: min(var(--apv-height), 85vh); overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
@supports (height: 1svh) { .airdate-pdf-viewer__stage { height: min(var(--apv-height), 85svh); } }
.airdate-pdf-viewer__stage:focus { outline: none; }
.airdate-pdf-viewer__stage:focus-visible { outline: 2px solid var(--apv-accent); outline-offset: -3px; }
.airdate-pdf-viewer__pages { padding: 20px 20px 24px; } /* the side padding follows the width of the viewer (module.js) */
.airdate-pdf-viewer__page { position: relative; max-width: none; margin: 0 auto 16px; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }
.airdate-pdf-viewer__page:focus { outline: none; }
.airdate-pdf-viewer__page:focus-visible { outline: 3px solid var(--apv-accent); outline-offset: 2px; }
.airdate-pdf-viewer__canvas { display: block; width: 100%; height: 100%; }

/* The words of each page, transparent over the drawing (PDF.js text layer) */
.airdate-pdf-viewer__text { position: absolute; inset: 0; overflow: clip; line-height: 1; text-align: initial; -webkit-text-size-adjust: none; text-size-adjust: none; forced-color-adjust: none;
  transform-origin: 0 0; caret-color: CanvasText; z-index: 0; }
.airdate-pdf-viewer__text :is(span, br) { position: absolute; color: transparent; white-space: pre; cursor: text; transform-origin: 0% 0%; }
.airdate-pdf-viewer__text span.markedContent { top: 0; height: 0; }
.airdate-pdf-viewer__text ::selection { background: rgba(0, 90, 255, .25); }
.airdate-pdf-viewer__text br::selection { background: transparent; }

/* After the free pages, while the form is not sent */
.airdate-pdf-viewer__more { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; max-width: 420px; min-height: 48px; margin: 4px auto 0; padding: 10px 18px;
  border: 0; border-radius: 999px; background: var(--apv-text); color: #fff; font: inherit; font-weight: 600; text-align: center; cursor: pointer; }

/* Cover: shown while loading, and as the cover behind the lock when the form comes first */
.airdate-pdf-viewer__cover { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 100%; padding: 20px; box-sizing: border-box; text-align: center; }
.airdate-pdf-viewer__cover-img { display: block; max-width: min(100%, 360px); max-height: calc(min(var(--apv-height), 85vh) - 120px); height: auto; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); background: #fff; }
.airdate-pdf-viewer__loading { color: var(--apv-muted); font-size: 14px; }
.airdate-pdf-viewer__lock { display: none; }
.airdate-pdf-viewer--ready:not(.airdate-pdf-viewer--locked) .airdate-pdf-viewer__cover,
.airdate-pdf-viewer--ready .airdate-pdf-viewer__loading,
.airdate-pdf-viewer:not(.airdate-pdf-viewer--ready) .airdate-pdf-viewer__pages { display: none; }
.airdate-pdf-viewer--failed .airdate-pdf-viewer__loading { display: block; color: var(--apv-text); }
.airdate-pdf-viewer--locked:not(.airdate-pdf-viewer--cover) .airdate-pdf-viewer__cover { display: none; }
.airdate-pdf-viewer--failed .airdate-pdf-viewer__cover { display: flex; }

/* Form first, no free page: the cover beside the form (under it in a narrow column), no toolbar */
.airdate-pdf-viewer--cover:not(.airdate-pdf-viewer--open) .airdate-pdf-viewer__body { display: flex; flex-wrap: wrap; align-items: flex-start; }
.airdate-pdf-viewer--cover:not(.airdate-pdf-viewer--open) .airdate-pdf-viewer__viewer { flex: 1 1 280px; }
.airdate-pdf-viewer--cover:not(.airdate-pdf-viewer--open) .airdate-pdf-viewer__panel { flex: 1 1 300px; box-sizing: border-box; }
.airdate-pdf-viewer--cover:not(.airdate-pdf-viewer--open) :is(.airdate-pdf-viewer__bar, .airdate-pdf-viewer__pages) { display: none; }
.airdate-pdf-viewer--cover:not(.airdate-pdf-viewer--open) .airdate-pdf-viewer__stage { height: auto; overflow: visible; }
/* The lock sits low on the cover, over a soft shade, so the title of the document stays readable */
.airdate-pdf-viewer--cover:not(.airdate-pdf-viewer--open) .airdate-pdf-viewer__lock { position: absolute; inset: auto 0 0; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 48px 16px 28px; font-weight: 600;
  background: linear-gradient(transparent, rgba(0, 0, 0, .45)); border-radius: 0 0 var(--apv-radius) var(--apv-radius); }
.airdate-pdf-viewer--cover:not(.airdate-pdf-viewer--open) .airdate-pdf-viewer__lock span { padding: .3em .75em; border-radius: 999px; background: var(--apv-text); color: #fff; }
.airdate-pdf-viewer__icon { padding: 12px; box-sizing: content-box; border-radius: 50%; background: var(--apv-accent); color: #fff; }

/* Full screen: the viewer fills the screen, the pages take every pixel left by the toolbar */
.airdate-pdf-viewer__viewer:fullscreen { display: flex; flex-direction: column; border: 0; border-radius: 0; }
.airdate-pdf-viewer__viewer:fullscreen .airdate-pdf-viewer__stage { flex: 1 1 auto; height: auto; }

/* Form panel */
.airdate-pdf-viewer__panel { padding: 20px 22px; border: 1px solid var(--apv-line); border-radius: var(--apv-radius); background: var(--apv-panel); min-width: 0; }
.airdate-pdf-viewer__panel:focus { outline: none; }
.airdate-pdf-viewer__panel:focus-visible { outline: 2px solid var(--apv-accent); outline-offset: 3px; }
.airdate-pdf-viewer__panel-heading { font-weight: 700; font-size: 1.125em; }
.airdate-pdf-viewer__panel-text { margin-top: 4px; color: var(--apv-muted); }
.airdate-pdf-viewer__form { margin-top: 14px;
  /* Forms from HubSpot's new editor: no second box inside the panel (their default is a white box with 40 px of padding) */
  --hsf-background__background-color: transparent; --hsf-background__border-width: 0; --hsf-background__padding: 0; }
.airdate-pdf-viewer__form :is(input, select, textarea) { max-width: 100%; box-sizing: border-box; }
.airdate-pdf-viewer__form .hsfc-Step__Banner:empty { display: none; }
/* The form tag prints an empty title heading; some themes (ours included) give .form-title a background and padding, which shows as a blank band above the fields (seen on the HubSpot demo, 09/10, as in Video Library Pro on 04/10) */
.airdate-pdf-viewer__form .form-title:empty { display: none; }
/* Fields of one row share it while each keeps 160 px, and go one under the other below that (a phone, the panel beside
   the cover): new editor (.hsfc-Row) and legacy forms (fieldset.form-columns-2, floated) */
.airdate-pdf-viewer__form .hsfc-Row { display: flex; flex-wrap: wrap; gap: var(--hsf-row__vertical-spacing, 16px) var(--hsf-row__horizontal-spacing, 16px); }
.airdate-pdf-viewer__form .hsfc-Row > * { flex: 1 1 160px; width: auto; min-width: 0; max-width: none; margin-left: 0; margin-right: 0; }
.airdate-pdf-viewer__form .hs-form fieldset { display: flex; flex-wrap: wrap; column-gap: 16px; max-width: none; }
.airdate-pdf-viewer__form .hs-form fieldset::after { content: none; }
.airdate-pdf-viewer__form .hs-form fieldset .hs-form-field { flex: 1 1 160px; float: none; width: auto; min-width: 0; padding-left: 0; padding-right: 0; }
.airdate-pdf-viewer__form .hs-form fieldset > :not(.hs-form-field) { flex: 1 1 100%; }
.airdate-pdf-viewer__form .hs-form .hs-input:not([type="checkbox"]):not([type="radio"]) { width: 100%; }

.airdate-pdf-viewer__out { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: calc(var(--apv-radius) * .7);
  background: var(--apv-accent); color: #fff; font-weight: 600; text-decoration: none; }
.airdate-pdf-viewer__fallback { margin-top: 12px; }
.airdate-pdf-viewer__status:empty { margin: 0; }
.airdate-pdf-viewer__status { margin-top: 12px; color: var(--apv-muted); font-size: 14px; }
.airdate-pdf-viewer__sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.airdate-pdf-viewer__note { margin-top: 12px; padding: .6em .8em; border-left: 3px solid #C98A00; background: #FFF6DB; color: #3D2E00; font-size: 14px; }

@media (max-width: 479px) {
  .airdate-pdf-viewer__page { margin-bottom: 8px; }
  .airdate-pdf-viewer__download span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .airdate-pdf-viewer__download { margin-left: 2px; padding: 0 11px; }
}
