/* Плашка «Made by Bloom Code» и попап «это демо».
   Подключается ко всем демо-сайтам витрины через /etc/nginx/sites/badge.inc.
   Отступ снизу на десктопе приходит от nginx в --bcb-bottom (у части сайтов
   в правом углу уже висит своя кнопка, и плашку нужно поднять над ней). */

a.bcb-badge {
  position: fixed;
  right: 16px;
  bottom: var(--bcb-bottom, 16px);
  z-index: 2147483000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(16, 17, 20, .82);
  color: #fff;
  text-decoration: none;
  font: 500 13px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  letter-spacing: .01em;
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 6px 24px -8px rgba(0, 0, 0, .45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background-color .2s ease, transform .2s ease;
}
a.bcb-badge:hover { background: rgba(16, 17, 20, .94); transform: translateY(-1px); }
a.bcb-badge:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

i.bcb-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
  background: linear-gradient(135deg, #7cc9ff, #3b82f6);
}

/* На мобильном у сайтов своя нижняя панель (от 61 до 83 px). Поднимаем плашку
   выше самой высокой из них, чтобы она ни на одном не перекрывала кнопку
   записи или навигацию. Значение общее: разброс мал, и держать восемь
   отдельных чисел ради пары десятков пикселей не стоит. */
@media (max-width: 767px) {
  a.bcb-badge {
    right: 12px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 122px);
    padding: 7px 12px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  a.bcb-badge { transition: none; }
  a.bcb-badge:hover { transform: none; }
}

@media print { a.bcb-badge { display: none; } }

/* ── Попап «это демонстрационная версия» ───────────────────────────────────
   Нейтрально-тёмная карточка: восемь сайтов витрины оформлены очень по-разному,
   и попап не пытается попасть в стиль каждого — он сознательно читается как
   слой поверх сайта, той же тёмной подложки, что и плашка. */

.bcb-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font: 400 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
.bcb-modal.bcb-open { display: flex; }

.bcb-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 9, 11, .62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: bcb-fade .18s ease both;
}

.bcb-modal__card {
  position: relative;
  width: 100%;
  max-width: 420px;
  box-sizing: border-box;
  padding: 26px 26px 22px;
  border-radius: 20px;
  background: rgba(20, 21, 25, .97);
  color: #fff;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 30px 80px -24px rgba(0, 0, 0, .75);
  animation: bcb-rise .2s cubic-bezier(.2, .7, .3, 1) both;
}

.bcb-modal__mark {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .62);
}

.bcb-modal__title {
  margin: 12px 0 0;
  font-size: 21px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -.01em;
  color: #fff;
}

.bcb-modal__text {
  margin: 10px 0 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, .72);
}

.bcb-modal__actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.bcb-modal__btn {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  cursor: pointer;
  flex: 1 1 auto;
  min-width: 140px;
  padding: 11px 18px;
  border-radius: 12px;
  text-align: center;
  font: 500 14px/1.2 inherit;
  text-decoration: none;
  transition: background-color .18s ease, transform .18s ease, border-color .18s ease;
}
.bcb-modal__btn--ghost {
  background: transparent;
  color: rgba(255, 255, 255, .82);
  border: 1px solid rgba(255, 255, 255, .22);
}
.bcb-modal__btn--ghost:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.bcb-modal__btn--cta {
  background: linear-gradient(135deg, #7cc9ff, #3b82f6);
  color: #0a1220;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bcb-modal__btn--cta:hover { transform: translateY(-1px); }
.bcb-modal__btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

@keyframes bcb-fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes bcb-rise {
  from { opacity: 0; transform: translateY(10px) scale(.985) }
  to { opacity: 1; transform: none }
}

@media (prefers-reduced-motion: reduce) {
  .bcb-modal__backdrop, .bcb-modal__card { animation: none; }
  .bcb-modal__btn { transition: none; }
  .bcb-modal__btn--cta:hover { transform: none; }
}

@media (max-width: 479px) {
  .bcb-modal__card { padding: 22px 20px 18px; }
  .bcb-modal__title { font-size: 19px; }
  .bcb-modal__btn { flex: 1 1 100%; }
}
