/* книги с постером */
.book-card {
    width: 100%;
}

.book-card__wrapper {
    display: flex;
    gap: 20px;
}

.book-card__cover {
    flex: 0 0 210px;
    width: 210px;
    height: 324px;
    padding: 10px;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: contain;
}

.book-card__content {
    position: relative;
    flex: 1;
    padding-left: 40px;
}

/* =========================
   Рейтинг
========================= */

.rating-card {
    position: relative;
}

.rating-card__compact {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: max-content;
    margin-left: auto;
    cursor: pointer;
}

.rating-card__icon {
    color: #FF4C00;
}

.rating-card__compact-value {
    color: #FF4C00;
    font-size: 16px;
    font-weight: bold;
    margin-top: -4px;
}

.rating-card__compact-count {
    margin-top: -4px;
    font-size: 12px;
    color: #ccc;
}

.rating-card__popup {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
    width: 250px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e5e5e5;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.rating-card__compact:hover + .rating-card__popup,
.rating-card__popup:hover {
    display: block;
    cursor: pointer;
}

.rating-card__summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rating-card__value {
    color: #FF4C00;
    font-size: 22px;
    font-weight: bold;
}

.rating-card__votes {
    color: #ccc;
    font-size: 14px;
}

.rating-card__rate{
    margin-top: 20px;
    margin-bottom: 20px;
}

/* =========================
   Детализация рейтинга
========================= */

.rating-details {
    display: flex;
    flex-direction: column;
}

.rating-details__row {
    display: flex;
    align-items: center;
}

.rating-details__stars {
    width: 100px;
    color: #ccc;
}

.rating-details__progress {
    flex: 1;
}

.rating-details__count {
    width: 20px;
    text-align: right;
}

.progressbar {
    overflow: hidden;
    height: 14px;
    background: #eee;
    border-radius: 7px;
}

.progressbar span {
    display: block;
    height: 100%;
    background: #FF4C00;
}

/* =========================
   Кнопка отзыва
========================= */

.rating-card__review-btn {
    display: block;
    width: 100%;
    text-align: center;
}

/* =========================
   Заголовки
========================= */

.book-card__title,
.book-card__pages
{
    text-align: center;
    font-weight: normal;
    margin: 10px;
}

.book-card__pages span {
    font-size: 18px;
    font-weight: bold;
}

/* =========================
   Кнопки
========================= */

.book-card__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.book-card__btn {
    width: 180px;
    text-align: center;
}

.book-card__btn--favorite {
    width: 140px;
}

.book-card__heart i{
    color: red;
}

/* =========================
   Мобильная версия
========================= */

.m-book-card {
    width: 100%;
}

.m-book-card__image {
    text-align: center;
}

.m-book-card__image img {
    max-width: 100%;
    height: auto;
}

.m-book-card__title {
    margin-top: 0;
    margin-bottom: 10px;
    text-align: center;
    font-weight: normal;
}

.m-book-card__pages {
    margin-bottom: 10px;
    text-align: center;
}

.m-book-card__pages span {
    font-size: 18px;
    font-weight: bold;
}

/* =========================
   Кнопки
========================= */

.m-book-card__actions {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 20px;
}

.m-book-card__btn {
    width: 140px;
    text-align: center;
}

.m-book-card__heart {
    color: #ff4c00;
}

/* =========================
   Информационные блоки
========================= */

.m-book-card__info {
    display: flex;
}

.m-book-card__info-item {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1;
    text-align: center;
    font-size: 15px;
}

.m-book-card__info-item:not(:last-child) {
    border-right: 1px solid #FF4C00;
}

.m-book-card__info-item b {
    display: block;
}

/* =========================
   Рейтинг
========================= */

.m-book-rating {
    position: relative;
}

.m-book-rating__compact {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 8px;

    cursor: pointer;
}

.m-book-rating__icon {
    color: #FF4C00;
}

.m-book-rating__compact-value {
    color: #FF4C00;
    font-size: 16px;
    font-weight: bold;
    margin-top: -4px;
}

.m-book-rating__compact-count {
    margin-top: -4px;
    font-size: 12px;
    color: #ccc;
}

.m-book-rating__popup {
    display: none;
    width: 100%;
    margin-top: 15px;
}

.m-book-rating-popup__inner {
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.m-book-rating:focus-within .m-book-rating__popup {
    display: block;
    cursor: pointer;
}

.m-book-rating__title {
    margin-bottom: 10px;
}

.m-book-rating__summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.m-book-rating__value {
    color: #FF4C00;
    font-size: 22px;
    font-weight: bold;
}

.m-book-rating__votes {
    margin-top: 5px;
    color: #999;
    white-space: nowrap;
    font-size: 14px;
}

.m-book-rating__review-btn {
    display: block;
    width: 100%;
    text-align: center;
}