/* ========================================
   Sticky CTA — floating dock
======================================== */

.sticky-cta {
  position: fixed;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 950;

  padding: 0;

  pointer-events: none;

  visibility: hidden;
  opacity: 0;

  transform: translateY(calc(100% + 50px));

  transition:
    visibility 0.3s ease,
    opacity 0.3s ease,
    transform 0.3s ease;
}

.sticky-cta.is-visible {
  visibility: visible;
  opacity: 1;

  transform: translateY(0);
}

.sticky-cta:not(.is-visible) .sticky-cta__inner {
  pointer-events: none;
}

.sticky-cta__inner {
  width: min(1060px, 100%);
  min-height: 74px;
  margin: 0 auto;
  padding: 10px 10px 10px 18px;

  display: grid;
  grid-template-columns:
    minmax(90px, 130px)
    minmax(190px, 1fr)
    minmax(170px, 220px)
    minmax(155px, 185px);

  align-items: center;
  gap: 16px;

  background: linear-gradient(110deg, rgba(255, 49, 90, 0.09), transparent 28%), rgba(15, 20, 31, 0.96);

  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;

  box-shadow:
    0 22px 60px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  pointer-events: auto;
}

/* Logo */

.sticky-cta__logo {
  min-width: 0;

  display: flex;
  align-items: center;

  color: #fff;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

.sticky-cta__logo img {
  display: block;

  width: auto;
  max-width: 112px;
  height: auto;
  max-height: 34px;

  margin: 0;
  border-radius: 0;
  object-fit: contain;
}

/* Bonus */

.sticky-cta__bonus {
  min-width: 0;
  padding-left: 16px;

  display: grid;
  gap: 5px;

  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.sticky-cta__bonus span {
  color: rgba(255, 255, 255, 0.48);

  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sticky-cta__bonus strong {
  display: block;

  color: #fff;

  font-size: clamp(14px, 1.4vw, 18px);
  font-weight: 900;
  line-height: 1.15;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Promo code */

.sticky-cta__code {
  position: relative;

  min-width: 0;
  min-height: 52px;
  padding: 9px 46px 9px 15px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;

  background: rgba(255, 255, 255, 0.035);
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 16px;

  cursor: pointer;
  user-select: none;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.sticky-cta__code span {
  color: rgba(255, 255, 255, 0.44);

  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.sticky-cta__code strong {
  display: block;

  color: #ff5475;

  font-size: 15px;
  font-weight: 950;
  line-height: 1.1;
  letter-spacing: 0.05em;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sticky-cta__code:hover {
  background: rgba(255, 49, 90, 0.08);
  border-color: rgba(255, 84, 117, 0.65);

  transform: translateY(-1px);
}

.sticky-cta__copy-icon {
  position: absolute;
  top: 50%;
  right: 15px;

  width: 28px;
  height: 28px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: rgba(255, 255, 255, 0.55);
  font-size: 15px;
  line-height: 1;

  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;

  transform: translateY(-50%);

  transition:
    color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.sticky-cta__code:hover .sticky-cta__copy-icon {
  color: #fff;
  background: rgba(255, 49, 90, 0.2);

  transform: translateY(-50%) scale(1.06);
}

.sticky-cta__code.is-copied {
  background: rgba(16, 185, 129, 0.12);
  border-color: #10b981;
}

.sticky-cta__code.is-copied .sticky-cta__copy-icon {
  color: #fff;
  background: #10b981;

  transform: translateY(-50%) scale(1.08);
}

.sticky-cta__promo {
  position: relative;

  cursor: pointer;

  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.sticky-cta__promo:hover {
  border-color: rgba(255, 49, 90, 0.55);

  background: rgba(255, 49, 90, 0.06);
}

.sticky-cta__promo.is-copied {
  transform: scale(1.02);

  background: rgba(255, 49, 90, 0.12);
  border-color: var(--accent);

  box-shadow: 0 0 18px rgba(255, 49, 90, 0.16);
}

/* Button */

.sticky-cta__button {
  min-height: 54px;
  padding: 12px 20px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: #fff !important;

  background: linear-gradient(135deg, #ff5475 0%, #ff315a 55%, #d91f46 100%);

  border: 0;
  border-radius: 16px;

  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;

  box-shadow:
    0 12px 26px rgba(255, 49, 90, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.sticky-cta__button:hover {
  filter: brightness(1.06);

  transform: translateY(-2px);

  box-shadow:
    0 16px 32px rgba(255, 49, 90, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

/* Tablet */

@media (max-width: 900px) {
  .sticky-cta {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }

  .sticky-cta__inner {
    grid-template-columns:
      minmax(0, 1fr)
      minmax(160px, 210px)
      minmax(145px, 175px);

    padding-left: 16px;
    gap: 12px;
  }

  .sticky-cta__logo {
    display: none;
  }

  .sticky-cta__bonus {
    padding-left: 0;
    border-left: 0;
  }
}

/* Mobile */

@media (max-width: 640px) {
  .sticky-cta {
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    left: 8px;
  }

  .sticky-cta__inner {
    min-height: auto;
    padding: 7px;

    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;

    border-radius: 17px;
  }

  .sticky-cta__logo,
  .sticky-cta__bonus {
    display: none;
  }

  .sticky-cta__code {
    min-height: 46px;
    padding: 7px 38px 7px 12px;

    border-radius: 12px;
  }

  .sticky-cta__code span {
    font-size: 8px;
  }

  .sticky-cta__code strong {
    font-size: 13px;
  }

  .sticky-cta__copy-icon {
    right: 9px;

    width: 26px;
    height: 26px;

    font-size: 13px;
  }

  .sticky-cta__button {
    min-height: 46px;
    padding: 10px 17px;

    border-radius: 12px;

    font-size: 11px;
  }

  .scroll-top {
    right: 12px;
    bottom: 78px;

    width: 42px;
    height: 42px;
  }
}

/* Very small screens */

@media (max-width: 390px) {
  .sticky-cta__inner {
    grid-template-columns: minmax(0, 1fr) 116px;
  }

  .sticky-cta__button {
    padding-right: 9px;
    padding-left: 9px;

    font-size: 10px;
  }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
  .sticky-cta__code,
  .sticky-cta__copy-icon,
  .sticky-cta__button {
    transition: none;
  }
}
