/* =========================================================
   WhatsApp Viral Share — Frontend Styles
   ========================================================= */

/* ── Reset helpers ── */
.wvs-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .3px;
  color: #fff !important;
  text-decoration: none !important;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
  box-shadow: 0 4px 18px rgba(37,211,102,.35);
  padding: 14px 26px;
  white-space: nowrap;
}
.wvs-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 28px rgba(37,211,102,.45);
  filter: brightness(1.06);
}
.wvs-btn:active { transform: scale(.97); }
.wvs-btn svg { flex-shrink: 0; }

/* ── Scroll Progress Bar ── */
#wvs-progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 4px;
  width: 0%;
  background: linear-gradient(90deg, #25D366, #128C7E);
  z-index: 99999;
  transition: width .1s linear;
  box-shadow: 0 0 8px rgba(37,211,102,.6);
}

/* ── Inline Banner ── */
.wvs-inline-banner {
  margin: 32px 0;
  border-radius: 18px;
  background: linear-gradient(135deg, #e7fdf0 0%, #d0f8e1 100%);
  border: 1.5px solid #a3e9be;
  overflow: hidden;
  animation: wvsFadeIn .5s ease both;
}
.wvs-inline-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 28px;
  flex-wrap: wrap;
}
.wvs-inline-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.wvs-inline-headline {
  font-size: 17px;
  font-weight: 800;
  color: #1a5c35;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.wvs-inline-sub {
  font-size: 13px;
  color: #3a7a52;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.wvs-inline-btn { font-size: 14px; padding: 12px 22px; }

/* ── Floating Button ── */
#wvs-float {
  position: fixed;
  bottom: 28px;
  right: 24px;
  z-index: 9998;
  transform: translateY(120px);
  transition: transform .4s cubic-bezier(.34,1.56,.64,1);
}
#wvs-float.wvs-visible {
  transform: translateY(0);
}
#wvs-float .wvs-btn {
  padding: 14px 22px;
  font-size: 14px;
  box-shadow: 0 6px 24px rgba(0,0,0,.22);
}

/* Pulse ring */
#wvs-float::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50px;
  border: 2px solid rgba(37,211,102,.4);
  animation: wvsPulse 2.2s ease-out infinite;
  pointer-events: none;
}
@keyframes wvsPulse {
  0%   { transform: scale(1);   opacity: .8; }
  70%  { transform: scale(1.12); opacity: 0; }
  100% { transform: scale(1);   opacity: 0; }
}

/* ── Exit-Intent Popup ── */
#wvs-exit-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(3px);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#wvs-exit-overlay.wvs-show {
  display: flex;
  animation: wvsFadeIn .22s ease;
}
#wvs-exit-modal {
  background: #fff;
  border-radius: 24px;
  max-width: 460px;
  width: 100%;
  padding: 40px 36px;
  text-align: center;
  position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,.25);
  animation: wvsSlideUp .3s cubic-bezier(.34,1.56,.64,1);
}
#wvs-exit-modal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(90deg, #25D366, #128C7E);
}
.wvs-modal-icon {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 12px;
}
.wvs-modal-headline {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #1a1a1a;
  margin: 0 0 10px;
}
.wvs-modal-sub {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  color: #555;
  margin: 0 0 28px;
  line-height: 1.5;
}
#wvs-exit-cta {
  width: 100%;
  justify-content: center;
  font-size: 16px;
  padding: 16px 24px;
}
.wvs-modal-dismiss {
  display: block;
  margin-top: 16px;
  font-size: 12px;
  color: #aaa;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  text-decoration: underline;
}
.wvs-modal-dismiss:hover { color: #666; }
#wvs-exit-close {
  position: absolute;
  top: 14px; right: 18px;
  background: none; border: none;
  font-size: 22px;
  cursor: pointer;
  color: #ccc;
  line-height: 1;
}
#wvs-exit-close:hover { color: #999; }

/* ── Scroll-triggered banner (mid-read) ── */
#wvs-scroll-prompt {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(135deg, #1a5c35, #25D366);
  color: #fff;
  z-index: 9997;
  transform: translateY(100%);
  transition: transform .4s cubic-bezier(.34,1.56,.64,1);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
#wvs-scroll-prompt.wvs-show {
  transform: translateY(0);
}
.wvs-scroll-text {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  font-weight: 600;
}
#wvs-scroll-btn {
  background: #fff;
  color: #1a5c35 !important;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
  padding: 10px 20px;
  font-size: 13px;
}
#wvs-scroll-dismiss {
  background: none; border: none;
  color: rgba(255,255,255,.7);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}

/* ── Animations ── */
@keyframes wvsFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes wvsSlideUp {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ── Mobile ── */
@media (max-width: 600px) {
  .wvs-inline-inner { flex-direction: column; align-items: flex-start; }
  .wvs-inline-btn   { width: 100%; justify-content: center; }
  #wvs-float        { right: 16px; bottom: 20px; }
  #wvs-float .wvs-btn span.wvs-btn-label { display: none; }
  #wvs-float .wvs-btn { padding: 14px; border-radius: 50%; }
  #wvs-exit-modal   { padding: 30px 22px; }
}
