/**
 * Author Book Manager Styles
 * Author: John Patrick Garvin
 *
 */

/* ================================
 * Variables
 * ================================ */

@import "variables.css";

/* ================================
 * Main Content
 * ================================ */

.abm.container {
    margin-top: var(--margin-xxl);
}

/* ================================
 * Colors
 * ================================ */

.abm {

  .tabs-border .tab-content {
      background: var(--color-bg);
      border-color: var(--color-bg);
      color: var(--color-txt);
  }

  .tabs-border #tabs.tab-nav a {
      background: var(--color-accent);
      border-color: var(--color-accent);
      color: var(--color-bg);
  }

  .tabs-border #tabs.tab-nav a:hover {
      color: var(--color-bg);
      opacity: 0.8;
  }

  .tabs-border #tabs.tab-nav a.current {
      background: var(--color-bg);
      border-color: var(--color-bg);
      color: var(--color-txt);
  }

  .books-buy-groups .books-buy .buttons li a,
  .book-cover-group_links .group-buy-links .buttons li a {
      color: var(--color-txt);
      background: var(--color-accent);
  }

}

/* ================================
 * Utilities
 * ================================ */

.abm {

  .nobullets {
     list-style-type: none
  }

  .center {
    text-align: center;
  }

}

/* ================================
 * Titles
 * ================================ */

.abm {

  .series-title {
    margin-bottom: 0;
    line-height: 1.2;
  }

  .desc {
    margin-top: var(--margin-md);
  }

  .desc-tax {
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
  }

}

/* ================================
 * Sidebar
 * ================================ */

.abm {

  .sidebar .row {
      margin-bottom: var(--margin-lg);
  }

  .side-content .icons-inline li {
      max-width: 22%;
  }

  .sidebar h3 {
    font-size: 1.5rem; // 24px
    line-height: 1.2;
  }

  .sidebar h4 {
    font-size: 1.25rem; // 20px
    line-height: 1.2;
  }

  .sidebar h5 {
    font-size: 1.125rem; // 18px
    line-height: 1.2;
  }

  .sidebar ul {
    padding-left: 0;
  }

  .sidebar ul ul {
    padding-left: 20px;
  }

  .sidebar ul li {
    border-bottom: 1px solid var(--color-md);
    list-style: none;
    padding-left: 0;
    padding-bottom: var(--padding-sm);
    margin-bottom: var(--padding-sm);
  }

  .sidebar ul li:last-of-type {
    border: 0;
  }

}

/* ================================
 * Buy Links
 * ================================ */

.abm {

  /* === Buy Format Sections === */

  .books-buy-groups {
    display: flex;
    flex-direction: column;
  }

  .books-buy {
    display: block;
    width: 100%;
  }

  .books-buy li {
    border: 0;
  }

  /* === Basic === */

  .books-buy.books-buy-basic li {
    border: 0;
    padding: 0;
  }

  /* === Text === */

  .buy-links li {
    padding-bottom: 0;
  }

  .buy-links a {
    background: none;
    color: var(--color-link);
  }

  .buy-links a:hover {
    opacity: 0.5;
  }

  /* === Icons === */

  .icons-inline li.seller-icon-missing {
    border: 1px solid var(--color-bg);
    padding: 0;
  }

  .icons-inline li.seller-icon-missing a {
    text-align: center;
    display: block;
    padding: 8px;
    width: 100px;
    margin-left: -6px;
    margin-top: -6px;
  }

  .icons-inline li {
    display: inline-block;
    width: auto;
    padding: 6px 12px;
    border: 1px solid var(--color-bg);
  }

  .icons-inline li a {
    display: block;
    width: 100%;
    height: 100%;
  }

  .icons-inline li:hover {
    border-color: var(--color-bg);
  }

  .icons-inline li {
    display: inline-block;
    width: auto;
    margin-right: 12px;
  }

  .icons-inline li:last-of-type a {
    margin-right: 0;
  }

  /* === Buttons === */

  .buttons.buttons-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: start;
    padding: 0;
    margin-bottom: var(--margin);
  }

  .buttons.buttons-inline li {
    min-width: 49%;
     max-width: 100%;
    border: 0;
  }

  .sidebar .buttons.buttons-inline li {
    padding: 0;
  }

  /* === List below summary === */

  #buy {
    width: 100%;
    max-width: 800px;
  }

  #buy .buttons.buttons-inline li {
    min-width: 24%;
    max-width: 200px;
  }

}

@media only screen and ( max-width: 1280px ) {

  .abm .buttons.buttons-inline li {
    min-width: 100%;
    max-width: 100%;
  }

}

@media only screen and ( max-width: 800px ) {

  .abm #buy .buttons.buttons-inline li {
    min-width: 100%;
    max-width: 100%;
  }

}

.abm {

  .buttons.buttons-inline li a {
    border: 0;
    border-radius: 30px;
    background: var(--color-bg);
    color: var(--color-txt);
    padding: 4px 12px;
    display: block;
    width: 100%;
    text-align: center;
    font-weight: 500;
    font-size: 0.85rem;
    transition: opacity 0.3s ease-in-out;
  }

  .buttons.buttons-inline li a:hover {
    border-color: var(--color-txt);
    background: var(--color-txt);
    color: var(--color-bg);
    opacity: 0.5;
  }

}

/* ================================
 * Book Groups
 * ================================ */

.abm {

  .title-group.center {
    text-align: center;
    margin-bottom: 2rem;
  }

  .section-title {
    font-size: 32px;
  }

  .section-title.center {
    display: inline-block;
    text-align: center;
    margin: var(--margin-xl) auto var(--margin-sm) auto;
  }

  .type-books > .row:first-of-type h3 {
    margin-top: 0;
  }

  .group-description {
    font-size: 18px;
    text-align: center;
  }

}

/* ================================
 * Book Meta
 * ================================ */

 .abm .book-meta {
     margin-top: var(--margin-md);
     margin-bottom: var(--margin-lg);
 }

 .abm .book-meta span.center {
    text-align: center;
 }

/* ================================
 * Book List
 * ================================ */

.abm {

  .books-list-item {
    margin-bottom: var(--margin-xl);
    padding-bottom: var(--padding-xl);
    border-bottom: 1px solid var(--color-bg);
  }

  .books-list-item .meta span {
    display: block;
  }

  .books-list-item .one-third {
    padding-left: 0;
  }

  .books-list-item .more {
    display: block;
    margin-top: var(--margin-lg);
  }

}

/* ================================
 * Book Covers
 * ================================ */

.abm {

  .book-cover-group {
    position: relative;
    z-index: 0;
  }

  .book-cover-group a {
    display: inline-block;
    transition: opacity 0.3s ease-in-out;
  }

  .book-cover-group a:hover {
    opacity: 0.8;
  }

  .book-cover {
      ext-align: center;
  }

  .book-cover a {
    position: relative;
  }

  span.coming-soon {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    background: var(--color-link);
    letter-spacing: 0.8px;
    text-align: center;
    text-transform: uppercase;
    line-height: 1.2;
    padding: 12px 4px;
    z-index: 1;
  }

  .caption {
    text-transform: none;
  }

  .book-cover-single {
    text-align: center;
    margin-bottom: var(--margin-xl);
    margin-top: var(--margin-sm);
    width: auto;
  }

  .book-cover-single a:hover {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath d='M14.667 11a1 1 0 0 1 1 1v1.667h1.666a1 1 0 0 1 0 2h-1.666v1.666a1 1 0 0 1-2 0v-1.666H12a1 1 0 0 1 0-2h1.667V12a1 1 0 0 1 1-1zm5.96 9.626a1 1 0 0 1 1.414 0l5.333 5.334a1 1 0 1 1-1.414 1.414l-5.333-5.334a1 1 0 0 1 0-1.414zm-5.96-14.293a8.333 8.333 0 1 0 0 16.667 8.333 8.333 0 0 0 0-16.667zM4.333 14.667c0-5.707 4.627-10.334 10.334-10.334S25 8.96 25 14.667c0 2.848-1.154 5.429-3.017 7.297A10.305 10.305 0 0 1 14.667 25C8.96 25 4.333 20.374 4.333 14.667z' fill='%23949494' class=''/%3E%3C/svg%3E") 16 16, auto;
  }

  .book-cover-single.alignleft {
    text-align: left;
    float: left;
    margin-right: var(--margin-lg);
    margin-bottom: var(--margin-md);
  }

  .book-cover-single.alignright {
    text-align: right;
    float: right;
    margin-left: var(--margin-lg);
    margin-bottom: var(--margin-md);
  }

  .book-cover-single img.wp-post-image.small {
    max-width: 175px;
    height: auto;
  }

  .book-cover-single img.wp-post-image.medium {
    max-width: 230px;
    height: auto;
  }

  .book-cover-single img.wp-post-image.large {
    max-width: 320px;
    height: auto;
  }

  .book-cover-single a {
    position: relative;
    display: inline-block;
  }

}

@media only screen and ( max-width: 688px ) {

  .abm {

      .book-cover-single {
        width: 100%;
        text-align: center;
        margin-bottom: var(--margin);
      }

      .book-cover-single.alignleft,
      .book-cover-single.alignright {
        text-align: center;
        margin-bottom: var(--margin);
      }

      .book-cover-single.alignleft a,
      .book-cover-single.alignright a {
        display: inline-block;
        margin-left: auto;
        margin-right: auto;
      }

    }

}

/* ================================
 * Book Covers Meta
 * ================================ */

.abm {

  .book-cover-group_title {
    display: block;
    padding-top: 0;
    font-size: 1em;
    font-weight: bold;
    line-height: 1.4;
  }

  .book-cover-group_series {
    display: block;
  }

  .book-cover-group_number {
    display: block;
    font-size: 0.9em;
  }

  .book-cover-group_links {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-top: 12px;
  }

}

/* ================================
 * Book Covers Seller Links
 * ================================ */

 .abm {

  .book-cover-group_links {
    display: flex;
    justify-content: space-evenly;
  }

  .book-cover-group_links h6 {
    padding: 0;
    margin: 0 0 8px 0;
    font-weight: 600;
    text-align: center;
  }

  .book-cover-group_links ul {
    margin: 0 auto 4px auto;
    padding: 0;
  }

  .book-cover-group_links .group-buy-links {
    margin-bottom: 12px;
    width: 100%;
  }

  .book-cover-group_links ul li {
    display: inline-block;
    margin: 0 3px;
    padding: 0;
  }

  .book-cover-group_links ul li:first-child {
    margin-left: 0;
  }

  .book-cover-group_links ul li:last-child {
    margin-right: 0;
  }

  .book-cover-group_links .buttons-inline a {
    display: inline-block;
    padding: 4px 12px;
    margin: 2px 0;
    border-radius: 30px;
    font-size: 14px;
    line-height: 1.2;
    background-color: var(--color-bg);
  }

  .book-cover-group_links .buttons-inline a:hover {
    background: var(--color-txt);
    opacity: 0.5;
  }

  .book-cover-group_links .buy-links a {
    background: none;
    color: var(--color-link);
  }

  .book-cover-group_links .buy-links a:hover {
    background: none;
    color: var(--color-bg);
    opacity: 0.5;
  }

  .book-cover-group_links .buy-links li:first-child a::before {
    display: none;
  }

  /* Books List View Buy Links */

  .books-list .book-cover-group_links li {
    padding-left: 0;
    margin-left: 0;
  }

  .books-list .book-cover-group_links li a::before {
    content: '';
    padding: 0;
    margin: 0;
    width: 0;
  }

  .books-list .group-buy-links {
    border: 1px solid var(--color-bg);
    border-radius: 4px;
    padding: 12px;
    background: rgba(255,255,255,0.5);
  }

}

@media only screen and ( min-width: 1280px ) {

  .abm {

    .book-cover-group_links.buy-links-inline .group-buy-links {
      max-width: 100%;
    }

    .book-cover-group_links.buy-links-inline .group-buy-links ul {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
    }

    .book-cover-group_links.buy-links-inline .group-buy-links ul li {
      width: auto;
    }

    .books-list .group-buy-links {
      max-width: 32%;
    }

    .books-list .group-buy-links li {
      width: 100%;
      display: block;
      text-align: left;
    }

  }

}

/* ================================
 * Books Related
 * ================================ */

 .abm {

  .books-related {
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 6px;
  }

  .books-related div {
    text-align: center;
    flex-basis: 100%;
    max-width: calc((100% - 12px) / 3);
  }

  .books-related a img {
    transition: opacity 0.3s ease-in-out;
    height: auto !important;
  }

  .books-related a:hover img {
     opacity: 0.6;
  }

  .books-related .book-cover-group_title,
  .books-related .book-cover-group_number,
  .books-related .book-cover-group_caption {
    line-height: 1.2;
    padding: 8px 0 16px 0;
    text-align: center;
  }

  .books-related .book-cover-group_title a:hover {
    text-decoration: none;
    opacity: 0.5;
  }

}

@media screen and ( max-width: 960px ) {

    .abm .books-related div a {
        margin: 0 auto;
        text-align: center;
    }

    .abm .books-related .wp-post-image {
        margin-bottom: 0 !important;
    }
}

/* ================================
 * Book Details
 * ================================ */

.abm {

  #details ul {
    padding-left: 0;
    margin-left: 0;
  }

  #details ul li {
    padding-bottom: 4px;
  }

  #details.details-list.row {
    width: auto;
  }

}

@media screen and ( max-width: 688px ) {

  .abm #details.details-list.row {
    width: 100%;
  }

}

/* ================================
 * Book List
 * ================================ */

.abm {

  .list-content {
      margin-bottom: 30px;
  }

  .list-content h3 {
      border-bottom: 1px solid var(--color-bg);
      padding-bottom: 12px;
  }

}

/* ================================
 * Book Tabs
 * ================================ */

.abm {

  .tabs {
    margin-top: 48px;
  }

  .tabs .tab-nav li a {
    font-weight: bold;
  }

  .tabs .tab-content {
    padding-top: 20px;
  }

  .tabs .tab-content a {
     olor: var(--color-accent);
  }

  .tabs .tab-content a:hover {
    opacity: 0.5;
  }

  .tabs .tab-content .books-buy-groups {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: start;
  }

  .tabs .books-buy-groups .books-buy {
    width: 100%;
  }

  .tabs .books-buy-groups .books-buy ul li {
    width: 100%;
  }

  .tabs .tab-content {
    border: 1px solid var(--color-bdr);
  }

  .tabs .tab-nav li a.current {
    border: 1px solid var(--color-bdr) !important;
    border-right: 1px solid var(--color-bg) !important;
  }

}

@media only screen and ( max-width: 680px ) {

  .abm .tabs .tab-nav li a.current {
      border-right: 1px solid var(--color-bdr) !important;
  }

}

@media only screen and ( min-width: 680px ) {

  .abm {

    .tabs .tab-nav li a.current {
      border: 1px solid var(--color-bdr) !important;
      border-bottom: 1px solid var(--color-bg) !important;
    }

    .tabs .books-buy-groups .books-buy {
      width: 30%;
    }

    .tabs .books-buy-groups .books-buy ul li {
      width: 100%;
    }

  }

}

/* ================================
 * Book Excerpt
 * ================================ */

 .abm {

  .button-print {
    margin: 12px 0 20px auto;
    text-align: right;
    color: #ffffff !important;
  }

  .button-print a.button,
  .button-print a.button:hover,
  .button-print a.button:focus {
    border-width: 1px;
    border-radius: 5px;
    padding: 8px 24px;
    font-size: 16px;
  }

  .button-print a.button {
    background: var(--color-accent);
    color: var(--color-bg);
  }

  .button-print a.button:hover,
  .button-print a.button:focus {
    color: var(--color-bg);
    background: var(--color-txt);
    opacity: 0.5;
  }

  .button-print a.button:visited {
    color: var(--color-txt);
  }

  #excerpt .book-excerpt p:not(.button-print) {
    line-height: 2.2;
    text-indent: 2em;
    padding: 0;
    margin-bottom: 0;
  }

  #excerpt .book-excerpt p:first-of-type {
    text-indent: 0;
  }

}

/* ================================
 * Book Single
 * ================================ */

 .abm {

  .book-single-summary {
    min-height: 400px;
  }

  .book-single-summary p,
  .book-single-summary h2,
  .book-single-summary h3,
  .book-single-summary h4,
  .book-single-summary h5,
  .book-single-summary h6 {
    text-align: left;
  }

 }

/* ================================
 * Book Lists
 * ================================ */

.abm {

  table th {
      background: var(--color-accent);
      color: var(--color-bg);
  }

  table td.series-title {
      background: var(--color-md);
  }

  table th,
  table td {
      border-color: var(--color-md);
  }

}

/* ================================
 * Book TOC
 * ================================ */

.abm {

  ul.toc {
    list-style-type: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 800px;
    margin: 36px auto;
    padding: 0;
  }

  ul.toc li {
      width: auto;
  }

  ul.toc li a {
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    border-radius: 3px;
    padding: 4px 8px;
    font-size: 0.96rem;
    transition: opacity 0.3s ease-in-out;
  }

  ul.toc li a:hover {
    opacity: 0.6;
  }

}

/* ================================
 * Filter Transitions
 * ================================ */

.abm {

  #books-container {
    transition: opacity 0.4s ease-in-out;
    opacity: 1;
  }

  #books-container:not(.filter) > .row,
  #books-container:not(.filter) > .series-group {
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
  }

  .fade-in {
    opacity: 1 !important;
  }

}
