#block-cuddly-page-title {
  display: none;
}

.book-button-panel {
  margin: 1rem;
}

.node--type-book.node--view-mode-full {
  & .book-title {
    font-size: calc(var(--font-size-base)*3);
    line-height: calc(var(--font-size-base)*3.5);
    font-weight: 800;
    display: block;
    border-width: 0;
    margin: 0;
  }

  & .book-subtitle {
    margin: 0;
    font-size: calc(var(--font-size-base)*1.75);
    padding: 0;
    padding-bottom: 1rem;
  }

  & .book-by-line {
    margin: 0;
    font-size: calc(var(--font-size-base)*1.5);
    font-weight: 700;

    &:before {
      content: "by ";
    }
  }

  & .book-hook {
    /* hyphens:none makes sure that breaks appear only on whitespace. */
    hyphens: none;
    font-size: calc(var(--font-size-base)*1.5);
    padding: 0.5rem;
    font-weight: 700;
    font-style: italic;
    text-align: center;
    background-color: var(--color--primary-80);
  }

  & .book-description-section {
    & .book-cover {
      float: left;
      margin-right: 1rem;
      margin-bottom: 1rem;
    }

    & .book-description ul {
      list-style-position: inside;
    }

    &:after {
      display: block;
      content: '';
      clear: both;
    }
  }

  & .extras {
    border: none 0px;

    & .extras-label {
      color: var(--color--gray-10);
      font-size: 2rem;
      padding-top: 2rem;
      padding-bottom: 1rem;
    }

    & .extra-item {
      font-size: 1rem;
      font-weight: 600;
      display: flex;
      justify-content: center;
      align-items: center;
      padding: 1rem;
      background-color: var(--color--primary-70);
      margin-bottom: 1rem;

      & .media-description {
        margin-top: 0.25rem;
        text-align: center;
        font-size: 1.25rem;
        & b {
          font-size: 1.5rem;
        }
      }
    }
  }
}

.book-header {
  border: none;
  border-radius: 15px 15px 0 0;
  border-color: var(--color--primary-30);
  padding: 1rem;
  background-color: var(--color--primary-60);
  margin: 0;
}

/* Series Information Lines
 ***************************
 */
.series-info {
  background-color: var(--color--primary-60);
  margin: 0;
  color: black;
  display: flex;
  font-weight: 800;

  & .series-name {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    & a {
      text-decoration: none;
      color: black;
    }
  }
}

.series-info:has(.series-number) {
  .series-number {
    &:before {
      content: "Book ";
    }
    padding-right: 0.25rem;
  }

  .series-name {
    &:before {
      content: " of the ";
    }
    &:after {
      content: " series";
    }
  }
}

.series-info:not(:has(.series-number)) .series-name {
  padding-left: 0;

  &:before {
    content: "Part of the ";
  }
  &:after {
    content: " series";
  }
}

/* Book reviews
 ***************************************
 */
.book-reviewers-say {
  padding-top: 1rem;
  color: var(--color--gray-10);

  & .field__label {
    font-family: var(--font-sans);
    font-size: calc(var(--font-size-base) * 2);
    font-weight: 700;
  }

  & .review {
    border-style: solid;
    border-color: var(--color--primary-60);
    background-color: var(--color--primary-80);
    border-width: 1em;
    border-radius: 15px;
    padding: 1em;
    color: var(--color-text-neutral-medium);
    font-weight: bold; 
    font-size: var(--font-size-xl);
    margin-bottom: 1em;
  }
}

.book.teaser {
  border: solid;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-width: 0.25rem;
  border-color: var(--color--primary-60);
  background-color: var(--color--primary-80);

  &.group-header {
    border: none;
    padding: 1rem;
    background-color: var(--color--primary-60);
    border-radius: 0;
    & .title {
      margin-top: 0;
      margin-bottom: 0;
    }
    & .series-info {
      font-weight: 700;
    }
    & .subtitle {
      font-size: 20pt;
    }
    & .author {
      font-weight: 800;
      &:before {
        content: "by ";
      }
    }
  }

  /*& .middle-row {*/
  & div:has(.group-left, .group-right) {
    border: none;
    display: flex;

    & .group-left {
      border: none;
      padding: 1rem;
      width: fit-content;
      /* The above works, but the group-right is not expanding to fill the space!
       * */
    }

    & .group-right {
      width: 75%;
      border: none;
      padding: 1rem;

      & .book-pages {
        margin-bottom: 1rem;
      } 
    }
  }

  &.group-footer {
    border: none;
  }

  & .book-hook {
    font-size: 18pt;
    font-weight: 700;
  }
}


/* Buy It Section
 ********************************/
.buyit {
  padding: 1rem;
  background-color: var(--color--primary-60);

  & .buyit-cover {
    float: left;
    margin-right: 1rem;
    margin-block-end: 0;
  }

  & .buyit-title {
    font-size: var(--font-size-xl);
    font-weight: 800;
    text-decoration: none;
    color: var(--color-text-neutral-loud);
    line-height: 1.5rem;
    margin-top: 0;
    margin-bottom: 0;
  }

  & .buyit-author {
    margin-bottom: 1rem;
  }

  & .paragraph--type-buyit-link {
    /* This is needed to counter a wrapper that is being put there by some
     * unknown part of the system. If I can find where to remove it, then 
     * this will not be needed.
     */
    display: inline-block;
  }

  & ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
  }

  & .buyit-link {
    display: flex;
    justify-content: flex-start;
    text-decoration: none;
    width: 20rem;
    height: 30px;
  }

  & .buyit-icon {
    order: 1;
    width: 30px;
    height: 30px;
  }

  & .buyit-link-text {
    order: 2;
    color: var(--color-text-neutral-loud);
    text-decoration: none;
    padding-left: 0.5rem;
  }

  & .buyit-link-text:empty {
    content: "Buy it here!";
  }

  & .icon-etsy {
    background: url(/sites/default/files/etsy_logo.jpg);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left center;
  }

  & .icon-amazon {
    background: url(/sites/default/files/amazon_logo.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left center;
  }

  & .icon-kobo {
    background: url(/sites/default/files/kobo_logo.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left center;
  }

  & .icon-payhip {
    background: url(/sites/default/files/payhip_logo.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left center;
  }

  & .field--name-field-short-book-id {
    visibility: hidden;
    margin: 0;
    padding: 0;
    line-height: 0;
  }
}

