/**
 * SuperBox VIP Coupon & Lead Capture - Public Styles
 * Compact Luxury Dark Edition
 * - Clean white brand logo
 * - Large prominent product showcase
 * - Compact, non-bloated vertical spacing
 * - Live countdown timer
 * - Minimized bottom-left floating widget
 */

/* ==========================================================================
   1. GLOBAL MODAL BACKDROP & WRAPPER
   ========================================================================== */
.spftv-vip-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background-color: rgba(7, 12, 24, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.spftv-vip-backdrop.spftv-vip-active {
  opacity: 1;
  visibility: visible;
}

.spftv-vip-modal {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 94vh;
  background: radial-gradient(circle at 50% 0%, #152744 0%, #090f1d 75%, #060a14 100%);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65), 0 0 35px rgba(16, 185, 129, 0.12);
  overflow-y: auto;
  overflow-x: hidden;
  transform: scale(0.93) translateY(12px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  color: #ffffff;
  padding: 20px 20px 16px 20px;
  text-align: center;
}

.spftv-vip-backdrop.spftv-vip-active .spftv-vip-modal {
  transform: scale(1) translateY(0);
}

/* Close & Minimize Buttons */
.spftv-vip-modal-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
}

.spftv-vip-icon-btn {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.spftv-vip-icon-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.spftv-vip-icon-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2.2;
}

/* ==========================================================================
   2. COMPACT HEADER & BRANDING
   ========================================================================== */
.spftv-vip-logo-wrap {
  margin-bottom: 8px;
}

.spftv-vip-logo-img {
  height: 30px;
  width: auto;
  display: inline-block;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.spftv-vip-hero-script {
  font-family: 'Brush Script MT', 'Dancing Script', cursive, sans-serif;
  font-size: 1.35rem;
  color: #ffffff;
  letter-spacing: 1px;
  margin-bottom: -2px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  transform: rotate(-2.5deg);
  display: inline-block;
}

.spftv-vip-hero-mega {
  font-size: 1.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  line-height: 1.05;
  margin: 2px 0 6px 0;
  background: linear-gradient(135deg, #4ade80 0%, #22c55e 50%, #16a34a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 10px rgba(34, 197, 94, 0.35));
}

.spftv-vip-hero-deal {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 10px 0;
  line-height: 1.25;
}

.spftv-vip-hero-deal span {
  color: #ffc220;
}

/* ==========================================================================
   3. LARGE PROMINENT PRODUCT SHOWCASE
   ========================================================================== */
.spftv-vip-product-showcase {
  position: relative;
  width: 100%;
  max-width: 360px;
  margin: 0 auto 10px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spftv-vip-product-showcase::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 10%;
  right: 10%;
  height: 14px;
  background: radial-gradient(ellipse at center, rgba(34, 197, 94, 0.5) 0%, transparent 75%);
  filter: blur(8px);
  pointer-events: none;
}

.spftv-vip-console-img {
  width: 100%;
  max-height: 190px;
  object-fit: contain;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.7));
  transition: transform 0.3s ease;
  animation: spftvFloat 4s ease-in-out infinite;
}

@keyframes spftvFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* Scarcity Stock Pill */
.spftv-vip-stock-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 999px;
  color: #fca5a5;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
  margin-bottom: 10px;
  animation: spftvPulseText 2s infinite;
}

.spftv-vip-stock-pill svg {
  width: 12px;
  height: 12px;
  fill: #ef4444;
}

@keyframes spftvPulseText {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

/* ==========================================================================
   4. COMPACT COUNTDOWN TIMER
   ========================================================================== */
.spftv-vip-countdown-box {
  margin-bottom: 12px;
}

.spftv-vip-countdown-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #4ade80;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.spftv-vip-countdown-label svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 2.2;
}

.spftv-vip-timer-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.spftv-vip-timer-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 48px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 5px 3px;
  backdrop-filter: blur(4px);
}

.spftv-vip-timer-num {
  font-size: 1.25rem;
  font-weight: 900;
  color: #ffffff;
  font-family: Consolas, Monaco, monospace;
  line-height: 1;
}

.spftv-vip-timer-sub {
  font-size: 8.5px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 2px;
}

.spftv-vip-timer-colon {
  font-size: 1.1rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.4);
  margin-top: -8px;
}

/* ==========================================================================
   5. COMPACT FORM & CTA BUTTON
   ========================================================================== */
.spftv-vip-form {
  margin-top: 4px;
}

.spftv-vip-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.spftv-vip-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.spftv-vip-input-icon {
  position: absolute;
  left: 12px;
  width: 15px;
  height: 15px;
  color: #94a3b8;
  pointer-events: none;
}

.spftv-vip-input {
  width: 100%;
  height: 42px;
  padding: 0 12px 0 38px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9px;
  font-size: 0.88rem;
  color: #ffffff;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.spftv-vip-input::placeholder {
  color: #94a3b8;
}

.spftv-vip-input:focus {
  background: rgba(255, 255, 255, 0.14);
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
}

.spftv-vip-submit-btn {
  width: 100%;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  border: none;
  border-radius: 9px;
  color: #ffffff;
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.spftv-vip-submit-btn:hover {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(34, 197, 94, 0.45);
}

.spftv-vip-submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.spftv-vip-submit-btn .spftv-vip-spinner {
  display: none;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spftvSpin 0.7s linear infinite;
}

.spftv-vip-submitting .spftv-vip-submit-btn .spftv-vip-spinner {
  display: inline-block;
}

.spftv-vip-privacy-note {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.73rem;
  color: #94a3b8;
}

.spftv-vip-privacy-note svg {
  width: 11px;
  height: 11px;
  stroke: #22c55e;
  stroke-width: 2.2;
}

.spftv-vip-minimize-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.75rem;
  color: #64748b;
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.15s ease;
}

.spftv-vip-minimize-link:hover {
  color: #94a3b8;
}

/* ==========================================================================
   6. SUCCESS STATE
   ========================================================================== */
.spftv-vip-success-box {
  display: none;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 12px;
  padding: 18px 14px;
  text-align: center;
  margin-top: 10px;
  animation: spftvFadeUp 0.3s ease;
}

.spftv-vip-success-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 8px auto;
  border-radius: 50%;
  background: #22c55e;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spftv-vip-success-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2.6;
}

.spftv-vip-success-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #4ade80;
  margin: 0 0 5px 0;
}

.spftv-vip-success-msg {
  font-size: 0.84rem;
  line-height: 1.4;
  color: #cbd5e1;
  margin: 0 0 12px 0;
}

.spftv-vip-success-target-email {
  font-weight: 700;
  color: #ffc220;
}

.spftv-vip-gmail-tip {
  font-size: 0.74rem;
  color: #94a3b8;
  background: rgba(0, 0, 0, 0.3);
  padding: 6px 8px;
  border-radius: 6px;
  margin-bottom: 10px;
  text-align: left;
}

.spftv-vip-success-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  background: #22c55e;
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(34, 197, 94, 0.35);
}

/* ==========================================================================
   7. MINIMIZED FLOATING TRIGGER WIDGET (BOTTOM-LEFT CORNER)
   ========================================================================== */
.spftv-vip-floating-widget {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 999990;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 18px 8px 10px;
  background: linear-gradient(135deg, #0b1329 0%, #111e38 100%);
  border: 1px solid rgba(34, 197, 94, 0.38); /* Hairline 1px border */
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 14px rgba(34, 197, 94, 0.18);
  cursor: pointer;
  color: #ffffff;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
}

.spftv-vip-floating-widget.spftv-vip-visible {
  display: flex !important;
  animation: spftvSlideInLeft 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.spftv-vip-floating-widget:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: rgba(34, 197, 94, 0.65);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55), 0 0 20px rgba(34, 197, 94, 0.35);
}

.spftv-vip-float-icon-wrap {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #ffffff;
}

.spftv-vip-float-icon-wrap svg {
  width: 16px;
  height: 16px;
  stroke: #ffffff;
  fill: none;
  stroke-width: 2;
}

.spftv-vip-float-pulse-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid #22c55e;
  animation: spftvPulseRing 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
  pointer-events: none;
}

@keyframes spftvPulseRing {
  0% { transform: scale(0.9); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}

.spftv-vip-float-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px; /* Clean breathing space between title and timer */
  line-height: 1.25;
}

.spftv-vip-float-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.2px;
  white-space: nowrap;
  line-height: 1.2;
}

.spftv-vip-float-timer {
  font-size: 0.76rem;
  font-weight: 700;
  color: #4ade80;
  font-family: Consolas, Monaco, monospace;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

/* ==========================================================================
   8. SHORTCODE INLINE CARD (FOR BLOG POSTS & PAGES)
   ========================================================================== */
.spftv-vip-shortcode-wrap {
  margin: 28px 0;
  box-sizing: border-box;
}

.spftv-vip-shortcode-card {
  position: relative;
  background: radial-gradient(circle at 50% 0%, #152744 0%, #090f1d 75%, #060a14 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  color: #ffffff;
  padding: 22px 20px 18px 20px;
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}

.spftv-vip-shortcode-card .spftv-vip-product-showcase {
  max-width: 320px;
}

/* ==========================================================================
   9. MOBILE RESPONSIVENESS
   ========================================================================== */
@media (max-width: 640px) {
  .spftv-vip-modal {
    padding: 18px 16px 14px 16px;
    max-height: 92vh;
    border-radius: 16px;
  }

  .spftv-vip-hero-mega {
    font-size: 1.5rem;
  }

  .spftv-vip-hero-deal {
    font-size: 1.05rem;
  }

  .spftv-vip-product-showcase {
    max-width: 280px;
    margin-bottom: 8px;
  }

  .spftv-vip-console-img {
    max-height: 150px;
  }

  .spftv-vip-timer-unit {
    min-width: 42px;
    padding: 4px 2px;
  }

  .spftv-vip-timer-num {
    font-size: 1.1rem;
  }

  .spftv-vip-timer-sub {
    font-size: 8px;
  }

  .spftv-vip-floating-widget {
    bottom: 14px;
    left: 14px;
    padding: 6px 12px 6px 7px;
    gap: 7px;
    transition: bottom 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s ease, opacity 0.2s ease;
  }

  /* Nâng widget lên trên thanh Sticky Buy Bar trên trang chi tiết sản phẩm mobile để không bị che nút Buy Now */
  body.single-product .spftv-vip-floating-widget,
  .single-product #spftv-vip-floating-widget {
    bottom: calc(136px + env(safe-area-inset-bottom, 0px)) !important;
    left: 12px !important;
    z-index: 995 !important;
  }

  .spftv-vip-float-icon-wrap {
    width: 28px;
    height: 28px;
  }

  .spftv-vip-float-icon-wrap svg {
    width: 14px;
    height: 14px;
  }

  .spftv-vip-float-title {
    font-size: 0.76rem;
  }

  .spftv-vip-float-timer {
    font-size: 0.70rem;
  }
}

@keyframes spftvSlideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes spftvFadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
