/* B2B Лояльность — storefront. Neutral styles that inherit the theme's fonts. */
.hbl { --hbl-c: #2271b1; --hbl-line: rgba(0,0,0,.12); --hbl-muted: rgba(0,0,0,.6); --hbl-soft: rgba(0,0,0,.035); display: grid; gap: 20px; }
.hbl-h { margin: 8px 0 0; }
.hbl-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 760px) { .hbl-hero { grid-template-columns: 1fr; } }
.hbl-card { --hbl-card-bg1: #1d2327; --hbl-card-bg2: #2c3338; --hbl-card-fg: #ffffff; --hbl-card-muted: rgba(255,255,255,.68); --hbl-card-track: rgba(255,255,255,.18);
  background: linear-gradient(135deg, var(--hbl-card-bg1), var(--hbl-card-bg2)); color: var(--hbl-card-fg); border-radius: 10px; padding: 22px; position: relative; overflow: hidden; transition: background .4s ease; }
.hbl-card::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; border: 20px solid var(--hbl-c); opacity: .35; }
.hbl-card__tag { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--hbl-card-muted); }
.hbl-card__level { font-size: 30px; font-weight: 700; line-height: 1.2; margin: 4px 0; color: var(--hbl-card-fg); }
.hbl-card__note { font-size: 12px; color: var(--hbl-card-muted); font-style: italic; }
.hbl-card__rates { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 14px; position: relative; z-index: 1; }
.hbl-card__rates div { font-size: 12px; color: var(--hbl-card-muted); }
.hbl-card__rates b { display: block; font-size: 22px; color: var(--hbl-card-fg); font-variant-numeric: tabular-nums; }
.hbl-card__next { margin: 10px 0 0; font-size: 14px; color: var(--hbl-card-fg); position: relative; z-index: 1; }
.hbl-bar { height: 8px; background: var(--hbl-card-track, rgba(255,255,255,.15)); border-radius: 99px; overflow: hidden; margin-top: 16px; position: relative; z-index: 1; }
.hbl-bar > i { display: block; height: 100%; background: var(--hbl-c); border-radius: 99px; }
.hbl-balances { display: grid; gap: 10px; }
.hbl-bal { border: 1px solid var(--hbl-line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.hbl-bal span { color: var(--hbl-muted); font-size: 13px; }
.hbl-bal b { font-size: 22px; font-variant-numeric: tabular-nums; }
.hbl-bal small { color: var(--hbl-muted); }
.hbl-bal--warn { border-color: #b26200; }
.hbl-bal--warn b { color: #b26200; }
.hbl-steps { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); overflow-x: auto; border: 1px solid var(--hbl-line); border-radius: 10px; }
.hbl-step { padding: 14px; border-right: 1px solid var(--hbl-line); }
.hbl-step:last-child { border-right: 0; }
.hbl-step.is-current { background: var(--hbl-soft); box-shadow: inset 0 3px 0 var(--hbl-c); }
.hbl-step__name { font-weight: 700; }
.hbl-step.is-done .hbl-step__name::after { content: " ✓"; color: #00a32a; }
.hbl-step__pct { font-size: 24px; font-weight: 700; color: var(--hbl-c); margin: 6px 0 4px; }
.hbl-step__meta { font-size: 12px; color: var(--hbl-muted); }
.hbl-chip { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--hbl-soft); border: 1px solid var(--hbl-line); margin-top: 8px; }
.hbl-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.hbl-how { margin: 8px 0 0 18px; display: grid; gap: 6px; }
.hbl-promos { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.hbl-promos .hbl-chip { margin: 0 6px 0 0; color: #007017; }
.hbl-tablewrap { overflow-x: auto; }
.hbl-history { min-width: 560px; }
.hbl-r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hbl-history small { color: var(--hbl-muted); }
.hbl-pager { display: flex; gap: 6px; flex-wrap: wrap; }
.hbl-pager a, .hbl-pager span { padding: 4px 10px; border: 1px solid var(--hbl-line); border-radius: 4px; text-decoration: none; }
.hbl-pager span { font-weight: 700; }
.hbl-empty { padding: 16px; border: 1px dashed var(--hbl-line); border-radius: 10px; }

.hbl-redeem { border: 1px dashed currentColor; border-radius: 10px; padding: 14px; margin: 0 0 16px; display: grid; gap: 10px; }
.hbl-redeem.is-loading { opacity: .6; }
.hbl-redeem__head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.hbl-redeem__hint { margin: 0; font-size: 14px; opacity: .85; }
.hbl-redeem__slider { display: grid; gap: 2px; }
.hbl-redeem__range { width: 100%; margin: 4px 0; accent-color: #2271b1; cursor: pointer; }
.hbl-redeem__scale { display: flex; justify-content: space-between; font-size: 12px; opacity: .7; }
.hbl-redeem__row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hbl-redeem__input { width: 130px !important; }
.hbl-redeem__row .button { text-transform: none; }
.hbl-redeem__summary { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; font-size: 14px; padding: 8px 10px; border-radius: 6px; background: rgba(0,0,0,.04); font-variant-numeric: tabular-nums; }
.hbl-redeem__status { margin: 0; font-size: 13px; color: #007017; min-height: 1em; }
.hbl-redeem__status:empty { display: none; }
.hbl-redeem__status.is-pending { color: #8a4b00; }
.hbl-redeem__error { margin: 0; color: #b32d2e; }
.hbl-earn td strong { color: #007017; }
.hbl-badge { display: inline-block; background: #edfaef; color: #007017; border-radius: 4px; padding: 4px 10px; font-size: 14px; font-weight: 600; }

/* Theme overrides: themes such as WoodMart color and resize every price; inside the program UI amounts follow our styles. */
.hbl .woocommerce-Price-amount, .hbl .woocommerce-Price-amount bdi, .hbl .woocommerce-Price-currencySymbol { color: inherit !important; font-size: inherit !important; font-weight: inherit !important; }
.hbl-card .woocommerce-Price-amount, .hbl-card .woocommerce-Price-amount bdi { color: var(--hbl-card-fg) !important; }
.hbl-bal b, .hbl-bal b .woocommerce-Price-amount { font-size: 24px !important; font-weight: 700 !important; line-height: 1.3; }
.hbl-plus { color: #007017 !important; font-weight: 600; }
.hbl-minus { color: inherit; }

/* History as cards on phones instead of a sideways-scrolling table. */
@media (max-width: 640px) {
  .hbl-history { min-width: 0; border: 0; }
  .hbl-history thead { display: none; }
  .hbl-history, .hbl-history tbody, .hbl-history tr, .hbl-history td { display: block; width: 100%; }
  .hbl-history tr { border: 1px solid var(--hbl-line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
  .hbl-history td { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0 !important; border: 0 !important; text-align: right; }
  .hbl-history td::before { content: attr(data-title); color: var(--hbl-muted); text-align: left; flex: none; }
  .hbl-history td.hbl-r { font-size: 16px; }
}

/* Redeem box inside the checkout order table (under the products) and under the cart table. */
.hbl-redeem-row { width: 100%; }
/* Themes like WoodMart turn table rows into flex rows; make our cell take the full width. */
.hbl-redeem-row > td { flex: 1 1 100%; width: 100%; max-width: 100%; display: block; padding: 12px 0 !important; border-bottom: 0 !important; }
.hbl-redeem-row .hbl-redeem { margin: 0; text-align: left; font-weight: 400; }
.woocommerce-cart-form + .hbl-redeem, .woocommerce-cart-form ~ .hbl-redeem { margin: 16px 0; }

/* Shortcodes [hbl_balance] and [hbl_manager]: inline, inherit the theme's typography. */
.hbl-sc { display: inline; }
.hbl-sc a { color: inherit; }
.hbl-sc__value, .hbl-sc__name { font-weight: 600; white-space: nowrap; }
.hbl-sc__phone, .hbl-sc__email { white-space: nowrap; }

/* Each level in the ladder shows a strip of its own card style. */
.hbl-step { position: relative; }
.hbl-step::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--hbl-step-bg1, transparent), var(--hbl-step-bg2, transparent)); opacity: .55; }
.hbl-step.is-current { box-shadow: none; }
.hbl-step.is-current::before { height: 6px; opacity: 1; }
@media (prefers-reduced-motion: reduce) { .hbl-card { transition: none; } }

/* History: load more */
.hbl-history__more { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 8px; }
/* WoodMart wraps tables in .responsive-table with a 35px bottom margin. */
.hbl-tablewrap .responsive-table { margin-bottom: 0; }
.hbl-history__more .hbl-more { text-transform: none; }
.hbl-history__count { color: var(--hbl-muted); font-size: 13px; }
.hbl-history__error { flex-basis: 100%; margin: 0; color: #b32d2e; }
.hbl-pager[hidden] { display: none; }
.hbl-pager .page-numbers { padding: 4px 10px; border: 1px solid var(--hbl-line); border-radius: 4px; text-decoration: none; }
.hbl-pager .page-numbers.current { font-weight: 700; }

/* "Ваш менеджер": full-width strip at the top of the bonus page. */
.hbl-manager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; border: 1px solid var(--hbl-line); border-radius: 10px; padding: 12px 16px; }
.hbl-manager__who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; min-width: 0; }
.hbl-manager__label { color: var(--hbl-muted); font-size: 13px; }
.hbl-manager__name { font-size: 16px; font-weight: 700; }
.hbl-manager__meta { color: var(--hbl-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.hbl-manager__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hbl-contact { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--hbl-line); border-radius: 999px; font-size: 13px; line-height: 1.2; color: inherit !important; text-decoration: none !important; background: transparent; transition: background .15s, border-color .15s; white-space: nowrap; }
.hbl-contact:hover, .hbl-contact:focus-visible { background: var(--hbl-soft); border-color: currentColor; }
.hbl-contact svg { flex: none; }
@media (max-width: 640px) {
  .hbl-manager__actions { width: 100%; }
  .hbl-contact { flex: 1 1 calc(50% - 8px); justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .hbl-contact { transition: none; } }
.hbl-sc-manager--icons { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
/* [hbl_manager layout="lines"]: one contact per line, e.g. in a footer column. */
.hbl-sc-manager--lines { display: flex; flex-direction: column; gap: 4px; }
.hbl-sc-manager--lines .hbl-sc__label { font-weight: 600; }
