/**
 * @file: tp-bonus.css
 * @description: Бонусные баллы (TP-BONUS-001): бейдж на карточке товара, блок в корзине/оформлении, ЛК.
 * @created: 2026-11-22
 */
.tp-bonus-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 6px 12px 6px 6px;
    border-radius: 999px;
    background: #eef6ec;
    color: #202e35;
    font-family: Circe, sans-serif;
    font-size: 14px;
    line-height: 1.3;
    cursor: help;
    max-width: 100%;
}
.tp-bonus-badge-row { flex-basis: 100%; }
.card-priceblock > .tp-bonus-badge-row .tp-bonus-badge { margin-top: 0; }
.tp-bonus-badge__icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #5aa14d;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}
.tp-bonus-badge__text b { font-weight: 700; }
.tp-bonus-badge__hint {
    position: absolute;
    left: 0;
    top: calc(100% + 6px);
    z-index: 20;
    width: 280px;
    max-width: calc(100vw - 32px);
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #e3e7ef;
    background: #fff;
    box-shadow: 0 6px 20px rgba(32, 46, 53, .12);
    color: #5c647a;
    font-size: 13px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .15s ease;
}
.tp-bonus-badge:hover .tp-bonus-badge__hint,
.tp-bonus-badge:focus-within .tp-bonus-badge__hint { opacity: 1; visibility: visible; }

.tp-bonus-box:empty { display: none; }
.tp-bonus-box {
    margin: 16px 0;
    padding: 14px 16px;
    border-radius: 9px;
    background: #f5f9f3;
    border: 1px solid #dbeacf;
    font-family: Circe, sans-serif;
    color: #202e35;
    font-size: 15px;
    line-height: 1.35;
}
.tp-bonus-box__title {
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 16px;
}
.tp-bonus-box__row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 6px;
}
.tp-bonus-box__row b { white-space: nowrap; }
.tp-bonus-box__row--accrue b,
.tp-bonus-box__row--applied b { color: #3f8a33; }
.tp-bonus-box__spend {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 10px;
    cursor: pointer;
}
.tp-bonus-box__spend input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    accent-color: #5aa14d;
}
.tp-bonus-box__spend small { display: block; color: #5c647a; font-size: 13px; }
.tp-bonus-box__note { margin-top: 8px; color: #5c647a; font-size: 13px; }
.tp-bonus-box__note a { color: #3f8a33; text-decoration: underline; }

.tp-bonus-lk {
    margin-top: 24px;
    padding: 20px;
    border-radius: 9px;
    border: 1px solid #e3e7ef;
    background: #fff;
}
.tp-bonus-lk__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px 16px;
}
.tp-bonus-lk__balance { font-size: 28px; font-weight: 700; color: #202e35; }
.tp-bonus-lk__pending { color: #3f8a33; font-size: 14px; }
.tp-bonus-lk__rules { margin: 10px 0 0; color: #5c647a; font-size: 14px; }
.tp-bonus-history { margin: 16px 0 0; padding: 0; list-style: none; border-top: 1px solid #e3e7ef; }
.tp-bonus-history__item {
    display: grid;
    grid-template-columns: 90px 1fr auto;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f2f6;
    font-size: 14px;
}
.tp-bonus-history__date { color: #5c647a; }
.tp-bonus-history__amount { color: #3f8a33; white-space: nowrap; }
.tp-bonus-history__amount.is-minus { color: #202e35; }
@media (max-width: 480px) {
    .tp-bonus-history__item { grid-template-columns: 1fr auto; }
    .tp-bonus-history__date { grid-column: 1 / -1; font-size: 12px; }
}
