/** Version 5.0.11: thesis full-record reader and compact book/thesis reactions. */
.had-thesis-facts[hidden]{display:none!important}
.had-thesis-facts{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  margin:14px 0 18px;
}
.had-thesis-facts>div{
  min-width:0;
  padding:11px 12px;
  border:1px solid #c5d8de;
  background:#eef5f7;
}
.had-thesis-facts>div[hidden]{display:none!important}
.had-thesis-facts .had-thesis-supervision{grid-column:1/-1}
.had-thesis-facts small,.had-thesis-facts b{display:block}
.had-thesis-facts small{
  color:#66828d;
  font:700 8px/1.25 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  letter-spacing:.09em;
}
.had-thesis-facts b{
  margin-top:5px;
  color:#183f4b;
  font-size:11px;
  line-height:1.45;
  overflow-wrap:anywhere;
}

/* Thesis readers now match Journal Papers: cover stays visible, record copy scrolls. */
.had-detail-drawer.is-thesis-full-record .had-drawer-body{
  grid-template-columns:minmax(300px,390px) minmax(0,1fr)!important;
  gap:clamp(24px,3vw,44px)!important;
  align-items:stretch!important;
  overflow:hidden!important;
}
.had-detail-drawer.is-thesis-full-record .had-record-cover{
  position:sticky!important;
  top:0!important;
  align-self:start!important;
  width:100%!important;
  height:clamp(390px,62vh,590px)!important;
  margin:0!important;
  padding:clamp(14px,1.5vw,22px)!important;
  background:#eef5f6!important;
}
.had-detail-drawer.is-thesis-full-record .had-record-cover img{
  inset:0!important;
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:center!important;
  background:#fff!important;
}
.had-detail-drawer.is-thesis-full-record .had-record-copy{
  min-height:0!important;
  max-height:100%!important;
  overflow-y:auto!important;
  overscroll-behavior:contain;
  padding-right:10px!important;
  scrollbar-width:thin;
  scrollbar-color:#13899a #dce8eb;
}
.had-detail-drawer.is-thesis-full-record .had-rich-content,
.had-detail-drawer.is-thesis-full-record .had-record-copy>.had-tag-row,
.had-detail-drawer.is-thesis-full-record [data-had-detail-permalink]{display:none!important}
.had-detail-drawer.is-thesis-full-record [data-had-detail-url].is-disabled{
  opacity:.48;
  cursor:not-allowed;
  pointer-events:none;
  filter:saturate(.45);
}

/* Books keep their existing layout; only the reaction panel adopts publication styling. */
.had-detail-drawer.has-book-reader-reactions .had-blog-popup-engagement{
  display:block;
  margin:16px 0 4px;
  padding:12px 13px;
  border:1px solid #c8dde2;
  border-left:3px solid var(--drawer-accent);
  background:#eef5f7;
  color:#254852;
}
.had-detail-drawer.has-book-reader-reactions .had-blog-popup-comment-total{display:none!important}
.had-detail-drawer.has-book-reader-reactions .had-blog-popup-engagement-head h2{
  margin:3px 0 0;
  font-size:14px;
  color:#173f4b;
}
.had-detail-drawer.has-book-reader-reactions .had-blog-popup-engagement-head small{font-size:8px}
.had-detail-drawer.has-book-reader-reactions .had-blog-reaction-buttons{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:6px;
  margin-top:10px;
}
.had-detail-drawer.has-book-reader-reactions .had-blog-reaction-buttons button{
  min-height:45px;
  padding:7px 8px;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:5px;
}
.had-detail-drawer.has-book-reader-reactions .had-blog-reaction-buttons button>span{font-size:15px}
.had-detail-drawer.has-book-reader-reactions .had-blog-reaction-buttons button>b{font-size:8px;line-height:1.15}
.had-detail-drawer.has-book-reader-reactions .had-blog-reaction-buttons button>em{font-size:8px;min-width:20px;padding:3px 4px}
.had-detail-drawer.has-book-reader-reactions .had-engagement-message{min-height:10px;margin:4px 0 0;font-size:8px}

@media(max-width:900px){
  .had-detail-drawer.is-thesis-full-record .had-drawer-body{display:block!important;overflow:auto!important}
  .had-detail-drawer.is-thesis-full-record .had-record-cover{position:relative!important;width:min(100%,390px)!important;height:min(520px,58vh)!important;margin:0 auto 22px!important}
  .had-detail-drawer.is-thesis-full-record .had-record-copy{max-height:none!important;overflow:visible!important;padding-right:0!important}
}
@media(max-width:600px){
  .had-thesis-facts{grid-template-columns:1fr}
  .had-thesis-facts .had-thesis-supervision{grid-column:auto}
  .had-detail-drawer.has-book-reader-reactions .had-blog-reaction-buttons{grid-template-columns:repeat(2,minmax(0,1fr))}
}
