/* ==========================================================================
   Universal SaaS Auto Pop-up Components CSS (5 Distinct Component Designs)
   Scoped with .sp- prefix to avoid style collisions on any host website
   ========================================================================== */

:root {
  --sp-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sp-primary-blue: #2557e0;
  --sp-primary-hover: #1d46b8;
  --sp-dark-blue: #182238;
  --sp-card-radius: 20px;
  --sp-transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Modal Overlay Backdrop */
.sp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 16px;
  box-sizing: border-box;
}

.sp-overlay.sp-active {
  opacity: 1;
  visibility: visible;
}

/* Modal Container Base */
.sp-modal {
  position: relative;
  width: 100%;
  max-width: 530px;
  border-radius: var(--sp-card-radius);
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
  transform: scale(0.92) translateY(20px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  font-family: var(--sp-font-family);
  box-sizing: border-box;
}

.sp-overlay.sp-active .sp-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Close 'X' Button */
.sp-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: var(--sp-transition);
  z-index: 20;
}

.sp-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.sp-close-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.2;
}

.sp-modal-light .sp-close-btn {
  background: rgba(0, 0, 0, 0.06);
  color: #1e293b;
}

.sp-modal-light .sp-close-btn:hover {
  background: rgba(0, 0, 0, 0.14);
}

/* ==========================================================================
   COMPONENT 1: "30 Days Free Trial" Feature Checklist Modal
   (Solid Royal Blue, Friendly Avatar Mascot, Clean Bullets)
   ========================================================================== */
.sp-modal-blue {
  background: linear-gradient(145deg, #2354e6, #1c42b8);
  color: #ffffff;
  padding: 38px 36px 32px;
}

.sp-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-right: 28px;
}

.sp-title-group h2 {
  font-size: 38px;
  font-weight: 800;
  line-height: 1.05;
  margin: 0 0 6px 0;
  letter-spacing: -0.5px;
  text-transform: uppercase;
}

.sp-subtitle-pill {
  font-size: 15px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.88);
  margin: 0;
}

.sp-mascot-wrapper {
  position: relative;
  width: 95px;
  height: 95px;
  flex-shrink: 0;
}

.sp-mascot-circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.4);
}

.sp-speech-bubble {
  position: absolute;
  top: 10px;
  left: -15px;
  background: #3b82f6;
  color: white;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  border: 1.5px solid rgba(255, 255, 255, 0.5);
}

.sp-body-intro {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
  color: #ffffff;
}

.sp-bullet-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sp-bullet-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.35;
}

.sp-bullet-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  flex-shrink: 0;
}

.sp-btn-block {
  width: 100%;
  padding: 16px 24px;
  background: rgba(15, 34, 102, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: #ffffff;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--sp-transition);
  text-align: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.sp-btn-block:hover {
  background: rgba(10, 24, 75, 1);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
}

/* ==========================================================================
   COMPONENT 2: "15-Day Free Trial" Laptop Showcase Modal
   (Dual-tone Arch, Realistic Laptop Graphic, Cyan Corner Ribbon)
   ========================================================================== */
.sp-modal-laptop-card {
  background: #ffffff;
  position: relative;
}

.sp-laptop-header {
  background: #0d1117;
  color: #ffffff;
  padding: 34px 28px 24px;
  text-align: center;
  border-bottom-left-radius: 40% 18px;
  border-bottom-right-radius: 40% 18px;
  position: relative;
}

.sp-laptop-header h2 {
  font-size: 23px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
  letter-spacing: -0.3px;
}

.sp-laptop-body {
  padding: 18px 28px 28px;
  text-align: center;
  position: relative;
  background: #ffffff;
}

.sp-device-preview {
  margin: 0 auto 20px;
  max-width: 380px;
  position: relative;
}

.sp-laptop-screen {
  background: #1e293b;
  border: 4px solid #334155;
  border-radius: 10px 10px 0 0;
  height: 175px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
}

.sp-laptop-browser-bar {
  background: #0f172a;
  height: 22px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 5px;
}

.sp-browser-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #475569;
}

.sp-laptop-content {
  background: #f8fafc;
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sp-mock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 6px;
}

.sp-mock-logo {
  font-weight: 800;
  font-size: 13px;
  color: #0284c7;
  letter-spacing: 1px;
}

.sp-mock-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.sp-mock-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 6px;
  text-align: left;
}

.sp-mock-label {
  font-size: 9px;
  color: #64748b;
}

.sp-mock-value {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.sp-laptop-base {
  height: 12px;
  background: linear-gradient(180deg, #94a3b8, #64748b);
  border-radius: 0 0 12px 12px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
  position: relative;
}

.sp-laptop-notch {
  width: 60px;
  height: 4px;
  background: #cbd5e1;
  margin: 0 auto;
  border-radius: 0 0 4px 4px;
}

.sp-sparkle {
  position: absolute;
  top: 10px;
  left: 10px;
  color: #38bdf8;
  animation: sp-pulse 2s infinite ease-in-out;
}

@keyframes sp-pulse {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.8; }
  50% { transform: scale(1.25) rotate(15deg); opacity: 1; }
}

.sp-btn-pill {
  display: inline-block;
  padding: 14px 42px;
  background: #2563eb;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
  transition: var(--sp-transition);
}

.sp-btn-pill:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(37, 99, 235, 0.45);
}

.sp-subtext-muted {
  font-size: 13px;
  color: #64748b;
  margin-top: 12px;
  margin-bottom: 0;
}

.sp-corner-ribbon {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 90px;
  height: 90px;
  pointer-events: none;
  overflow: hidden;
}

.sp-ribbon-shape-1 {
  position: absolute;
  bottom: -30px;
  right: -30px;
  width: 80px;
  height: 80px;
  background: #2563eb;
  transform: rotate(45deg);
}

.sp-ribbon-shape-2 {
  position: absolute;
  bottom: -15px;
  right: -15px;
  width: 50px;
  height: 50px;
  background: #38bdf8;
  transform: rotate(45deg);
}

/* ==========================================================================
   COMPONENT 3: "Find Your Best Plan" Interactive Advisor (Direct Chatbot Bridge)
   ========================================================================== */
.sp-modal-advisor {
  background: #ffffff;
  padding: 34px 32px 30px;
  color: #0f172a;
}

.sp-advisor-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.sp-advisor-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 6px 14px rgba(59, 130, 246, 0.3);
}

.sp-advisor-title h3 {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px 0;
  line-height: 1.25;
}

.sp-advisor-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #2563eb;
  background: #eff6ff;
  padding: 3px 10px;
  border-radius: 20px;
}

.sp-plan-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.sp-plan-card {
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: var(--sp-transition);
  background: #f8fafc;
  user-select: none;
}

.sp-plan-card:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.sp-plan-card.sp-selected {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.sp-plan-name {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
}

.sp-plan-desc {
  font-size: 11px;
  color: #64748b;
}

.sp-advisor-bullets {
  background: #f8fafc;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 22px;
}

.sp-advisor-bullets ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sp-advisor-bullets li {
  font-size: 13px;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sp-check-icon {
  color: #10b981;
  flex-shrink: 0;
}

.sp-btn-chatbot {
  width: 100%;
  padding: 15px 22px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  border: none;
  border-radius: 12px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--sp-transition);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

.sp-btn-chatbot:hover {
  background: linear-gradient(135deg, #1d4ed8, #4338ca);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.45);
}

/* ==========================================================================
   COMPONENT 4: "Book 1-on-1 Live Demo" Specialist Modal
   ========================================================================== */
.sp-modal-demo {
  background: #ffffff;
  padding: 34px 32px 30px;
  color: #0f172a;
}

.sp-demo-header {
  text-align: center;
  margin-bottom: 22px;
}

.sp-demo-avatar-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
}

.sp-demo-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #e2e8f0;
}

.sp-pulse-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  background: #10b981;
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  border: 2px solid white;
  display: flex;
  align-items: center;
  gap: 4px;
}

.sp-pulse-dot {
  width: 6px;
  height: 6px;
  background: #ffffff;
  border-radius: 50%;
  animation: sp-pulse-glow 1.5s infinite;
}

@keyframes sp-pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.sp-demo-header h2 {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 6px;
  color: #0f172a;
}

.sp-demo-header p {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

.sp-demo-bullets {
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
  padding: 16px 0;
  margin-bottom: 22px;
}

.sp-demo-bullets ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sp-demo-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #334155;
  line-height: 1.4;
}

.sp-demo-bullets svg {
  color: #2563eb;
  flex-shrink: 0;
  margin-top: 2px;
}

.sp-btn-primary-demo {
  width: 100%;
  padding: 15px 24px;
  background: #0f172a;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: var(--sp-transition);
  margin-bottom: 10px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.25);
}

.sp-btn-primary-demo:hover {
  background: #1e293b;
  transform: translateY(-2px);
}

.sp-btn-secondary-demo {
  width: 100%;
  padding: 10px;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-align: center;
  transition: var(--sp-transition);
}

.sp-btn-secondary-demo:hover {
  color: #2563eb;
  text-decoration: underline;
}

/* ==========================================================================
   COMPONENT 5: "Exit-Intent / 20% Voucher + Live Chat Assist" Modal
   ========================================================================== */
.sp-modal-voucher {
  background: linear-gradient(160deg, #0b1120 0%, #172554 100%);
  color: #ffffff;
  padding: 36px 32px 30px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  text-align: center;
}

.sp-voucher-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 30px;
  margin-bottom: 16px;
}

.sp-modal-voucher h2 {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 8px;
  color: #ffffff;
}

.sp-voucher-lead {
  font-size: 14px;
  color: #94a3b8;
  margin: 0 0 20px;
}

/* Copyable Voucher Pill */
.sp-voucher-box {
  background: rgba(15, 23, 42, 0.6);
  border: 2px dashed rgba(56, 189, 248, 0.4);
  border-radius: 12px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.sp-voucher-code {
  font-family: monospace;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #38bdf8;
}

.sp-btn-copy-code {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--sp-transition);
}

.sp-btn-copy-code:hover {
  background: #38bdf8;
  color: #0f172a;
}

.sp-voucher-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sp-btn-claim-voucher {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  border: none;
  border-radius: 12px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
  transition: var(--sp-transition);
}

.sp-btn-claim-voucher:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(37, 99, 235, 0.5);
}

.sp-btn-voucher-chat {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--sp-transition);
}

.sp-btn-voucher-chat:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

/* ==========================================================================
   Responsive adjustments
   ========================================================================== */
@media (max-width: 580px) {
  .sp-modal-blue {
    padding: 26px 20px 22px;
  }
  .sp-title-group h2 {
    font-size: 28px;
  }
  .sp-mascot-wrapper {
    width: 75px;
    height: 75px;
  }
  .sp-mascot-circle {
    width: 65px;
    height: 65px;
  }
  .sp-speech-bubble {
    font-size: 11px;
    padding: 2px 7px;
  }
  .sp-plan-options {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .sp-voucher-box {
    flex-direction: column;
    gap: 10px;
  }
}
