/* Sponsored book placements share the same creative in the article and editor preview. */
.book-ad-slot { scroll-margin-top: 115px; }
.book-ad-slot[hidden] { display: none; }
.book-ad a:focus-visible {
  outline: 3px solid #ee9f22;
  outline-offset: 3px;
}
.book-ad {
  width: 100%;
  max-width: 728px;
  margin: 20px auto 24px;
  scroll-margin: 120px;
  font: 14px/1.35 system-ui, sans-serif;
}
.book-ad-label {
  margin-bottom: 5px;
  color: var(--muted, #5d6764);
  font-size: 11px;
  text-align: center;
}
.book-ad-frame {
  color: #182440;
  background: #fff;
  border: 1px solid #cdd5e2;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 17px;
  min-height: 96px;
}
.book-ad-art {
  position: relative;
  min-height: 94px;
  align-self: stretch;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 68% 26%, #b9ddff, #78b2ff 59%, #669fff);
}
.book-ad-art img {
  position: absolute;
  inset: 0;
  padding: 6px 10px;
  width: 100%;
  height: 100%;
  background: #9cccff;
  object-fit: contain;
}
.book-ad-copy {
  min-width: 0;
  padding: 7px 0;
}
.book-ad-merchant {
  color: #56637a;
  font-size: 12px;
}
.book-ad-title {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  color: #182440;
  font: 750 clamp(17px, 2.5vw, 23px)/1.24 "Mukta Malar", system-ui, sans-serif;
}
.book-ad .book-ad-buy {
  margin-right: 16px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 38px;
  border-radius: 4px;
  text-decoration: none;
  white-space: nowrap;
  background: #164cb4;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
}
.book-ad .book-ad-buy:hover { background: #113985; }
.book-ad-share {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 11px;
  margin-top: 7px;
  color: var(--muted, #5d6764);
  font-size: 11px;
}
.book-ad-share a { text-decoration: underline; text-underline-offset: 2px; }
.book-ad.book-ad--sidebar { max-width: 300px; margin-top: 0; }
.book-ad--sidebar .book-ad-frame {
  grid-template-columns: 1fr;
  grid-template-rows: 123px auto auto;
  min-height: 250px;
  text-align: center;
}
.book-ad--sidebar .book-ad-copy { padding: 5px 10px 0; }
.book-ad--sidebar .book-ad-title { font-size: 20px; }
.book-ad--sidebar .book-ad-buy { margin: 5px auto 12px; }
@media (max-width: 540px) {
  .book-ad:not(.book-ad--sidebar) .book-ad-frame {
    grid-template-columns: 86px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 13px;
    min-height: 104px;
  }
  .book-ad:not(.book-ad--sidebar) .book-ad-art { grid-row: span 2; min-height: 102px; }
  .book-ad:not(.book-ad--sidebar) .book-ad-copy { align-self: end; padding-top: 8px; padding-bottom: 4px; }
  .book-ad:not(.book-ad--sidebar) .book-ad-buy {
    justify-self: start;
    align-self: start;
    min-height: 34px;
    margin-bottom: 8px;
    padding: 6px 9px;
    font-size: 12px;
  }
}

.book-ad-editor-preview .book-ad { margin: 10px auto; }
.book-ad-editor-preview .book-ad-buy { pointer-events: none; }
.book-ad-editor-placements { flex-wrap: wrap; }
.book-ad-editor-placements span { padding: 0 12px; }

@media print { .book-ad-slot { display: none; } }
