/* Smart Visitor Pro – Public Styles */

/* ── Counter Widget ──────────────────────────────────────── */
.svp-counter {
  position: fixed;
  z-index: 99990;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: 50px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  letter-spacing: .01em;
  cursor: default;
  user-select: none;

  /* Glassmorphism */
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255,255,255,.15);
  box-shadow:
    0 8px 32px rgba(31,38,135,.25),
    inset 0 1px 0 rgba(255,255,255,.12);
}

/* Positions */
.svp-pos-top-left     { top: 20px;    left: 20px;               }
.svp-pos-top-center   { top: 20px;    left: 50%;  transform: translateX(-50%); }
.svp-pos-top-right    { top: 20px;    right: 20px;              }
.svp-pos-middle-left  { top: 50%;     left: 20px; transform: translateY(-50%); }
.svp-pos-middle-center{ top: 50%;     left: 50%;  transform: translate(-50%,-50%); }
.svp-pos-middle-right { top: 50%;     right: 20px; transform: translateY(-50%); }
.svp-pos-bottom-left  { bottom: 20px; left: 20px;               }
.svp-pos-bottom-center{ bottom: 20px; left: 50%;  transform: translateX(-50%); }
.svp-pos-bottom-right { bottom: 20px; right: 20px;              }

.svp-counter .svp-icon  { font-size: 1.1em; line-height: 1; }
.svp-counter .svp-count { font-size: 1.1em; line-height: 1; }
.svp-counter .svp-label { font-weight: 500; opacity: .85; font-size: .9em; }

/* Entry animation */
.svp-counter.svp-animate-in {
  animation: svp-fade-up .4s cubic-bezier(.34,1.56,.64,1) forwards;
}

@keyframes svp-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.svp-pos-top-left.svp-animate-in,
.svp-pos-top-center.svp-animate-in,
.svp-pos-top-right.svp-animate-in {
  animation-name: svp-fade-down;
}

@keyframes svp-fade-down {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0);     }
}

/* Pulse on update */
.svp-counter.svp-pulse {
  animation: svp-pulse .35s ease;
}

@keyframes svp-pulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* ── Popup Overlay ───────────────────────────────────────── */
.svp-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 99995;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10,10,20,.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}

.svp-popup-overlay.svp-visible {
  opacity: 1;
  visibility: visible;
}

.svp-popup-box {
  position: relative;
  background: #ffffff;
  border-radius: 20px;
  padding: 40px 36px;
  max-width: 480px;
  width: calc(100% - 40px);
  text-align: center;
  box-shadow:
    0 32px 80px rgba(0,0,0,.3),
    0 0 0 1px rgba(255,255,255,.08);
  transform: scale(.88) translateY(20px);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
}

.svp-popup-overlay.svp-visible .svp-popup-box {
  transform: scale(1) translateY(0);
}

/* Close button */
.svp-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: #f1f0f5;
  color: #555;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background .2s, transform .2s;
}

.svp-popup-close:hover {
  background: #e2e0f0;
  transform: rotate(90deg);
}

/* Popup image */
.svp-popup-image {
  max-width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 20px;
  display: block;
  margin-inline: auto;
}

/* Popup message */
.svp-popup-message {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.05rem;
  line-height: 1.6;
  color: #1a1a2e;
  margin: 0 0 24px;
}

/* Popup button */
.svp-popup-btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 50px;
  background: linear-gradient(135deg, #6c63ff, #8b5cf6);
  color: #fff !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none !important;
  letter-spacing: .02em;
  box-shadow: 0 6px 20px rgba(108,99,255,.4);
  transition: opacity .2s, transform .2s, box-shadow .2s;
}

.svp-popup-btn:hover {
  opacity: .92;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(108,99,255,.5);
}

.svp-popup-btn:active { transform: translateY(0); }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 480px) {
  .svp-counter { padding: 8px 14px; font-size: 13px; }
  .svp-popup-box { padding: 32px 22px; }
}
