/**
 * TMU PDF.js galley viewer shell — aligned with y2026_ojstmu site identity.
 * Palette: #1e4f9e / #163d7a / #0d3475 / #edf5fd
 */

:root {
  --tmu-galley-jvc: #1e4f9e;
  --tmu-galley-jvc-dark: #163d7a;
  --tmu-galley-ink: #0d3475;
  --tmu-galley-cream: #edf5fd;
  --tmu-galley-slate: #1f2937;
  --tmu-galley-header-h: 4rem;
}

html,
body.ojs-galley-view-page {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: Inter, "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  background: #f8fafc;
  color: var(--tmu-galley-slate);
}

.pkp_screen_reader {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.header_view,
.tmu-galley-header {
  z-index: 30;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem 1rem;
  justify-content: space-between;
  min-height: var(--tmu-galley-header-h);
  padding: 0.65rem 1rem 0.65rem 0.85rem;
  background: #fff;
  border-bottom: 1px solid #dbe3f0;
  box-shadow: 0 4px 18px rgba(13, 52, 117, 0.08);
}

.tmu-galley-header__brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 0 0 auto;
  min-width: 0;
}

.tmu-galley-header .return {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  border: 1px solid #d0dced;
  background: var(--tmu-galley-cream);
  color: var(--tmu-galley-ink);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tmu-galley-header .return::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: translateX(1px) rotate(45deg);
}

.tmu-galley-header .return:hover,
.tmu-galley-header .return:focus {
  background: var(--tmu-galley-jvc);
  border-color: var(--tmu-galley-jvc);
  color: #fff;
}

.tmu-galley-header__logo {
  display: none;
  height: 40px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}

.tmu-galley-header .title {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.15rem;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 0.25rem;
  text-decoration: none;
  color: inherit;
}

.tmu-galley-header .title:hover .tmu-galley-article,
.tmu-galley-header .title:focus .tmu-galley-article {
  color: var(--tmu-galley-jvc);
}

.tmu-galley-header .tmu-galley-journal {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tmu-galley-jvc);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tmu-galley-header .tmu-galley-article {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--tmu-galley-slate);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.tmu-galley-header .download {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.5rem;
  padding: 0 1.1rem;
  border-radius: 0.5rem;
  background: var(--tmu-galley-jvc);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  box-shadow: 0 2px 8px rgba(30, 79, 158, 0.25);
  transition: background 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.tmu-galley-header .download:hover,
.tmu-galley-header .download:focus {
  background: var(--tmu-galley-jvc-dark);
  color: #fff;
  box-shadow: 0 4px 12px rgba(22, 61, 122, 0.3);
}

.tmu-galley-header .download::before {
  content: none;
}

.galley_view {
  position: absolute;
  top: var(--tmu-galley-header-h);
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  background: #e8eef7;
}

.galley_view iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #e8eef7;
}

.galley_view .galley_view_notice {
  position: absolute;
  top: 0;
  width: 100%;
  height: 3rem;
  background: #b91c1c;
  z-index: 5;
}

.galley_view .galley_view_notice_message {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-weight: 700;
  text-align: center;
}

.galley_view .galley_view_notice_message a {
  color: #fff;
  text-decoration: underline;
}

@media (min-width: 768px) {
  .header_view,
  .tmu-galley-header {
    padding: 0.65rem 1.35rem 0.65rem 1rem;
    gap: 1rem;
  }

  .tmu-galley-header__logo {
    display: block;
  }

  .tmu-galley-header .tmu-galley-journal {
    font-size: 0.72rem;
  }

  .tmu-galley-header .tmu-galley-article {
    font-size: 1rem;
  }
}

@media (max-width: 767px) {
  .tmu-galley-header .download {
    width: 2.5rem;
    padding: 0;
  }

  .tmu-galley-header .download .label {
    display: none;
  }

  .tmu-galley-header .download::after {
    content: "\2193";
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
  }
}
