/* Tory Channel EIDOS viewer host — banner + full-bleed iframe + disclaimer modal. */

:root {
  --banner-h: 52px;
  --mdc: #0b1f2a;
  --mdc-accent: #1f78b4;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  height: 100dvh; /* mobile: track the visible viewport as the URL bar collapses */
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--mdc);
  color: #fff;
}

#banner {
  height: var(--banner-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  background: var(--mdc);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

#mdc-logo { height: 30px; display: block; }

#banner-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.2px;
  white-space: nowrap;
  /* Shrink + ellipsise instead of forcing the banner (and the page) wider
     than the viewport — the un-shrinkable flex row was overflowing on
     narrow screens, leaving the viewport-width iframe covering only part
     of the horizontally-scrollable page. */
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

#banner-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.banner-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
}
.banner-btn:hover { background: rgba(255, 255, 255, 0.12); }

#oceanum-link { font-size: 12px; color: rgba(255, 255, 255, 0.8); text-decoration: none; }
#oceanum-link:hover { color: #fff; }

/* Full title by default; swap to the short variant once the banner gets
   tight (the ellipsis on #banner-title remains as a last resort). */
.title-short { display: none; }

@media (max-width: 640px) {
  .title-full { display: none; }
  .title-short { display: inline; }
}

/* The link is the first thing to go: only show it when the full title fits
   cleanly beside it (full banner needs ~620px with the link present). */
@media (max-width: 700px) {
  #oceanum-link { display: none; }
}

@media (max-width: 480px) {
  #mdc-logo { height: 24px; }
}

#viewer-wrap {
  position: absolute;
  top: var(--banner-h);
  left: 0;
  right: 0;
  bottom: 0;
}

#eidos {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ── Disclaimer modal ── */
#disclaimer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
#disclaimer-overlay[hidden] { display: none; }

#disclaimer-dialog {
  background: #fff;
  color: #1a1a1a;
  width: min(760px, 92vw);
  max-height: 86vh;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#disclaimer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #e5e5e5;
}
#disclaimer-header h2 { margin: 0; font-size: 18px; }

#disclaimer-close {
  background: none;
  border: 0;
  font-size: 18px;
  cursor: pointer;
  color: #555;
  line-height: 1;
}

#disclaimer-body {
  padding: 16px 22px 22px;
  overflow-y: auto;
  font-size: 13.5px;
  line-height: 1.5;
}
#disclaimer-body h3 { font-size: 14.5px; margin: 18px 0 6px; }
#disclaimer-body p { margin: 6px 0; }
#disclaimer-body ul { margin: 6px 0; padding-left: 20px; }
#disclaimer-body a { color: var(--mdc-accent); }

#disclaimer-footer {
  display: flex;
  justify-content: flex-end;
  padding: 12px 22px;
  border-top: 1px solid #e5e5e5;
}

#disclaimer-agree {
  background: var(--mdc-accent);
  border: 1px solid var(--mdc-accent);
  color: #fff;
  border-radius: 4px;
  padding: 8px 22px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
#disclaimer-agree:hover { filter: brightness(1.08); }
#disclaimer-agree[hidden] { display: none; }
#disclaimer-close[hidden] { display: none; }
