/* Лайк книги, «спасибо главам» и платный лайк (views/book/_liker.php).
   #liker в селекторах — чтобы перебить общие .bk-page .btn !important из book-brand.css. */

html body #liker.bk-liker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
}
html body #liker.bk-liker .pull-right { float: none !important; margin-left: 0; }
html body #liker.bk-liker .bk-paylike-form { display: inline-flex !important; margin: 0; width: auto; overflow: visible; }

/* --- Общая форма кнопок --- */
html body #liker .bk-like,
html body #liker .bk-paylike {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 6px 8px 6px 14px !important;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    opacity: 1;
    transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, transform .1s;
}
html body #liker .bk-like .ui-icon,
html body #liker .bk-paylike .ui-icon { width: 17px; height: 17px; flex: none; }
html body #liker .bk-like-num {
    min-width: 22px;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 700;
    text-align: center;
}

/* --- Лайк: можно поставить — контур цвета оформления, при наведении заливка --- */
html body #liker .bk-like--can {
    border: 1.5px solid var(--ui-accent, #9a4669) !important;
    background: var(--ui-accent-soft, #f7edf2) !important;
    color: var(--ui-accent-strong, #7d3655) !important;
    cursor: pointer;
}
html body #liker .bk-like--can .bk-like-num { background: var(--ui-accent, #9a4669); color: #fff; }
html body #liker .bk-like--can:hover,
html body #liker .bk-like--can:focus-visible {
    background: var(--ui-accent, #9a4669) !important;
    color: #fff !important;
    box-shadow: 0 4px 14px color-mix(in srgb, var(--ui-accent, #9a4669) 30%, transparent) !important;
}
html body #liker .bk-like--can:hover .bk-like-num,
html body #liker .bk-like--can:focus-visible .bk-like-num { background: #fff; color: var(--ui-accent-strong, #7d3655); }
html body #liker .bk-like--can:active { transform: scale(.97); }

/* --- Лайк уже стоит — сплошная заливка, иконка залита --- */
html body #liker .bk-like--on {
    border: 1.5px solid var(--ui-accent, #9a4669) !important;
    background: var(--ui-accent, #9a4669) !important;
    color: #fff !important;
    cursor: pointer;
}
html body #liker .bk-like--on .ui-icon { fill: currentColor; }
html body #liker .bk-like--on .bk-like-num { background: rgba(255, 255, 255, .22); color: #fff; }
html body #liker .bk-unlike { min-height: 30px; border-radius: 999px; }

/* --- Лайк нельзя поставить (гость, владелец) — нейтральный счётчик --- */
html body #liker .bk-like--static {
    border: 1px solid var(--bk-card-line, #e5e7eb) !important;
    background: var(--bk-card, #fff) !important;
    color: #4b5563 !important;
    cursor: default;
}
html body #liker .bk-like--static .bk-like-num { background: #f1f2f4; color: #1f2937; }

/* --- «Спасибо главам» — не кнопка, просто строка --- */
html body #liker .bk-thanks-total {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 4px;
    color: #4b5563;
    font-size: 13px;
}
html body #liker .bk-thanks-total .ui-icon { width: 16px; height: 16px; color: #e11d48; fill: #e11d48; }
html body #liker .bk-thanks-total b { color: #1f2937; font-weight: 700; }

/* --- Платный лайк — золотая кнопка с ценой --- */
html body #liker .bk-paylike {
    border: 1px solid #d97706 !important;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 55%, #d97706 100%) !important;
    color: #3b2300 !important;
    box-shadow: 0 2px 8px rgba(217, 119, 6, .28) !important;
    cursor: pointer;
}
html body #liker .bk-paylike .ui-icon { fill: rgba(255, 255, 255, .45); }
html body #liker .bk-paylike .bk-like-num { background: rgba(255, 255, 255, .55); color: #3b2300; }
html body #liker .bk-paylike-price {
    padding: 2px 8px;
    border-radius: 999px;
    background: #3b2300;
    color: #fde68a;
    font-size: 12px;
    font-weight: 700;
}
html body #liker .bk-paylike:hover,
html body #liker .bk-paylike:focus-visible {
    background: linear-gradient(135deg, #fcd34d 0%, #fbbf24 50%, #f59e0b 100%) !important;
    color: #3b2300 !important;
    box-shadow: 0 6px 18px rgba(217, 119, 6, .38) !important;
    transform: translateY(-1px);
}
html body #liker .bk-paylike:active { transform: scale(.97); }
html body #liker .bk-paylike--static {
    background: #fffbeb !important;
    border-color: #fcd34d !important;
    box-shadow: none !important;
    color: #92400e !important;
    cursor: default;
}
html body #liker .bk-paylike--static .bk-like-num { background: #fde68a; color: #78350f; }
html body #liker .bk-paylike--static:hover { transform: none; }

/* --- Тёмная тема --- */
html body.dark-theme #liker .bk-like--can {
    border-color: var(--ui-accent, #e9a6bc) !important;
    background: var(--ui-accent-soft, #362732) !important;
    color: var(--ui-accent-strong, #f0bfd0) !important;
}
html body.dark-theme #liker .bk-like--can .bk-like-num { background: var(--ui-accent, #e9a6bc); color: var(--ui-accent-on, #241b23); }
html body.dark-theme #liker .bk-like--can:hover,
html body.dark-theme #liker .bk-like--can:focus-visible,
html body.dark-theme #liker .bk-like--on {
    border-color: var(--ui-accent, #e9a6bc) !important;
    background: var(--ui-accent, #e9a6bc) !important;
    color: var(--ui-accent-on, #241b23) !important;
}
html body.dark-theme #liker .bk-like--can:hover .bk-like-num,
html body.dark-theme #liker .bk-like--can:focus-visible .bk-like-num {
    background: var(--ui-accent-on, #241b23);
    color: var(--ui-accent, #e9a6bc);
}
html body.dark-theme #liker .bk-like--on .bk-like-num { background: rgba(0, 0, 0, .2); color: var(--ui-accent-on, #241b23); }
html body.dark-theme #liker .bk-like--static {
    border-color: rgba(255, 255, 255, .12) !important;
    background: rgba(255, 255, 255, .05) !important;
    color: #c9c9c9 !important;
}
html body.dark-theme #liker .bk-like--static .bk-like-num { background: rgba(255, 255, 255, .1); color: #ededed; }
html body.dark-theme #liker .bk-thanks-total { color: #b8b8b8; }
html body.dark-theme #liker .bk-thanks-total b { color: #ededed; }
html body.dark-theme #liker .bk-thanks-total .ui-icon { color: #fb7185; fill: #fb7185; }
html body.dark-theme #liker .bk-paylike--static {
    background: rgba(251, 191, 36, .12) !important;
    border-color: rgba(251, 191, 36, .4) !important;
    color: #fcd34d !important;
}
html body.dark-theme #liker .bk-paylike--static .bk-like-num { background: rgba(251, 191, 36, .2); color: #fde68a; }

/* --- Телефон: подписи короче, кнопки переносятся --- */
@media (max-width: 640px) {
    html body #liker .bk-like,
    html body #liker .bk-paylike { padding-left: 12px !important; }
}
/* Узкая колонка (планшет 768, телефон 360): у платного лайка остаются корона, число и цена */
html body #liker.bk-liker { container-type: inline-size; }
@container (max-width: 260px) {
    html body #liker .bk-paylike .bk-like-lbl { display: none; }
}
html body #liker .bk-like,
html body #liker .bk-paylike { max-width: 100%; }
