/* ================================================================
   WELCOME BONUS BANNER — welcome-banner.css
   ----------------------------------------------------------------
   НАСТРОЙКИ ЦВЕТОВ И СТИЛЕЙ — редактируйте переменные ниже:
   ================================================================ */

:root {
  /* --- Фон плашки --- */
  --wb-bg:             #14080a;
  --wb-bg-gradient:    linear-gradient(135deg, rgba(18, 7, 9, 0.98) 0%, rgba(41, 15, 12, 0.98) 55%, rgba(88, 31, 6, 0.98) 100%);

  /* --- Акцентный цвет (рамка, свечение, иконка) --- */
  --wb-accent:         #ffc547;

  /* --- Текст --- */
  --wb-label-color:    #ffd77e;
  --wb-title-color:    #fff7e8;
  --wb-subtitle-color: #ead7b5;

  /* --- Кнопка CTA --- */
  --wb-cta-bg:         linear-gradient(180deg, #fff0b9 0%, #ffc53f 50%, #ec8500 100%);
  --wb-cta-bg-hover:   linear-gradient(180deg, #fff5ca 0%, #ffcf53 50%, #f6920a 100%);
  --wb-cta-color:      #3d1300;

  /* --- Кнопка закрытия --- */
  --wb-close-color:    #fff7e8;
  --wb-close-hover:    #ffc547;

  /* --- Тень плашки --- */
  --wb-shadow:         0 -12px 40px rgba(0, 0, 0, 0.42);

  /* --- Скорость анимации появления (сек) --- */
  --wb-anim-speed:     0.5s;
}

/* ================================================================
   БАЗОВЫЕ СТИЛИ ПЛАШКИ — не трогайте если не уверены
   ================================================================ */

.wb-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  font-family: "Inter", "Segoe UI", sans-serif;
  background: var(--wb-bg-gradient);
  box-shadow: var(--wb-shadow);
  border-top: 2px solid var(--wb-accent);
  backdrop-filter: blur(16px);
  padding: 14px 20px;

  /* Скрыта по умолчанию — сдвинута вниз */
  transform: translateY(110%);
  opacity: 0;
  transition:
    transform var(--wb-anim-speed) cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity   var(--wb-anim-speed) ease;
}

/* Состояние «видима» — добавляется через JS */
.wb-banner.wb-visible {
  transform: translateY(0);
  opacity: 1;
}

/* Состояние «скрыта после закрытия» */
.wb-banner.wb-hidden {
  transform: translateY(110%);
  opacity: 0;
  pointer-events: none;
}

/* ---- Внутренний контейнер ---- */
.wb-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 960px;
  margin: 0 auto;
  padding-right: 44px;
}

/* ---- Иконка ---- */
.wb-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(233, 69, 96, 0.6));
  animation: wb-pulse 2s ease-in-out infinite;
}

@keyframes wb-pulse {
  0%, 100% { transform: scale(1);    }
  50%       { transform: scale(1.12); }
}

/* ---- Текстовый блок ---- */
.wb-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}

.wb-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--wb-label-color);
}

.wb-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--wb-title-color);
}

.wb-subtitle {
  font-size: 0.78rem;
  color: var(--wb-subtitle-color);
}

/* ---- Кнопка CTA ---- */
.wb-cta {
  display: inline-block;
  flex-shrink: 0;
  padding: 10px 22px;
  border-radius: 6px;
  background: var(--wb-cta-bg);
  color: var(--wb-cta-color);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.03em;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 2px 12px rgba(233, 69, 96, 0.4);
}

.wb-cta:hover {
  background: var(--wb-cta-bg-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(233, 69, 96, 0.55);
}

.wb-cta:active {
  transform: translateY(0);
}

.wb-cta:focus-visible,
.wb-close:focus-visible {
  outline: 3px solid rgba(255, 197, 71, 0.35);
  outline-offset: 3px;
}

/* ---- Кнопка закрытия ---- */
.wb-close {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--wb-close-color);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1;
  padding: 8px;           /* увеличенная зона клика */
  z-index: 2;
  transition: color 0.15s, transform 0.15s;
}

.wb-close:hover {
  color: var(--wb-close-hover);
  transform: translateY(-50%) rotate(90deg);
}

/* ---- Таймер обратного отсчёта ---- */
.wb-countdown {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  margin-right: 36px; /* отступ от крестика */
  gap: 2px;
}

.wb-countdown-ring {
  position: relative;
  width: 42px;
  height: 42px;
}

.wb-countdown-ring svg {
  transform: rotate(-90deg);
}

.wb-countdown-ring circle.track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 3;
}

.wb-countdown-ring circle.progress {
  fill: none;
  stroke: var(--wb-accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 113;   /* 2π × 18 */
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear;
}

.wb-countdown-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
}

.wb-countdown-label {
  font-size: 0.58rem;
  color: #a0aec0;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body.wb-banner-visible .scrolltop {
  bottom: 96px;
}

/* ---- Адаптив 520px ---- */
@media (max-width: 520px) {
  .wb-banner {
    padding: 12px 16px;
  }

  .wb-inner {
    flex-wrap: wrap;
    gap: 10px;
    padding-right: 34px;
  }

  .wb-title {
    font-size: 0.92rem;
  }

  .wb-subtitle {
    font-size: 0.74rem;
  }

  .wb-cta {
    width: 100%;
    text-align: center;
    padding: 10px;
  }

  body.wb-banner-visible .scrolltop {
    bottom: 124px;
  }
}

@media (max-width: 380px) {
  .wb-banner {
    padding: 10px 12px;
  }

  .wb-inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px 10px;
    padding-right: 22px;
  }

  .wb-icon {
    font-size: 1.45rem;
    align-self: start;
  }

  .wb-label {
    font-size: 0.55rem;
    letter-spacing: 0.08em;
  }

  .wb-title {
    font-size: 0.86rem;
    line-height: 1.12;
  }

  .wb-subtitle {
    font-size: 0.66rem;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .wb-cta {
    grid-column: 2 / 4;
    width: 100%;
    min-height: 38px;
    padding: 8px 12px;
    font-size: 0.78rem;
    line-height: 1.1;
  }

  .wb-countdown {
    margin-right: 0;
    gap: 0;
  }

  .wb-countdown-ring {
    width: 34px;
    height: 34px;
  }

  .wb-countdown-ring svg {
    width: 34px;
    height: 34px;
  }

  .wb-countdown-ring circle.track,
  .wb-countdown-ring circle.progress {
    stroke-width: 2.5;
  }

  .wb-countdown-num {
    font-size: 0.68rem;
  }

  .wb-countdown-label {
    font-size: 0.48rem;
  }

  .wb-close {
    top: 8px;
    right: 2px;
    transform: none;
    padding: 4px;
    font-size: 0.95rem;
  }

  .wb-close:hover {
    transform: rotate(90deg);
  }

  body.wb-banner-visible .scrolltop {
    bottom: 112px;
  }
}

@media (max-width: 340px) {
  .wb-icon {
    display: none;
  }

  .wb-inner {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .wb-cta {
    grid-column: 1 / 3;
  }
}

/* ---- Скрываем таймер на ≤300px ---- */
@media (max-width: 300px) {
  .wb-countdown {
    display: none;
  }

  .wb-close {
    right: 6px;
  }
}
