/* v2.8: page number restored, mobile width within content, book protrudes more. */
.sidk-bookpills,
.wpb_wrapper > .sidk-bookpills {
  display: flex;
  box-sizing: border-box;
  align-items: center;
  max-width: 100%;
  margin: 48px 0 40px;
  padding: 0;
  overflow: visible;
}

.sidk-bookpills .sidk-bookpill,
.sidk-bookpills .sidk-bookpill:link,
.sidk-bookpills .sidk-bookpill:visited {
  position: relative;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  gap: 10px;
  width: 380px;
  max-width: 100%;
  min-height: 58px;
  padding: 10px 18px 10px 98px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  color: var(--sidk-bookpill-fg, #fff);
  background: var(--sidk-bookpill-bg, #37312e);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 400;
  text-align: left;
  text-decoration: none !important;
  box-shadow: none;
  overflow: visible;
  transition: filter 160ms ease;
}

.sidk-bookpills .sidk-bookpill:hover,
.sidk-bookpills .sidk-bookpill:focus-visible {
  color: var(--sidk-bookpill-fg, #fff);
  filter: brightness(1.08);
  text-decoration: none !important;
}

.sidk-bookpills .sidk-bookpill:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.sidk-bookpills .sidk-bookpill__image-wrap {
  position: absolute;
  display: block;
  left: 8px;
  bottom: -2px;
  width: 90px;
  height: 108px;
  line-height: 0;
  margin: 0;
  padding: 0;
  overflow: visible;
  pointer-events: none;
}

.sidk-bookpills .sidk-bookpill img.sidk-bookpill__image {
  display: block;
  width: 90px !important;
  height: 108px !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain;
  object-position: center bottom;
  margin: 0 !important;
  padding: 0 !important;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none !important;
}

.sidk-bookpills .sidk-bookpill__label {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  font-size: inherit;
  line-height: inherit;
  white-space: normal;
  overflow-wrap: break-word;
}
.sidk-bookpills .sidk-bookpill__label strong {
  font-weight: 700;
  color: inherit;
  white-space: nowrap;
}
.sidk-bookpills .sidk-bookpill__divider {
  opacity: .78;
}
.sidk-bookpills .sidk-bookpill__arrow {
  display: block;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  margin: 0 0 0 auto;
  padding: 0;
}

@media (max-width: 767px) {
  .sidk-bookpills,
  .wpb_wrapper > .sidk-bookpills {
    width: 100%;
    max-width: 100%;
    margin-top: 46px;
    margin-bottom: 34px;
    margin-left: 0;
    margin-right: 0;
  }
  .sidk-bookpills .sidk-bookpill,
  .sidk-bookpills .sidk-bookpill:link,
  .sidk-bookpills .sidk-bookpill:visited {
    width: 100%;
    max-width: 100%;
    min-height: 58px;
    padding: 10px 16px 10px 88px;
    gap: 8px;
    font-size: 15px;
  }
  .sidk-bookpills .sidk-bookpill__image-wrap {
    left: 7px;
    bottom: -2px;
    width: 86px;
    height: 104px;
  }
  .sidk-bookpills .sidk-bookpill img.sidk-bookpill__image {
    width: 86px !important;
    height: 104px !important;
  }
}

@media (max-width: 420px) {
  .sidk-bookpills .sidk-bookpill,
  .sidk-bookpills .sidk-bookpill:link,
  .sidk-bookpills .sidk-bookpill:visited {
    font-size: 13px;
    padding-right: 14px;
  }
  .sidk-bookpills .sidk-bookpill__arrow {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sidk-bookpills .sidk-bookpill { transition: none; }
}

/*
 * v2.8.0: Salient's first main WPBakery photo gets a CSS slot at first paint.
 * The stylesheet is enqueued ONLY when this post has a valid book + page.
 * The slot remains the same size when JS adds the absolutely positioned pill.
 * This target matches the exact recipe hierarchy from the user's Inspector:
 * .post-content > .wpb_row:first-child ... .wpb_wrapper > .img-with-animation-wrap
 */
:is(.post-content > .content-inner > .wpb_row:first-child, .post-content > .wpb_row:first-child) .wpb_wrapper > .img-with-animation-wrap,
:is(.post-content > .content-inner > .wpb_row:first-child, .post-content > .wpb_row:first-child) .wpb_wrapper > .wpb_single_image {
  --sidk-pill-slot-height: 150px;
  --sidk-pill-slot-bottom: 40px;
  position: relative;
  padding-bottom: var(--sidk-pill-slot-height) !important;
  overflow: visible;
}

:is(.post-content > .content-inner > .wpb_row:first-child, .post-content > .wpb_row:first-child) .wpb_wrapper > .img-with-animation-wrap > .sidk-bookpills,
:is(.post-content > .content-inner > .wpb_row:first-child, .post-content > .wpb_row:first-child) .wpb_wrapper > .wpb_single_image > .sidk-bookpills {
  position: absolute !important;
  left: 0;
  right: 0;
  bottom: var(--sidk-pill-slot-bottom);
  width: 100%;
  max-width: 100%;
  margin: 0 !important;
  padding: 0;
  z-index: 5;
}

@media (max-width: 767px) {
  :is(.post-content > .content-inner > .wpb_row:first-child, .post-content > .wpb_row:first-child) .wpb_wrapper > .img-with-animation-wrap,
  :is(.post-content > .content-inner > .wpb_row:first-child, .post-content > .wpb_row:first-child) .wpb_wrapper > .wpb_single_image {
    --sidk-pill-slot-height: 154px;
    --sidk-pill-slot-bottom: 34px;
  }
}

@media (max-width: 359px) {
  :is(.post-content > .content-inner > .wpb_row:first-child, .post-content > .wpb_row:first-child) .wpb_wrapper > .img-with-animation-wrap,
  :is(.post-content > .content-inner > .wpb_row:first-child, .post-content > .wpb_row:first-child) .wpb_wrapper > .wpb_single_image {
    --sidk-pill-slot-height: 170px;
  }
}
