/* BashBTC — доработки 28.11.2026: панель связи, читаемость, плавность.
   Подключается отдельно от premium-3d.*, удаление файла возвращает сайт как был. */

/* Плавные переходы между страницами (браузеры с View Transitions) */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: .28s; }

/* Якоря не прячутся под липкой шапкой */
section, [id] { scroll-margin-top: 104px; }

/* Читаемость текста */
main p { text-wrap: pretty; }
main h1, main h2, main h3 { text-wrap: balance; }
main section p { max-width: 68ch; }
main section [class*="text-center"] p,
main section p[class*="mx-auto"] { margin-left: auto; margin-right: auto; }
@media (max-width: 640px) {
  main p { font-size: 17px; line-height: 1.6; }
  main h1 { line-height: 1.12; }
}

/* Заметный фокус для клавиатуры */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--wood, #b5895a);
  outline-offset: 3px;
}

/* ===== Панель связи ===== */
.bb-contact {
  position: fixed; z-index: 60;
  right: 20px; bottom: 20px;
  display: flex; gap: 10px; align-items: center;
  font-family: var(--font-body, system-ui, sans-serif);
  transition: transform .3s ease, opacity .3s ease;
}
.bb-contact.bb-hidden { opacity: 0; transform: translateY(16px); pointer-events: none; }
.bb-contact a {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 20px; border-radius: 999px;
  font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap;
  box-shadow: 0 8px 24px rgba(22, 30, 36, .22);
  transition: transform .2s ease, box-shadow .2s ease;
}
.bb-contact a:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(22, 30, 36, .28); }
.bb-contact svg { width: 20px; height: 20px; flex: none; }
.bb-tg { background: #229ed9; color: #fff; }
.bb-wa { background: #fff; color: #161e24; width: 52px; padding: 0 !important; }
.bb-tel { background: #fff; color: #161e24; width: 52px; padding: 0 !important; }
.bb-wa svg { color: #25d366; }
.bb-tel svg { color: var(--wood-deep, #8a6538); }
.bb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (max-width: 767px) {
  .bb-contact {
    left: 0; right: 0; bottom: 0; gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--line, #d5dde2);
  }
  .bb-contact a { height: 48px; box-shadow: none; }
  .bb-tg { flex: 1; }
  .bb-wa, .bb-tel { width: 48px; border: 1px solid var(--line, #d5dde2); }
  body.bb-has-bar { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
}

/* ===== Блок доверия на первом экране ===== */
.bb-trust {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: 28px; margin-bottom: 8px;
  font-family: var(--font-body, system-ui, sans-serif);
}
.bb-trust-item {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 14px;
  background: rgba(10, 16, 20, .55);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(6px);
  color: #fff; text-decoration: none;
  transition: background .2s ease, border-color .2s ease;
}
a.bb-trust-item:hover { background: rgba(10, 16, 20, .72); border-color: rgba(255, 255, 255, .32); }
.bb-trust-stars { display: inline-flex; gap: 1px; color: #f5b83d; }
.bb-trust-stars svg { width: 15px; height: 15px; }
.bb-trust-rate { font-size: 20px; font-weight: 700; line-height: 1; }
.bb-trust-meta { font-size: 13px; line-height: 1.2; color: rgba(255, 255, 255, .78); }
@media (max-width: 640px) {
  .bb-trust { gap: 8px; margin-top: 20px; }
  .bb-trust-item { width: 100%; padding: 10px 14px; }
  .bb-trust-plain { display: none; }
}

/* ===== CTA в блоке «Как проходит обмен» ===== */
.bb-steps-cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 12px 20px; margin: 40px auto 20px; text-align: center;
  font-family: var(--font-body, system-ui, sans-serif);
}
.bb-steps-tg {
  display: inline-flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 24px; border-radius: 999px;
  background: #229ed9; color: #fff; font-weight: 600; font-size: 16px; text-decoration: none;
  box-shadow: 0 8px 24px rgba(34, 158, 217, .28);
  transition: transform .2s ease, box-shadow .2s ease;
}
.bb-steps-tg:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(34, 158, 217, .36); }
.bb-steps-tg svg { width: 20px; height: 20px; }
.bb-steps-note { font-size: 14px; opacity: .72; }
@media (max-width: 640px) { .bb-steps-tg { width: 100%; justify-content: center; font-size: 15px; } }

/* ===== «Как нас найти» на контактах ===== */
.bb-find { padding: 80px 0; background: var(--background, transparent); }
.bb-find-inner { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.bb-find-eyebrow {
  font-family: var(--font-mono, ui-monospace, monospace); font-size: 12px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--wood, #b5895a); text-align: center; margin-bottom: 12px;
}
.bb-find-title {
  font-family: var(--font-display, Georgia, serif); font-size: clamp(30px, 4vw, 44px);
  font-weight: 700; text-align: center; margin: 0 0 40px;
}
.bb-find-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.bb-find-card {
  margin: 0; border-radius: 20px; overflow: hidden;
  border: 1px solid rgba(127, 127, 127, .22); background: rgba(127, 127, 127, .06);
}
.bb-find-photo { aspect-ratio: 4 / 3; overflow: hidden; }
.bb-find-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.bb-find-card:hover .bb-find-photo img { transform: scale(1.03); }
.bb-find-card figcaption { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 22px; font-family: var(--font-body, system-ui, sans-serif); }
.bb-find-num { font-family: var(--font-mono, ui-monospace, monospace); font-size: 13px; color: var(--wood, #b5895a); }
.bb-find-card strong { font-size: 18px; line-height: 1.3; }
.bb-find-card figcaption span:last-child { font-size: 15px; line-height: 1.55; opacity: .78; }
.bb-find-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }
.bb-find-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 22px; border-radius: 999px;
  font: 600 15px/1 var(--font-body, system-ui, sans-serif); text-decoration: none;
  border: 1px solid rgba(127, 127, 127, .4); color: inherit; transition: transform .2s ease, background .2s ease;
}
.bb-find-btn:hover { transform: translateY(-2px); }
.bb-find-btn--primary { background: #fc3f1d; border-color: #fc3f1d; color: #fff; }
.bb-find-btn--tg { background: #229ed9; border-color: #229ed9; color: #fff; }
.bb-find-btn svg { width: 18px; height: 18px; }
@media (max-width: 900px) { .bb-find-grid { grid-template-columns: 1fr; } .bb-find { padding: 56px 0; } }
@media (max-width: 640px) { .bb-find-btn { width: 100%; justify-content: center; } }

/* ===== Уведомление ===== */
.bb-toast {
  position: fixed; z-index: 70; left: 50%; bottom: 96px; transform: translateX(-50%);
  max-width: min(92vw, 460px); padding: 14px 18px; border-radius: 14px;
  background: #161e24; color: #fff; font: 500 15px/1.4 var(--font-body, system-ui, sans-serif);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .3); transition: opacity .5s ease;
}
.bb-toast--hide { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  .bb-contact, .bb-contact a { transition: none; }
}

@media print { .bb-contact { display: none; } }

/* Правовая оговорка в подвале: в исходном слое цвет брался от фона и текст
   сливался с подвалом в обеих темах. */
body .bt3d-legal, body .bt3d-legal p { color: var(--muted-foreground) !important; }
body .bt3d-legal { border-top-color: var(--border); }
body .bt3d-legal__requisites { color: var(--foreground) !important; }
/* Служебная мобильная панель надстройки без стилей — её заменяет .bb-contact */
.bashbtc-mobile-actions { display: none !important; }
