/* ══════════════════════════════════════════════════════
   EnryBike Promo – Popup sconto & Widget WhatsApp
   ══════════════════════════════════════════════════════ */

/* ── Overlay ── */
#eb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: eb-fadeIn .3s ease;
}
#eb-overlay.eb-hidden { display: none !important; }

/* ── Popup card ── */
#eb-popup {
  background: #fff;
  border-radius: 16px;
  width: 92%;
  max-width: 460px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  animation: eb-slideUp .35s ease;
  position: relative;
}

#eb-popup .eb-popup-top {
  background: linear-gradient(135deg, #2fb5d2 0%, #1a8fa8 100%);
  padding: 32px 28px 24px;
  text-align: center;
  color: #fff;
}
#eb-popup .eb-popup-top .eb-tag {
  display: inline-block;
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 4px 14px;
  margin-bottom: 14px;
}
#eb-popup .eb-popup-top h2 {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 8px;
  color: #fff;
}
#eb-popup .eb-popup-top h2 .eb-amount {
  font-size: 46px;
  display: block;
}
#eb-popup .eb-popup-top p {
  font-size: 14px;
  opacity: .9;
  line-height: 1.5;
}

#eb-popup .eb-popup-body {
  padding: 24px 28px 28px;
  text-align: center;
}
.eb-info-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 22px;
}
.eb-info-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #666;
}
.eb-info-item .eb-icon { font-size: 22px; }
.eb-info-item strong { font-size: 13px; color: #222; }

/* Codice sconto */
.eb-code-box {
  background: #f0fbfd;
  border: 2px dashed #2fb5d2;
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.eb-code-box .eb-code {
  font-family: 'Courier New', monospace;
  font-size: 20px;
  font-weight: 700;
  color: #1a8fa8;
  letter-spacing: 2px;
}
.eb-copy-btn {
  background: #2fb5d2;
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
  white-space: nowrap;
}
.eb-copy-btn:hover  { background: #1a8fa8; }
.eb-copy-btn.eb-ok  { background: #27ae60; }

/* CTA button */
.eb-cta-btn {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, #2fb5d2, #1a8fa8);
  color: #fff !important;
  border: none;
  border-radius: 10px;
  padding: 15px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none !important;
  text-align: center;
  transition: opacity .2s, transform .15s;
}
.eb-cta-btn:hover { opacity: .92; transform: translateY(-1px); }

.eb-optout-row {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #666;
  cursor: pointer;
}
.eb-optout-row input {
  margin: 0;
  width: 14px;
  height: 14px;
}

.eb-dismiss {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  color: #999;
  cursor: pointer;
  background: none;
  border: none;
  text-decoration: underline;
}
.eb-dismiss:hover { color: #666; }

.eb-close-btn {
  position: absolute;
  top: 12px; right: 14px;
  background: rgba(255,255,255,.25);
  border: none;
  color: #fff;
  border-radius: 50%;
  width: 30px; height: 30px;
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
  line-height: 1;
}
.eb-close-btn:hover { background: rgba(255,255,255,.45); }

/* ══════════════════════════════════════
   Widget WhatsApp floating
══════════════════════════════════════ */
#eb-whatsapp {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 99997;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

#eb-wa-bubble {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0,0,0,.18);
  padding: 14px 32px 14px 16px;
  max-width: 240px;
  font-size: 13px;
  line-height: 1.5;
  color: #333;
  position: relative;
  animation: eb-slideUp .4s ease;
}
#eb-wa-bubble::after {
  content: '';
  position: absolute;
  bottom: -8px; right: 22px;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #fff;
}
#eb-wa-bubble .eb-wa-close {
  position: absolute;
  top: 6px; right: 8px;
  background: none; border: none;
  font-size: 14px; color: #aaa;
  cursor: pointer; line-height: 1;
}
#eb-wa-bubble.eb-hidden { display: none !important; }

#eb-wa-btn-wrap { position: relative; display: inline-block; }

#eb-wa-btn {
  width: 62px; height: 62px;
  background: #25d366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(37,211,102,.5);
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
  animation: eb-pulse 2.5s infinite;
}
#eb-wa-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 28px rgba(37,211,102,.65);
}
#eb-wa-btn svg { width: 34px; height: 34px; fill: #fff; }

#eb-wa-badge {
  position: absolute;
  top: -4px; right: -4px;
  background: #e74c3c;
  color: #fff;
  border-radius: 50%;
  width: 20px; height: 20px;
  font-size: 11px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
}

.eb-reopen-popup {
  position: fixed;
  left: 16px;
  bottom: 18px;
  z-index: 99996;
  border: 0;
  border-radius: 999px;
  background: #1a8fa8;
  color: #fff;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2px;
  box-shadow: 0 6px 18px rgba(0,0,0,.2);
  cursor: pointer;
}
.eb-reopen-popup:hover {
  opacity: .92;
}
.eb-reopen-popup.eb-hidden {
  display: none !important;
}

/* ── Keyframes ── */
@keyframes eb-fadeIn  { from { opacity: 0 } to { opacity: 1 } }
@keyframes eb-slideUp { from { transform: translateY(30px); opacity: 0 } to { transform: translateY(0); opacity: 1 } }
@keyframes eb-pulse {
  0%, 100% { box-shadow: 0 6px 20px rgba(37,211,102,.5); }
  50%       { box-shadow: 0 6px 28px rgba(37,211,102,.8), 0 0 0 10px rgba(37,211,102,.1); }
}

@media (max-width: 480px) {
  #eb-popup .eb-popup-top h2 .eb-amount { font-size: 36px; }
  #eb-popup .eb-popup-top { padding: 24px 20px 18px; }
  #eb-popup .eb-popup-body { padding: 20px; }
  #eb-whatsapp { bottom: 16px; right: 16px; }
  #eb-wa-btn { width: 54px; height: 54px; }
  .eb-reopen-popup { left: 12px; bottom: 12px; font-size: 11px; }
}
