/* BookTorium: дополнения к теме blueberry */

/* Звезды рейтинга: состояние звезды (star1..star5 = full, half, empty) задает код */
.bb-star-full:before,
.bb-star-half:before,
.bb-star-empty:before {
  font-family: "remixicon";
  font-style: normal;
}
.bb-star-full:before {
  content: "\f186";
}
.bb-star-half:before {
  content: "\f188";
}
.bb-star-empty:before {
  content: "\f18b";
}
.bb-pro-rating .bb-star-full,
.bb-pro-rating .bb-star-half {
  color: #fea99a;
}

/* Оценка в форме отзыва: переключатели 5..1 в обратном порядке, выбранная звезда и все левее подсвечены */
.bb-star-input {
  display: inline-flex;
  flex-direction: row-reverse;
  vertical-align: middle;
}
.bb-star-input input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.bb-star-input label {
  cursor: pointer;
  margin: 0 2px;
}
.bb-star-input label:before {
  font-family: "remixicon";
  content: "\f18b";
  font-size: 20px;
  color: #777;
}
.bb-star-input input:checked ~ label:before,
.bb-star-input label:hover:before,
.bb-star-input label:hover ~ label:before {
  content: "\f186";
  color: #fea99a;
}
.bb-star-input input:focus-visible + label:before {
  outline: 2px solid #6c7fd8;
}

/* Панель категории: вид (сетка/список) — ссылки, текущий подсвечен по data-view; сортировка — меню темы */
.bb-category-toolbar .bb-bl-btn {
  align-items: center;
}
.bb-category-toolbar .bb-view-link {
  height: 38px;
  width: 38px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 5px;
  color: #686e7d;
}
.bb-category-toolbar .bb-view-link i {
  font-size: 20px;
}
.bb-category-toolbar[data-view="grid"] .bb-view-link[data-view="grid"],
.bb-category-toolbar[data-view="list"] .bb-view-link[data-view="list"] {
  background-color: #6c7fd8;
  color: #fff;
  border-radius: 15px;
}
/* Меню сортировки: ширина темы рассчитана на «Sort by», русские подписи длиннее */
.bb-pro-list-top .bb-select-inner .custom-select {
  width: auto;
  min-width: 130px;
  white-space: nowrap;
}

/* Строка под списком: счетчик и страницы; страниц больше, чем в демо, на телефоне они переносятся */
.bb-pro-pagination ul {
  flex-wrap: wrap;
  justify-content: center;
  row-gap: 6px;
}
/* Номера не влезли в строку (класс ставит main.js): «Пред» отдельной строкой сверху, «След» — снизу */
.bb-pro-pagination ul.bb-pages-split .bb-page-prev,
.bb-pro-pagination ul.bb-pages-split .bb-page-next {
  flex: 0 0 100%;
  display: flex;
  justify-content: center;
  margin-right: 0;
}

/* Главная: рейтинг и аннотация новинки в слайдере, статистика библиотеки */
.bb-hero-rating {
  display: inline-block;
  margin-bottom: 15px;
}
.bb-hero-descr {
  max-width: 520px;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bb-library-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  margin: 0;
  padding: 20px 24px;
  list-style: none;
  background-color: #f8f8fb;
  border: 1px solid #eee;
  border-radius: 20px;
  color: #686e7d;
}
.bb-library-stats strong {
  color: #3d4750;
  font-size: 20px;
  margin-right: 4px;
}
.bb-read-file {
  margin-bottom: 10px;
}

/* Слайдер главной: тема анимирует появление только первых трех элементов слайда,
   остальные (рейтинг, аннотация, кнопка) оставались скрытыми */
.swiper-slide-active .hero-contact > *:nth-child(n + 4) {
  animation-duration: 3s;
  animation-fill-mode: both;
  animation-name: fadeInUp;
}

/* Поиск в шапке: «По названию» в Montserrat шире прежнего шрифта и переносилось */
@media (min-width: 992px) {
  .header-search .bb-btn-group-form .inner-select .custom-select {
    width: 125px;
    white-space: nowrap;
  }
  .header-search .bb-btn-group-form input {
    padding-left: 185px;
  }
}

/* Росчерк над заголовком слайда рассчитан на одно короткое слово и наезжал на названия книг */
.hero-contact h1 span:after,
.hero-contact h2 span:after {
  display: none;
}

/* Формы страниц (поиск и т. п.): main.js темы дописывает к каждому select свою копию списка.
   В формах остается обычный select, копия скрыта */
.bb-register .select > .custom-select,
.bb-register .select > .select-options {
  display: none !important;
}

/* Обложки в карточках (сетка, список, главная): у демо-картинок одинаковый размер, у книг — разный.
   Обложка вписывается целиком в рамку постоянной пропорции, поэтому карточки ряда одной высоты */
.bb-pro-box .bb-pro-img .inner-img {
  aspect-ratio: 3 / 4;
  background-color: #fff;
}
.bb-pro-box .bb-pro-img .inner-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
/* Список: колонка обложки задана, а не по ширине картинки */
.width-100 .bb-pro-box .bb-pro-img {
  flex: 0 0 200px;
  display: flex;
  align-items: center;
}
.width-100 .bb-pro-box .bb-pro-img > a {
  width: 100%;
}
.width-100 .bb-pro-box .bb-pro-contact {
  flex: 1;
  min-width: 0;
}
/* В списке места хватает: название целиком, а не в одну строку с многоточием, как в сетке */
.width-100 .bb-pro-box .bb-pro-contact h4.bb-pro-title a {
  white-space: normal;
}
@media only screen and (max-width: 767px) {
  .width-100 .bb-pro-box .bb-pro-img .inner-img {
    aspect-ratio: auto;
    height: 260px;
  }
}

/* Страница книги: большой слайд открывается крупно; окно по размеру страницы, на всю высоту экрана */
.single-product-cover .slick-slide {
  cursor: zoom-in;
}
.bb-page-viewer .modal-dialog {
  width: auto;
  max-width: none;
  height: 100%;
  margin: 0;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.bb-page-viewer .modal-content {
  width: auto;
  border: 0;
  border-radius: 20px;
  overflow: hidden;
}
.bb-page-viewer img {
  display: block;
  height: calc(100vh - 40px);
  max-width: calc(100vw - 40px);
  object-fit: contain;
  background-color: #fff;
}
.bb-page-viewer button {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background-color: rgba(61, 71, 80, 0.6);
  color: #fff;
  font-size: 24px;
}
.bb-page-viewer button:hover {
  background-color: #6c7fd8;
}
.bb-page-viewer .bb-page-close {
  top: 10px;
  right: 10px;
}
.bb-page-viewer .bb-page-prev,
.bb-page-viewer .bb-page-next {
  top: 50%;
  transform: translateY(-50%);
}
.bb-page-viewer .bb-page-prev {
  left: 10px;
}
.bb-page-viewer .bb-page-next {
  right: 10px;
}
.bb-page-viewer .bb-page-counter {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 12px;
  border-radius: 10px;
  background-color: rgba(61, 71, 80, 0.6);
  color: #fff;
  font-size: 14px;
}

/* Описание книги: заголовки содержания журнала (разделы) — жирным, тема почти не выделяет strong */
.bb-details strong {
  font-weight: 600;
  color: #3d4750;
}

/* Заголовок страницы — единственный <h1> (для поисковиков); тема оформляла его как <h2> */
.bb-breadcrumb-inner h1.bb-breadcrumb-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  color: #3d4750;
}
/* Хлебные крошки: длинный путь переносится, пункт не рвется; последний пункт (название книги
   повторяет заголовок слева) — одной строкой с многоточием */
.bb-breadcrumb-inner .bb-breadcrumb-list {
  flex-wrap: wrap;
  row-gap: 4px;
}
.bb-breadcrumb-inner .bb-breadcrumb-list li {
  white-space: nowrap;
}
.bb-breadcrumb-inner .bb-breadcrumb-list li.active {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Главная: <h1> над статистикой библиотеки */
.bb-home-title {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 700;
  color: #3d4750;
}

/* Логотип: знак (шестерня за раскрытой книгой) и надпись текстом в шрифте темы */
.bb-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #3d4750;
  line-height: 1;
}
.bb-logo:hover {
  color: #3d4750;
}
.bottom-header .inner-bottom-header .header-logo .bb-logo img,
.bb-logo img {
  width: 46px;
  height: 46px;
  flex: none;
}
.bb-logo-word {
  display: grid;
}
.bb-logo-word small {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #6c7fd8;
}
.bb-logo-word b {
  margin-top: 3px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.05em;
}
.bb-footer-brand {
  margin-bottom: 30px;
}
@media (max-width: 991px) {
  .bottom-header .inner-bottom-header .header-logo .bb-logo img {
    width: 36px;
    height: 36px;
  }
  .bb-logo .bb-logo-word small {
    font-size: 10.5px;
  }
  .bb-logo .bb-logo-word b {
    font-size: 16px;
  }
}
