/* Бизнес Бонус — тема оформления. Токены совпадают с плагином, но имена классов префиксованы .bbt, чтобы не конфликтовать. */
:root {
  --bbt-primary: oklch(0.62 0.19 258);
  --bbt-fg: oklch(0.16 0.01 260);
  --bbt-muted: oklch(0.52 0.012 260);
  --bbt-border: oklch(0.925 0.004 260);
  --bbt-surface: oklch(0.98 0.002 260);
}

html { -webkit-text-size-adjust: 100%; }
html, body { min-height: 100%; }
body.bbt {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  color: var(--bbt-fg);
  font-family: "Manrope", ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
body.bbt a { color: var(--bbt-primary); text-decoration: none; }
body.bbt a:hover { text-decoration: underline; }
body.bbt img { max-width: 100%; height: auto; }
body.bbt * { box-sizing: border-box; }

.bbt-container { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.bbt-muted { color: var(--bbt-muted); }

/* Шапка */
.bbt-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--bbt-border); }
.bbt-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.bbt-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--bbt-fg); font-weight: 800; }
.bbt-brand:hover { text-decoration: none; }
.bbt-brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--bbt-primary); color: #fff; font-size: 13px; }
.bbt-nav { margin-left: auto; }
.bbt-menu { display: flex; align-items: center; gap: 24px; list-style: none; margin: 0; padding: 0; }
.bbt-menu a { color: var(--bbt-muted); font-weight: 600; font-size: 15px; }
.bbt-menu a:hover { color: var(--bbt-fg); text-decoration: none; }
.bbt-burger { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.bbt-burger span { display: block; width: 20px; height: 2px; margin: 4px 0; background: var(--bbt-fg); }
.bbt-theme-toggle { display: inline-flex; align-items: center; width: auto; height: 34px; flex: none; padding: 0 8px; border: 0; background: transparent; color: var(--bbt-primary); cursor: pointer; font: inherit; font-size: 14px; font-weight: 600; }
.bbt-theme-toggle:hover { color: var(--bbt-fg); }
.bbt-theme-toggle:focus-visible { outline: 2px solid var(--bbt-primary); outline-offset: 3px; border-radius: 6px; }
.bbt-theme-toggle:active { transform: scale(.9); }
.bbt-theme-icon { position: relative; display: block; width: 20px; height: 20px; pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
.bbt-theme-icon-moon { border-radius: 50%; background: currentColor; }
.bbt-theme-icon-moon::after { content: ""; position: absolute; top: -3px; right: -3px; width: 18px; height: 18px; border-radius: 50%; background: var(--bbt-header-color, #fff); }
.bbt-theme-icon-sun { border: 2px solid currentColor; border-radius: 50%; transform: scale(.78); opacity: 0; }
.bbt-theme-icon-sun::before { content: ""; position: absolute; inset: -6px; background: linear-gradient(currentColor, currentColor) center top / 2px 4px no-repeat, linear-gradient(currentColor, currentColor) center bottom / 2px 4px no-repeat, linear-gradient(90deg, currentColor, currentColor) left center / 4px 2px no-repeat, linear-gradient(90deg, currentColor, currentColor) right center / 4px 2px no-repeat; }
.bbt-theme-toggle[aria-pressed="true"] .bbt-theme-icon-moon { opacity: 0; transform: scale(.7); }
.bbt-theme-toggle[aria-pressed="true"] .bbt-theme-icon-sun { opacity: 1; transform: scale(.78); }
body.bbt { --bbt-header-color: #fff; }
body.bbt.is-dark { --bbt-header-color: #111820; }

/* Контент */
.bbt-main { padding: 32px 16px 64px; }
.bbt-title { font-size: clamp(26px, 4vw, 38px); font-weight: 800; letter-spacing: -0.02em; margin: 0 0 10px; }
.bbt-meta { color: var(--bbt-muted); font-size: 13px; }
.bbt-prose { max-width: 760px; }
.bbt-prose h2 { font-size: 24px; font-weight: 700; margin: 28px 0 10px; }
.bbt-prose h3 { font-size: 19px; font-weight: 700; margin: 22px 0 8px; }
.bbt-prose ul, .bbt-prose ol { padding-left: 20px; }
.bbt-prose blockquote { margin: 18px 0; padding: 12px 16px; border-left: 3px solid var(--bbt-primary); background: var(--bbt-surface); }
.bbt-list { display: grid; gap: 14px; margin-top: 18px; }
.bbt-card { border: 1px solid var(--bbt-border); border-radius: 14px; padding: 18px 20px; background: #fff; }
.bbt-card h2 { font-size: 19px; margin: 0 0 6px; }
.bbt-pagination { margin-top: 24px; }

/* Подвал */
.bbt-footer { flex: 0 0 auto; border-top: 1px solid var(--bbt-border); background: var(--bbt-surface); padding: 36px 0 20px; margin-top: auto; }
.bbt-site:has(.bbt-front) + .bbt-footer { margin-top: 56px; }
.bbt-footer-grid { display: grid; gap: 24px; grid-template-columns: 2fr 1fr 1fr; }
.bbt-footer h4 { margin: 0 0 8px; font-size: 15px; }
.bbt-footer p { margin: 4px 0; }
.bbt-footer-menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bbt-copy { color: var(--bbt-muted); font-size: 13px; padding-top: 18px; }

/* Совместимость с плагином: убираем двойные отступы вокруг его секций */
.bbt-site .bb-page { padding-top: 12px; }
.bbt-site .bb-hero { margin-top: -1px; }
.bbt-site .bb { font-family: inherit; }
.bbt-site { flex: 1 0 auto; width: 100%; }
.bbt-front { padding-bottom: 56px; }
/* Шорткоды плагина не должны сжиматься узкой колонкой текста */
.bbt-prose.bbt-wide, .bbt-main.bbt-wide { max-width: none; }
.bbt-wide > .bb, .bbt-prose > .bb { max-width: none; width: 100%; }
.bbt-prose:has(> .bb) { max-width: none; }
.bbt-wide.bbt-main, .bbt-main:has(.bb-catalog-layout) { padding-left: 0; padding-right: 0; max-width: none; }

@media (max-width: 860px) { .bbt-footer-grid { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .bbt-burger { display: block; }
  .bbt-nav { position: absolute; left: 0; right: 0; top: 64px; background: #fff; border-bottom: 1px solid var(--bbt-border); display: none; }
  .bbt-nav.is-open { display: block; }
  .bbt-menu { flex-direction: column; padding: 12px 16px; }
}

/* Плагин рисует свои кнопки — тема не должна перекрашивать их текст */
body.bbt .bb a.bb-btn { text-decoration: none; }
body.bbt .bb a.bb-btn-primary { color: #fff; }
body.bbt .bb a.bb-btn-ghost { color: var(--bbt-fg); }
body.bbt .bb-home-block:first-of-type { margin-top: 32px; }
body.bbt .bb-home-block:last-child { margin-bottom: 0; }

/* Dark theme is opt-in and persists in the browser. */
body.bbt.is-dark {
  --bbt-fg: #eef2f7;
  --bbt-muted: #aab5c4;
  --bbt-border: #344052;
  --bbt-surface: #202936;
  background: #111820;
}
body.bbt.is-dark .bbt-header { background: rgba(17, 24, 32, .92); }
body.bbt.is-dark .bbt-nav { background: #111820; }
body.bbt.is-dark .bbt-card { background: #19222d; }
body.bbt.is-dark .bb {
  --bb-fg: #eef2f7;
  --bb-muted: #aab5c4;
  --bb-surface: #202936;
  --bb-border: #344052;
  --bb-shadow: 0 1px 2px rgba(0, 0, 0, .25);
  --bb-lift: 0 10px 30px rgba(0, 0, 0, .28);
}
body.bbt.is-dark .bb-hero { background: radial-gradient(110% 80% at 50% -25%, rgba(45, 72, 135, .55), #111820 60%); }
body.bbt.is-dark .bb-pill,
body.bbt.is-dark .bb-btn-ghost,
body.bbt.is-dark .bb-card-service,
body.bbt.is-dark .bb-cat,
body.bbt.is-dark .bb-sidebar,
body.bbt.is-dark .bb-side-card,
body.bbt.is-dark .bb-lead,
body.bbt.is-dark .bb-faq details,
body.bbt.is-dark .bb-empty,
body.bbt.is-dark .bb-hero-search input,
body.bbt.is-dark .bb-catalog-search input[type="search"],
body.bbt.is-dark .bb-lead-form input { background: #19222d; color: var(--bb-fg); }
body.bbt.is-dark .bb-switch button.is-active { background: #2c394a; color: var(--bb-fg); }
body.bbt.is-dark .bb-promo-code { background: #202d43; }
body.bbt.is-dark .bb-footer { background: #151e28; }

@media (max-width: 720px) {
  .bbt-header-inner { min-height: 58px; gap: 8px; }
  .bbt-brand-name { max-width: 45vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bbt-theme-toggle { margin-left: auto; }
  .bbt-nav { top: 58px; }
  .bbt-main { padding: 24px 12px 48px; }
  .bbt-front { padding-bottom: 48px; }
  .bbt-site:has(.bbt-front) + .bbt-footer { margin-top: 48px; }
  .bbt-title { font-size: clamp(25px, 8vw, 34px); }
  .bbt-footer { padding-top: 28px; }
}
