/* PDS Research Associates v26.5 Guest Access view-only controls.
   These controls deter normal browser Save/Print/context-menu actions.
   They cannot prevent screenshots, screen recording, developer tools, or determined capture. */
body.guest-resource-preview {
  -webkit-user-drag:none;
  user-select:none;
}
body.guest-resource-preview img,
body.guest-resource-preview video,
body.guest-resource-preview audio {
  -webkit-user-drag:none;
  user-drag:none;
}

/* Guest PDF: keep Edge rendering, but place a PDS-owned interaction surface above
   the browser PDF surface so browser-owned Save As / Print context controls are not clickable. */
body.guest-resource-preview .guest-pdf-viewer {
  display:grid !important;
  grid-template-rows:auto minmax(0, 1fr) !important;
  align-items:stretch !important;
  justify-content:stretch !important;
  background:#eef3f8 !important;
}
.guest-pdf-toolbar {
  position:relative;
  z-index:5;
  display:flex;
  align-items:center;
  gap:10px;
  box-sizing:border-box;
  min-height:52px;
  padding:8px 12px;
  border-bottom:1px solid #c8d3df;
  background:#f7f9fc;
  color:#102a43;
  font:600 14px/1.3 Arial,Helvetica,sans-serif;
}
.guest-pdf-page-status {
  min-width:64px;
  text-align:center;
  white-space:nowrap;
}
.guest-pdf-help {
  margin-left:auto;
  color:#486581;
  font-weight:400;
  font-size:12px;
}
.guest-pdf-surface {
  position:relative;
  min-width:0;
  min-height:0;
  overflow:auto !important;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
  background:#fff;
}
.guest-pdf-page-shell {
  position:relative;
  box-sizing:border-box;
  width:100%;
  min-width:100%;
  min-height:0;
  background:#fff;
}
body.guest-resource-preview .guest-pdf-frame {
  position:absolute !important;
  inset:0 !important;
  width:100% !important;
  min-width:100% !important;
  max-width:100% !important;
  height:100% !important;
  min-height:100% !important;
  max-height:none !important;
  pointer-events:none !important;
}
.guest-pdf-shield {
  position:absolute;
  z-index:4;
  inset:0;
  box-sizing:border-box;
  background:transparent;
  cursor:default;
  touch-action:pan-y;
}
.guest-pdf-shield:focus-visible {
  outline:3px solid #2f80ed;
  outline-offset:-3px;
}

/* Guest media uses PDS-owned controls. The native media surface cannot receive
   pointer input, preventing its browser-owned context menu from being invoked. */
body.guest-resource-preview .guest-media-viewer {
  display:grid !important;
  grid-template-rows:minmax(0, 1fr) auto !important;
  align-items:stretch !important;
  justify-content:stretch !important;
  background:#000 !important;
}
.guest-media-surface {
  position:relative;
  min-width:0;
  min-height:0;
  overflow:hidden;
  background:#000;
}
body.guest-resource-preview .guest-media-content {
  pointer-events:none !important;
  user-select:none !important;
}
.guest-media-controls {
  position:relative;
  z-index:5;
  display:grid;
  grid-template-columns:auto minmax(120px, 1fr) auto auto minmax(135px, auto);
  align-items:center;
  gap:10px;
  box-sizing:border-box;
  width:100%;
  min-height:58px;
  padding:9px 12px;
  border-top:1px solid #34495e;
  background:#102a43;
  color:#fff;
  font:600 13px/1.3 Arial,Helvetica,sans-serif;
}
.guest-view-control {
  box-sizing:border-box;
  min-height:36px;
  padding:7px 12px;
  border:1px solid #829ab1;
  border-radius:6px;
  background:#fff;
  color:#102a43;
  font:700 13px/1.2 Arial,Helvetica,sans-serif;
  cursor:pointer;
}
.guest-view-control:hover,
.guest-view-control:focus-visible {
  border-color:#2f80ed;
  outline:2px solid transparent;
  box-shadow:0 0 0 2px rgba(47,128,237,.24);
}
.guest-view-control:disabled {
  opacity:.5;
  cursor:not-allowed;
}
.guest-media-seek,
.guest-media-volume {
  width:100%;
  accent-color:#fff;
}
.guest-media-time {
  min-width:88px;
  text-align:center;
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
}
.guest-media-volume-label {
  display:grid;
  grid-template-columns:auto minmax(72px, 1fr);
  align-items:center;
  gap:7px;
  min-width:135px;
}
body.guest-resource-preview .guest-audio-viewer {
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  background:#eef3f8 !important;
}
.guest-audio-media {
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  opacity:0 !important;
  pointer-events:none !important;
}
.guest-audio-panel {
  box-sizing:border-box;
  width:min(calc(100% - 32px), 900px);
  padding:20px;
  border:1px solid #c8d3df;
  border-radius:12px;
  background:#fff;
  box-shadow:0 12px 32px rgba(16,42,67,.12);
}
.guest-audio-title {
  margin:0 0 12px;
  color:#102a43;
  font:700 18px/1.3 Arial,Helvetica,sans-serif;
}
.guest-audio-panel .guest-media-controls {
  border:0;
  border-radius:8px;
}
body.guest-resource-preview .resource-preview-image {
  pointer-events:none !important;
  user-select:none !important;
}

@media (max-width:760px) {
  .guest-pdf-toolbar {
    flex-wrap:wrap;
  }
  .guest-pdf-help {
    flex-basis:100%;
    margin-left:0;
  }
  .guest-media-controls {
    grid-template-columns:auto minmax(100px, 1fr) auto;
  }
  .guest-media-time {
    grid-column:1 / -1;
    grid-row:2;
    justify-self:center;
  }
  .guest-media-volume-label {
    grid-column:2 / -1;
    grid-row:3;
  }
}

@media print {
  body.guest-resource-preview > *,
  body[data-guest-library] [data-guest-view-dialog][open] > * {
    display:none !important;
  }
  body.guest-resource-preview::before,
  body[data-guest-library] [data-guest-view-dialog][open]::before {
    content:"Printing is not available for Guest Access.";
    display:flex !important;
    position:fixed !important;
    inset:0 !important;
    align-items:center !important;
    justify-content:center !important;
    box-sizing:border-box !important;
    padding:32px !important;
    background:#fff !important;
    color:#102a43 !important;
    font:700 18pt Arial,Helvetica,sans-serif !important;
    text-align:center !important;
  }
}
