/* InSeconds LLC — Lead Capture Concierge Widget
   Isolated styles. Safe to load on insecondsllc.com and app.insecondsllc.com. */

:root {
  --isw-bg: #05070d;
  --isw-panel: rgba(8, 12, 22, 0.78);
  --isw-panel-strong: rgba(12, 18, 32, 0.92);
  --isw-line: rgba(255, 255, 255, 0.14);
  --isw-text: #f8fafc;
  --isw-muted: rgba(248, 250, 252, 0.66);
  --isw-soft: rgba(255, 255, 255, 0.08);
  --isw-soft-2: rgba(255, 255, 255, 0.12);
  --isw-gold: #d8c08a;
  --isw-gold-soft: rgba(216, 192, 138, 0.16);
  --isw-blue: #2f91ad;
  --isw-green: #62a733;
  --isw-red: #a33a3a;
  --isw-shadow: 0 26px 80px rgba(0, 0, 0, 0.42);
}

#inseconds-lead-widget,
#inseconds-lead-widget * {
  box-sizing: border-box;
}

#inseconds-lead-widget {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9999;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--isw-text);
}

.isw-launcher {
  width: 66px;
  height: 66px;
  border: 1px solid rgba(216, 192, 138, 0.42);
  border-radius: 22px;
  cursor: pointer;
  color: var(--isw-text);
  background:
    radial-gradient(circle at 25% 18%, rgba(216, 192, 138, 0.24), transparent 32%),
    linear-gradient(145deg, rgba(255,255,255,0.14), rgba(255,255,255,0.045));
  box-shadow: 0 18px 45px rgba(0,0,0,0.38), 0 0 0 1px rgba(255,255,255,0.06) inset;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: grid;
  place-items: center;
  transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease;
}

.isw-launcher:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(216, 192, 138, 0.68);
  box-shadow: 0 22px 60px rgba(0,0,0,0.46), 0 0 32px rgba(216, 192, 138, 0.12);
}

.isw-launcher-icon {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
}

.isw-launcher-icon svg {
  width: 30px;
  height: 30px;
  display: block;
}

.isw-pulse {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--isw-gold), #fff2c2);
  box-shadow: 0 0 0 6px rgba(216, 192, 138, 0.13);
}

.isw-nudge-bubble {
  position: absolute;
  right: 78px;
  top: 50%;
  transform: translateY(-50%) translateX(10px) scale(.96);
  transform-origin: right center;
  min-width: 168px;
  max-width: 220px;
  padding: 11px 14px;
  border: 1px solid rgba(216, 192, 138, 0.30);
  border-radius: 999px;
  background:
    radial-gradient(circle at 0% 0%, rgba(216, 192, 138, 0.18), transparent 40%),
    rgba(8, 12, 22, 0.84);
  box-shadow: 0 18px 42px rgba(0,0,0,0.34), 0 0 0 1px rgba(255,255,255,0.05) inset;
  color: rgba(255,255,255,0.88);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .02em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: opacity .28s ease, transform .28s ease;
}

.isw-nudge-bubble::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  width: 10px;
  height: 10px;
  transform: translateY(-50%) rotate(45deg);
  background: rgba(8, 12, 22, 0.88);
  border-right: 1px solid rgba(216, 192, 138, 0.22);
  border-top: 1px solid rgba(216, 192, 138, 0.22);
}

#inseconds-lead-widget.is-nudging .isw-launcher {
  animation: isw-luxury-nudge 1.18s cubic-bezier(.2,.75,.2,1) 0s 3;
  border-color: rgba(216, 192, 138, 0.76);
  box-shadow: 0 22px 62px rgba(0,0,0,0.46), 0 0 42px rgba(216, 192, 138, 0.20);
}

#inseconds-lead-widget.is-nudging .isw-pulse {
  animation: isw-pulse-ring 1.45s ease-out 0s 4;
}

#inseconds-lead-widget.is-nudge-visible .isw-nudge-bubble,
#inseconds-lead-widget.is-nudging .isw-nudge-bubble {
  opacity: 1;
  transform: translateY(-50%) translateX(0) scale(1);
}

#inseconds-lead-widget.is-nudge-visible .isw-launcher:hover .isw-nudge-bubble,
#inseconds-lead-widget.is-nudging .isw-launcher:hover .isw-nudge-bubble {
  opacity: 0;
  transform: translateY(-50%) translateX(10px) scale(.96);
}

@keyframes isw-luxury-nudge {
  0%, 100% { transform: translateY(0) scale(1); }
  24% { transform: translateY(-7px) scale(1.035); }
  52% { transform: translateY(0) scale(1); }
  76% { transform: translateY(-3px) scale(1.015); }
}

@keyframes isw-pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(216, 192, 138, 0.34), 0 0 0 6px rgba(216, 192, 138, 0.13); }
  100% { box-shadow: 0 0 0 20px rgba(216, 192, 138, 0), 0 0 0 6px rgba(216, 192, 138, 0); }
}

.isw-panel {
  position: absolute;
  right: 0;
  bottom: 82px;
  width: min(430px, calc(100vw - 32px));
  border: 1px solid var(--isw-line);
  border-radius: 30px;
  background:
    radial-gradient(circle at 18% 0%, rgba(216, 192, 138, 0.15), transparent 32%),
    radial-gradient(circle at 95% 12%, rgba(47, 145, 173, 0.16), transparent 34%),
    linear-gradient(180deg, var(--isw-panel), var(--isw-panel-strong));
  box-shadow: var(--isw-shadow);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
  overflow: hidden;
  transform: translateY(18px) scale(.975);
  opacity: 0;
  pointer-events: none;
  transition: transform .26s ease, opacity .26s ease;
}

#inseconds-lead-widget.is-open .isw-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.isw-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.09);
}

.isw-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.isw-logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255,255,255,0.92);
  object-fit: cover;
  box-shadow: 0 10px 22px rgba(0,0,0,0.28);
}

.isw-brand-text strong {
  display: block;
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #fff;
}

.isw-brand-text span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--isw-muted);
}

.isw-close {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.78);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.isw-close:hover { background: rgba(255,255,255,0.12); color: #fff; transform: rotate(90deg); }

.isw-body {
  padding: 20px 18px 18px;
}

.isw-progress {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 18px;
}

.isw-progress-dot {
  height: 5px;
  flex: 1;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  overflow: hidden;
}

.isw-progress-dot span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--isw-gold), rgba(255,255,255,0.84));
  transition: width .25s ease;
}

.isw-message {
  padding: 15px 16px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 20px;
  background: rgba(255,255,255,0.055);
  color: rgba(255,255,255,0.84);
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 16px;
}

.isw-kicker {
  color: var(--isw-gold);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.isw-question {
  margin: 0 0 15px;
  font-size: 22px;
  line-height: 1.18;
  letter-spacing: -0.035em;
}

.isw-options {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 14px;
}

.isw-option {
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 999px;
  padding: 11px 13px;
  cursor: pointer;
  background: rgba(255,255,255,0.065);
  color: rgba(255,255,255,0.82);
  font-weight: 800;
  font-size: 13px;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}

.isw-option:hover,
.isw-option.is-selected {
  transform: translateY(-1px);
  border-color: rgba(216, 192, 138, 0.58);
  background: var(--isw-gold-soft);
  color: #fff;
}

.isw-input,
.isw-textarea {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 18px;
  background: rgba(0,0,0,0.22);
  color: #fff;
  outline: none;
  font: inherit;
  padding: 14px 14px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.isw-textarea { min-height: 110px; resize: vertical; }

.isw-input:focus,
.isw-textarea:focus {
  border-color: rgba(216, 192, 138, 0.72);
  box-shadow: 0 0 0 4px rgba(216, 192, 138, 0.10);
  background: rgba(0,0,0,0.30);
}

.isw-input::placeholder,
.isw-textarea::placeholder { color: rgba(255,255,255,0.38); }

.isw-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.isw-btn {
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px;
  min-height: 46px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 900;
  color: #fff;
  background: rgba(255,255,255,0.07);
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.isw-btn:hover { transform: translateY(-1px); background: rgba(255,255,255,0.12); }
.isw-btn-primary { color: #07101d; background: linear-gradient(135deg, #fff, #d8c08a); border-color: transparent; }
.isw-btn-primary:hover { background: linear-gradient(135deg, #fff, #ecd9a5); }
.isw-btn-ghost { color: rgba(255,255,255,0.70); }
.isw-btn-full { flex: 1; }

.isw-summary {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.isw-summary-row {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  background: rgba(255,255,255,0.045);
  font-size: 13px;
}

.isw-summary-row span:first-child { color: rgba(255,255,255,0.48); font-weight: 800; }
.isw-summary-row span:last-child { color: rgba(255,255,255,0.88); word-break: break-word; }

.isw-footnote {
  margin: 14px 2px 0;
  color: rgba(255,255,255,0.45);
  font-size: 11px;
  line-height: 1.55;
}

.isw-status {
  min-height: 18px;
  margin-top: 10px;
  color: rgba(255,255,255,0.62);
  font-size: 12px;
}

.isw-status.is-success { color: #a7f3d0; }
.isw-status.is-error { color: #fecaca; }

@media (max-width: 560px) {
  #inseconds-lead-widget {
    right: 14px;
    bottom: 14px;
  }

  .isw-launcher {
    width: 60px;
    height: 60px;
    border-radius: 20px;
  }

  .isw-panel {
    right: -2px;
    bottom: 74px;
    width: calc(100vw - 24px);
    border-radius: 26px;
  }

  .isw-body { padding: 17px 15px 15px; }
  .isw-question { font-size: 20px; }
  .isw-actions { flex-direction: column; }
  .isw-btn { width: 100%; }
  .isw-nudge-bubble {
    right: 0;
    top: auto;
    bottom: 72px;
    transform: translateY(8px) scale(.96);
    min-width: 150px;
    max-width: calc(100vw - 100px);
    white-space: normal;
    text-align: center;
  }

  .isw-nudge-bubble::after {
    right: 26px;
    top: auto;
    bottom: -6px;
    transform: rotate(135deg);
  }

  #inseconds-lead-widget.is-nudge-visible .isw-nudge-bubble,
  #inseconds-lead-widget.is-nudging .isw-nudge-bubble {
    transform: translateY(0) scale(1);
  }

  #inseconds-lead-widget.is-nudge-visible .isw-launcher:hover .isw-nudge-bubble,
  #inseconds-lead-widget.is-nudging .isw-launcher:hover .isw-nudge-bubble {
    opacity: 0;
    transform: translateY(8px) scale(.96);
  }

  .isw-summary-row { grid-template-columns: 1fr; gap: 4px; }
}


@media (prefers-reduced-motion: reduce) {
  #inseconds-lead-widget.is-nudging .isw-launcher,
  #inseconds-lead-widget.is-nudging .isw-pulse {
    animation: none;
  }
}
