/* ================================================================
   WELCOME BONUS BANNER — welcome-banner.css
   ================================================================ */

:root {
  --wb-bg: linear-gradient(135deg, rgba(107, 4, 25, 0.97) 0%, rgba(127, 14, 18, 0.98) 52%, rgba(72, 8, 16, 0.98) 100%);
  --wb-surface: rgba(255, 255, 255, 0.06);
  --wb-border: rgba(255, 210, 173, 0.22);
  --wb-accent: var(--accent, #e48f56);
  --wb-accent-strong: var(--accent-strong, #f4a977);
  --wb-label-color: #ffd6b4;
  --wb-title-color: #fff8f1;
  --wb-subtitle-color: rgba(255, 240, 227, 0.82);
  --wb-cta-bg: var(--accent, #e48f56);
  --wb-cta-bg-hover: var(--accent-strong, #f4a977);
  --wb-cta-color: var(--accent-contrast, #6b0419);
  --wb-close-color: rgba(255, 247, 240, 0.86);
  --wb-close-hover: #ffffff;
  --wb-shadow: 0 -14px 40px rgba(24, 3, 8, 0.34);
  --wb-ring-track: rgba(255, 255, 255, 0.16);
  --wb-anim-speed: 0.5s;
}

.wb-banner {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 110;
  padding: 12px 52px calc(12px + env(safe-area-inset-bottom, 0px)) 16px;
  background: var(--wb-bg);
  border-top: 1px solid var(--wb-border);
  box-shadow: var(--wb-shadow);
  transform: translateY(110%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    transform var(--wb-anim-speed) cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity var(--wb-anim-speed) ease,
    visibility 0s linear var(--wb-anim-speed);
}

.wb-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(244, 169, 119, 0.22), transparent 32%),
    linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.03));
  pointer-events: none;
}

.wb-banner.wb-visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s, 0s, 0s;
}

.wb-banner.wb-hidden {
  transform: translateY(110%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.wb-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(100%, 1080px);
  margin: 0 auto;
}

.wb-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 14px;
  font-size: 1.35rem;
  line-height: 1;
  background: var(--wb-surface);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  filter: drop-shadow(0 0 10px rgba(244, 169, 119, 0.2));
  animation: wb-pulse 2s ease-in-out infinite;
}

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

  50% {
    transform: scale(1.08);
  }
}

.wb-text {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.wb-label {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wb-label-color);
}

.wb-title {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--wb-title-color);
}

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

.wb-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  flex: 0 0 auto;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--wb-cta-bg);
  color: var(--wb-cta-color);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(16, 2, 5, 0.2);
  transition:
    background-color 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.2s ease;
}

.wb-cta:hover {
  background: var(--wb-cta-bg-hover);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(16, 2, 5, 0.28);
}

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

.wb-cta:focus-visible,
.wb-close:focus-visible {
  outline: 2px solid #ffe6cf;
  outline-offset: 2px;
}

.wb-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--wb-close-color);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  transition:
    color 0.15s ease,
    transform 0.15s ease,
    background-color 0.15s ease;
}

.wb-close:hover {
  color: var(--wb-close-hover);
  background: rgba(255, 255, 255, 0.08);
  transform: rotate(90deg);
}

.wb-countdown {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  margin-right: 2px;
}

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

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

.wb-countdown-ring .track {
  fill: none;
  stroke: var(--wb-ring-track);
  stroke-width: 3;
}

.wb-countdown-ring .progress {
  fill: none;
  stroke: var(--wb-accent-strong);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 113.1;
  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.76rem;
  font-weight: 800;
  line-height: 1;
  color: #fff9f2;
}

.wb-countdown-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.wb-countdown-label {
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 240, 227, 0.56);
}

.wb-countdown-text {
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(255, 240, 227, 0.84);
}

.scrolltop {
  transition:
    bottom var(--wb-anim-speed) ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

body.wb-banner-visible .scrolltop {
  bottom: calc(var(--wb-banner-height, 92px) + 18px);
}

@media (max-width: 720px) {
  .wb-banner {
    padding: 12px 48px calc(12px + env(safe-area-inset-bottom, 0px)) 14px;
  }

  .wb-inner {
    gap: 10px;
  }

  .wb-icon {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    font-size: 1.2rem;
  }

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

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

@media (max-width: 520px) {
  .wb-banner {
    padding-right: 14px;
  }

  .wb-inner {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: center;
    gap: 10px 12px;
  }

  .wb-text {
    min-width: 0;
  }

  .wb-countdown {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .wb-cta {
    grid-column: 1 / -1;
    width: 100%;
  }

  .wb-close {
    top: 8px;
    right: 8px;
  }
}

@media (max-width: 380px) {
  .wb-banner {
    padding-top: 11px;
    padding-bottom: calc(11px + env(safe-area-inset-bottom, 0px));
  }

  .wb-label {
    font-size: 0.62rem;
  }

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

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

  .wb-cta {
    min-height: 40px;
    padding: 0 16px;
    font-size: 0.8rem;
  }
}

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

  .wb-countdown {
    display: none;
  }
}
