.utm-koha{font:inherit;max-width:100%;margin:1rem 0}.utm-koha *{box-sizing:border-box}.utm-koha-heading{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1rem}.utm-koha-heading h2{margin:0;font-size:clamp(1.25rem,2vw,1.75rem)}.utm-koha-nav{display:flex;gap:.45rem}.utm-koha-nav button{appearance:none;background:#fff;color:#123c5a;border:1px solid #c8d4dc;border-radius:99px;width:2.6rem;height:2.6rem;cursor:pointer;font-size:1.2rem}.utm-koha-nav button:hover,.utm-koha-nav button:focus-visible{outline:2px solid #1764a5;outline-offset:2px}.utm-koha-track{display:flex;gap:1rem;overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:smooth;padding:.4rem .2rem 1rem;scrollbar-width:thin}.utm-koha-card{flex:0 0 clamp(145px,20%,205px);scroll-snap-align:start;min-width:0;padding:0 0 .4rem}.utm-koha-card a{display:block;text-decoration:none;color:inherit}.utm-koha-cover{aspect-ratio:2/3;display:grid;place-items:center;border-radius:.55rem;background:linear-gradient(155deg,#dcebf4,#9dbccf);border:1px solid #ccdce6}.utm-koha-book-icon{font-size:3rem}.utm-koha-title{font-size:.95rem;line-height:1.45;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;margin-top:.7rem}.utm-koha-author{font-size:.85rem;color:#526575;margin:.3rem 0}.utm-koha-year{font-size:.8rem;color:#526575}@media(max-width:600px){.utm-koha-card{flex-basis:46%}}@media(prefers-reduced-motion:reduce){.utm-koha-track{scroll-behavior:auto}}

.utm-koha-cover-img{display:block;width:100%;height:100%;object-fit:cover;border-radius:.55rem}
.utm-koha-cover{overflow:hidden}
.utm-koha-card a:focus-visible{outline:2px solid #1764a5;outline-offset:3px;border-radius:.55rem}
/* v1.2.2: local default cover remains visible if third-party cover is unavailable */
.utm-koha-cover{position:relative;overflow:hidden;background:#787576}
.utm-koha-default-cover{display:block;width:100%;height:100%;object-fit:cover;border-radius:.55rem}
.utm-koha-external-cover{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:#fff}
.utm-koha-external-cover.utm-koha-cover-failed{display:none}

/* Compact 400 x 270 px carousel; standard layout remains unchanged. */
.utm-koha.utm-koha-compact{width:400px;max-width:100%;height:270px;margin:0;overflow:hidden;font:inherit}
.utm-koha-compact .utm-koha-track{height:270px;gap:12px;overflow-x:auto;overflow-y:hidden;padding:0 0 4px;scroll-snap-type:x mandatory;scrollbar-width:none}
.utm-koha-compact .utm-koha-track::-webkit-scrollbar{display:none}
.utm-koha-compact .utm-koha-card{flex:0 0 calc((100% - 12px) / 2);height:263px;padding:0;overflow:hidden}
.utm-koha-compact .utm-koha-card a{display:block;height:100%;text-decoration:none}
.utm-koha-compact .utm-koha-cover{height:202px;aspect-ratio:auto;border-radius:6px;background:#777;overflow:hidden}
.utm-koha-compact .utm-koha-default-cover,.utm-koha-compact .utm-koha-external-cover{border-radius:6px;object-fit:contain}
.utm-koha-compact .utm-koha-title{font-size:13px;line-height:1.3;letter-spacing:0;font-weight:600;margin-top:7px;max-height:51px;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow-wrap:anywhere}
.utm-koha-compact .utm-koha-card a:focus-visible{outline-offset:-2px}

/* v1.2.6: Preserve the full user-supplied placeholder within compact covers.
   WordPress/Divi may apply global img rules; target placeholder with stronger specificity. */
.utm-koha.utm-koha-compact .utm-koha-cover {
  background-color: #777576;
  display: flex;
  align-items: center;
  justify-content: center;
}
.utm-koha.utm-koha-compact .utm-koha-cover > img.utm-koha-default-cover {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  min-width: 0 !important;
  object-fit: contain !important;
  object-position: center center !important;
  border-radius: 6px;
  flex: 0 0 auto;
}
/* External book jackets may still fill the card, independently of the placeholder. */
.utm-koha.utm-koha-compact .utm-koha-cover > img.utm-koha-external-cover {
  object-fit: contain !important;
  object-position: center center !important;
}
