/* Version 4.5.3: complete thesis-cover presentation. */

.had-detail-drawer.is-thesis-record .had-drawer-body {
  grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
  align-items: start;
}

.had-detail-drawer.is-thesis-record .had-record-cover {
  width: 100%;
  height: 430px;
  padding: 12px;
  border: 1px solid #a9cbd2;
  background: #eef5f6;
  box-shadow: 0 18px 38px rgba(0, 28, 40, .16);
}

.had-detail-drawer.is-thesis-record .had-record-cover:before {
  inset: 11px;
  border-color: rgba(2, 125, 143, .24);
  pointer-events: none;
}

.had-detail-drawer.is-thesis-record .had-record-cover img {
  inset: 12px;
  width: calc(100% - 24px);
  height: calc(100% - 24px);
  object-fit: contain;
  object-position: center;
  background: #fff;
}

.had-detail-drawer.is-thesis-record .had-record-cover img:not([hidden]) ~ span,
.had-detail-drawer.is-thesis-record .had-record-cover img:not([hidden]) ~ b,
.had-detail-drawer.is-thesis-record .had-record-cover img:not([hidden]) ~ em,
.had-detail-drawer.is-thesis-record .had-record-cover img:not([hidden]) ~ i {
  display: none;
}

/* The full record reader already uses object-fit: contain; this keeps portrait
   thesis covers at a readable width without stretching them. */
body.had-unified-record-reader .had-v450-record-article[data-had-record-type="theses"] .had-v450-record-hero {
  width: min(100%, 760px);
  min-height: min(66vh, 620px);
  padding: clamp(14px, 2vw, 26px);
  background: #f3f8f9;
}

body.had-unified-record-reader .had-v450-record-article[data-had-record-type="theses"] .had-v450-record-hero img {
  width: auto;
  max-width: 100%;
  max-height: min(66vh, 620px);
  object-fit: contain;
}

@media (max-width: 760px) {
  .had-detail-drawer.is-thesis-record .had-drawer-body {
    display: block;
  }

  .had-detail-drawer.is-thesis-record .had-record-cover {
    width: min(310px, 100%);
    height: min(430px, 64vh);
    margin: 0 auto 22px;
  }
}
