/* PTB Bonus promo — floating CTA + auth-style modal */

.ptb-bonus-promo {
  --ptb-bp-text: #343434;
  --ptb-bp-muted: #6b7280;
  font-family: "Onest", -apple-system, BlinkMacSystemFont, sans-serif;
}

body.ptb-checkout-page-active .ptb-bonus-promo__fab {
  display: none !important;
}

.ptb-bonus-promo__fab {
  --ptb-bp-fab-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  position: fixed;
  left: 50%;
  bottom: var(--ptb-bp-fab-bottom);
  z-index: 10055;
  width: auto;
  max-width: calc(100vw - 32px);
  transform: translateX(-50%);
  pointer-events: none;
  visibility: visible;
  opacity: 1;
  transition: bottom 0.25s ease;
}

/* Cookie banner visible → lift FAB clearly above it */
body.js-agreement-visible .ptb-bonus-promo__fab,
body:has(.js-agreement-form) .ptb-bonus-promo__fab {
  --ptb-bp-fab-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

.ptb-bonus-promo__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.12), 0 1px 3px rgba(15, 23, 42, 0.06);
  cursor: pointer;
  font: inherit;
  text-transform: none;
  letter-spacing: normal;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ptb-bonus-promo__pill:hover {
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.16), 0 1px 3px rgba(15, 23, 42, 0.08);
}

.ptb-bonus-promo__pill:active {
  transform: scale(0.98);
}

.ptb-bonus-promo__pulse {
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0f766e;
  box-shadow: 0 0 0 0 rgba(15, 118, 110, 0.4);
  animation: ptb-bonus-promo-pulse 2s ease-out infinite;
}

.ptb-bonus-promo__label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-transform: none;
  color: var(--ptb-bp-text);
}

@keyframes ptb-bonus-promo-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(15, 118, 110, 0.45);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(15, 118, 110, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(15, 118, 110, 0);
  }
}

@media (min-width: 768px) {
  .ptb-bonus-promo__pill {
    gap: 10px;
    padding: 14px 22px;
  }

  .ptb-bonus-promo__pulse {
    flex: 0 0 9px;
    width: 9px;
    height: 9px;
  }

  .ptb-bonus-promo__label {
    font-size: 16px;
  }
}

@media (max-width: 767px) {
  .ptb-bonus-promo__fab {
    --ptb-bp-fab-bottom: max(8px, env(safe-area-inset-bottom, 0px));
  }

  body.js-agreement-visible .ptb-bonus-promo__fab,
  body:has(.js-agreement-form) .ptb-bonus-promo__fab {
    --ptb-bp-fab-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }
}

/* Modal — same shell as phone auth (ptb-checkout-modal) */
.ptb-bonus-promo__modal.ptb-checkout-modal {
  position: fixed;
  inset: 0;
  z-index: 1000002;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  height: 100dvh;
  padding: 20px;
  box-sizing: border-box;
}

.ptb-bonus-promo__modal[hidden] {
  display: none !important;
}

.ptb-bonus-promo__modal .ptb-checkout-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(52, 52, 52, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.ptb-bonus-promo__modal .ptb-checkout-modal__dialog {
  position: relative;
  background: #fff;
  border-radius: 20px;
  max-width: 400px;
  width: 100%;
  max-height: min(88vh, 640px);
  overflow: auto;
  padding: 18px 18px 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
  animation: ptb-bonus-promo-modal-in 0.25s ease;
}

@keyframes ptb-bonus-promo-modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.ptb-bonus-promo__modal .ptb-checkout-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #f0f1f3;
  cursor: pointer;
  color: #6b6b6b;
  overflow: hidden;
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  font-size: 0;
  transition: background 0.2s, color 0.2s;
}

.ptb-bonus-promo__modal .ptb-checkout-modal__close:hover {
  background: #e4e5e8;
  color: var(--ptb-bp-text);
}

.ptb-bonus-promo__modal .ptb-checkout-modal__close-glyph {
  position: relative;
  display: block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.ptb-bonus-promo__modal .ptb-checkout-modal__close-glyph::before,
.ptb-bonus-promo__modal .ptb-checkout-modal__close-glyph::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 2px;
  margin: 0;
  background: currentColor;
  border-radius: 1px;
  transform-origin: center center;
}

.ptb-bonus-promo__modal .ptb-checkout-modal__close-glyph::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.ptb-bonus-promo__modal .ptb-checkout-modal__close-glyph::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.ptb-bonus-promo__modal .ptb-checkout-modal__title {
  margin: 0 36px 10px 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ptb-bp-text);
  text-transform: none;
}

.ptb-bonus-promo__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ptb-bonus-promo__subscribe {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 500;
  color: var(--ptb-bp-text);
}

.ptb-bonus-promo__channels {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ptb-bonus-promo__channel {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid #f0f0f0;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.ptb-bonus-promo__channel:hover {
  background: #fff;
  border-color: #e5e7eb;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  text-decoration: none;
  color: inherit;
}

.ptb-bonus-promo__channel-icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #ebebeb;
  padding: 8px;
  box-sizing: border-box;
  line-height: 0;
  overflow: hidden;
}

.ptb-bonus-promo__channel-icon img {
  display: block;
  width: 24px;
  height: 24px;
  margin: 0;
  object-fit: contain;
}

.ptb-bonus-promo__channel-label {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-transform: none;
  color: #111827;
}

.ptb-bonus-promo__channel-value {
  flex: 0 0 auto;
  margin: 0 6px 0 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  color: #0f766e;
}

.ptb-bonus-promo__channel-chevron {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid #9ca3af;
  border-bottom: 2px solid #9ca3af;
  transform: rotate(-45deg);
  margin-right: 2px;
}

.ptb-bonus-promo__lead {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ptb-bp-muted);
}

.ptb-bonus-promo__rules {
  margin: 0;
  padding: 0;
}

.ptb-bonus-promo__rules-title {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  color: #9ca3af;
  text-transform: none;
}

.ptb-bonus-promo__rules-list {
  margin: 2px 0 0 !important;
  padding: 0 0 0 14px !important;
  list-style: disc;
}

.ptb-bonus-promo__rules-list li {
  margin: 0 0 1px !important;
  padding: 0 !important;
  font-size: 11px;
  line-height: 1.3;
  color: #9ca3af;
}

.ptb-bonus-promo__rules-list li:last-child {
  margin-bottom: 0;
}

body.ptb-bonus-promo-open {
  overflow: hidden;
}

