/* =============================================
   Sticky Banner — centered card layout
   ============================================= */

/*
   TT Norms: подключите шрифт в functions.php через @font-face (локальные файлы) или CDN TypeType.
   @font-face {
       font-family: 'TT Norms';
       src: url('/wp-content/themes/betru_new/fonts/tt-norms/TTNorms-Bold.woff2') format('woff2');
       font-weight: 700 900;
       font-display: swap;
   }
*/

/* Убираем отступы floating-layer для баннера */
#floating-layer > #sticky-banner {
  margin: 0 -1rem -1rem;
  width: calc(100% + 2rem);
  max-width: 100vw;
}

.sticky-banner {
  --sb-bg: #000000;
  --sb-btn: #e8620f;

  /* fixed by default so it doesn't reserve space in document flow before JS moves it to #floating-layer */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;

  display: block;
  text-decoration: none;
  cursor: pointer;
  height: auto;
  min-height: 70px;
  background-color: var(--sb-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 990;
  overflow: hidden;
  padding-bottom: 10px;

  animation: sb-enter 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: transform 0.3s ease;
}

/* Тёмный оверлей поверх фонового изображения */
.sticky-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  z-index: 0;
  pointer-events: none;
}

/* Радиальное свечение */
.sticky-banner__glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

@keyframes sb-enter {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* ── Основной контейнер — строка по центру ── */

.sticky-banner__body {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  max-width: 1270px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 14px;
  padding: 8px 44px 6px;
}

/* ── Логотип ─────────────────────────────────── */

.sticky-banner__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: sb-icon-breathe 5s ease-in-out infinite;
}

.sticky-banner__icon-img {
  display: block;
  height: 24px;
  width: auto;
  object-fit: contain;
}

@keyframes sb-icon-breathe {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.07);
  }
}

/* ── Текст ───────────────────────────────────── */

.sticky-banner__text {
  font-family: "TT Norms", "TT Norms Pro", sans-serif;
  font-size: clamp(16px, 2.5vw, 24px);
  font-weight: 900;
  font-style: italic;
  color: #fff;
  text-transform: uppercase;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-align: center;
}

/* Мобильный текст — скрыт на десктопе */
.sticky-banner__mob-text {
  display: none;
  font-family: "TT Norms", "TT Norms Pro", sans-serif;
  font-size: clamp(13px, 4vw, 18px);
  font-weight: 900;
  font-style: italic;
  color: #fff;
  text-transform: uppercase;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-align: center;
}

/* ── Событие дня ─────────────────────────────── */

.sticky-banner__event {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
  text-decoration: none;
  color: #fff;
  font-family: "TT Norms", "TT Norms Pro", sans-serif;
}

.sticky-banner__event-kf--1 {
  margin-left: 1px;
  margin-right: 8px;
}

.sticky-banner__event-kf--2 {
  margin-left: 8px;
  margin-right: 1px;
}

/* Горизонтальная строка: название — круг — VS — круг — название */
.sticky-banner__event-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

/* Названия команд — фиксированная ширина, чтобы круги/VS не съезжали из центра */
.sticky-banner__event-name {
  font-size: 11px;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.2;
  flex: 0 0 80px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sticky-banner__event-row .sticky-banner__event-name:first-child {
  text-align: right;
}

.sticky-banner__event-row .sticky-banner__event-name:last-child {
  text-align: left;
}

/* Иконки команд */
.sticky-banner__event-team {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
}

.sticky-banner__event-team img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.sticky-banner__event-team--left {
  border: 2px solid #fff;
}

.sticky-banner__event-team--right {
  border: 2px solid var(--sb-btn);
}

.sticky-banner__event-vs {
  font-family: "TT Norms", "TT Norms Pro", sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  flex-shrink: 0;
}

/* П1 / П2 — исход */
.sticky-banner__event-label {
  font-family: "TT Norms", "TT Norms Pro", sans-serif;
  font-size: 22px;
  font-weight: 900;
  font-style: italic;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
  line-height: 1;
  letter-spacing: -0.01em;
}

/* Коэффициент — крупное оранжевое число */
.sticky-banner__event-kf {
  display: inline-flex;
  align-items: flex-end;
  color: var(--sb-btn);
  font-size: 18px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.01em;
  white-space: nowrap;
  line-height: 1;
}

.sticky-banner__event-kf strong {
  font-size: 24px;
  line-height: 1;
}

.sticky-banner__event-kf-x {
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

/* ── Декор + кнопка (режим image) ────────────── */

.sticky-banner__center-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.sticky-banner__decor {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  animation: sb-decor-pulse 2.6s ease-in-out infinite;
}

.sticky-banner__decor-img {
  display: block;
  height: 50px;
  width: auto;
  object-fit: contain;
}

@keyframes sb-decor-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.09);
  }
}

/* ── Кнопка ──────────────────────────────────── */

.sticky-banner__btn-text--mob {
  display: none;
}

.sticky-banner__btn {
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 32px 0 24px;
  background: var(--sb-btn);
  color: #fff;
  font-family: "TT Norms", "TT Norms Pro", sans-serif;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  clip-path: polygon(12% 0%, 100% 0%, 88% 100%, 0% 100%);
  animation: sb-btn-glow 3.5s ease-in-out infinite;
}

.sticky-banner__btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 55%;
  height: 100%;
  background: linear-gradient(
    115deg,
    transparent 0%,
    rgba(255, 255, 255, 0.45) 50%,
    transparent 100%
  );
  animation: sb-btn-shine 3.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes sb-btn-shine {
  0% {
    left: -80%;
    opacity: 1;
  }
  45% {
    left: 130%;
    opacity: 1;
  }
  46% {
    opacity: 0;
  }
  100% {
    left: 130%;
    opacity: 0;
  }
}

@keyframes sb-btn-glow {
  0%,
  100% {
    filter: brightness(1);
  }
  22% {
    filter: brightness(1.18);
  }
}

/* ── Крестик ─────────────────────────────────── */

.sticky-banner__close {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 22px;
  height: 22px;
  padding: 0;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s;
  z-index: 3;
}

.sticky-banner__close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ── Дисклеймер ──────────────────────────────── */

.sticky-banner__disclaimer-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 18px;
  overflow: hidden;
}

.sticky-banner__disclaimer {
  display: inline-block;
  white-space: nowrap;
  margin: 0;
  padding: 2px 0;
  font-family: "TT Norms", "TT Norms Pro", sans-serif;
  font-size: 10px;
  line-height: 1.4;
  color: #aaa;
  animation: btr-marquee 20s linear infinite;
}

@keyframes btr-marquee {
  0% {
    transform: translateX(100vw);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* ── Десктоп ≥769px ─────────────────────────── */

@media (min-width: 769px) {
  .sticky-banner {
    min-height: 80px;
  }

  .sticky-banner__body {
    gap: 20px;
    padding: 10px 52px 6px;
  }

  .sticky-banner__icon-img {
    height: 28px;
  }

  .sticky-banner__event-team {
    width: 44px;
    height: 44px;
  }

  .sticky-banner__event-name {
    font-size: 12px;
    flex-basis: 90px;
  }

  .sticky-banner__event-row {
    gap: 10px;
  }

  .sticky-banner__event-vs {
    font-size: 13px;
  }

  .sticky-banner__event-label {
    font-size: 24px;
  }

  .sticky-banner__event-kf {
    font-size: 20px;
  }

  .sticky-banner__event-kf strong {
    font-size: 26px;
  }

  .sticky-banner__btn {
    height: 44px;
    padding: 0 40px 0 30px;
    font-size: 14px;
  }

  .sticky-banner__decor-img {
    height: 60px;
  }
}

/* ── Мобайл ≤560px ───────────────────────────── */

@media (max-width: 560px) {
  .sticky-banner {
    min-height: 100px;
  }

  .sticky-banner__body {
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 6px;
  }

  .sticky-banner__text {
    display: none;
  }

  .sticky-banner__mob-text {
    display: block;
  }

  .sticky-banner__icon-img {
    height: 20px;
  }

  .sticky-banner__event-row {
    gap: 6px;
  }

  .sticky-banner__event-team {
    width: 30px;
    height: 30px;
  }

  .sticky-banner__event-name {
    font-size: 10px;
    flex-basis: 56px;
  }

  .sticky-banner__event-kf {
    font-size: 15px;
  }

  .sticky-banner__event-kf strong {
    font-size: 18px;
  }

  .sticky-banner__event-vs {
    font-size: 10px;
  }

  .sticky-banner__btn-text--desk {
    display: none;
  }
  .sticky-banner__btn-text--mob {
    display: inline;
  }

  .sticky-banner__btn {
    height: 38px;
    padding: 0 22px 0 16px;
    font-size: 11px;
  }

  .sticky-banner__decor-img {
    height: 36px;
  }
}

/* ── ≤415px ──────────────────────────────────── */

@media (max-width: 415px) {
  .sticky-banner__event-name {
    display: none;
  }
}
