@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Open+Sans:wght@300;400;500&display=swap');

/* ── Reset ───────────────────────────────────────────────── */
.isv *, .isv *::before, .isv *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Variáveis ───────────────────────────────────────────── */
.isv {
  --bg:      #f8f7fb;
  --bg2:     #ffffff;
  --bg3:     #f0edf7;
  --border:  rgba(107,63,160,0.12);
  --purple:  #6B3FA0;
  --purple2: #8B5CC8;
  --purple3: #4e2d78;
  --text:    #1a1a2e;
  --muted:   #040404;
  --erro:    #d93025;
  --r:       14px;
  --rs:      8px;
  font-family: 'Open Sans', system-ui, sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  border-radius: var(--r);
  max-width: 660px;
  margin: 0 auto;
  overflow: hidden;
  box-shadow: 0 4px 32px rgba(107,63,160,0.10);
  border: 1px solid #040404;
}

/* ── Ecrãs ───────────────────────────────────────────────── */
.isv-screen { padding: 32px 28px; }
@media(max-width:440px) { .isv-screen { padding: 24px 18px; } }

/* ── Header ──────────────────────────────────────────────── */
.isv-header { margin-bottom: 22px; }
.isv-eyebrow {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px; letter-spacing: 2.5px;
  text-transform: uppercase; color: #653694;
  margin-bottom: 8px;
}
.isv-header h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 20px; font-weight: 700;
  color: var(--text); line-height: 1.25; margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.isv-header p { font-size: 14px; color: var(--muted); line-height: 1.55; }

/* ── Plataformas ─────────────────────────────────────────── */
.isv-platforms { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.isv-platforms span {
  font-size: 11px; padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px; color: var(--purple);
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 0.5px; background: var(--bg3);
}

/* ── URL input ───────────────────────────────────────────── */
.isv-url-row { display: flex; gap: 10px; flex-wrap: wrap; }
.isv-url-row input {
  flex: 1; min-width: 0;
  background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: var(--rs); padding: 12px 14px;
  font-family: 'Open Sans', sans-serif; font-size: 14px;
  color: var(--text); outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.isv-url-row input::placeholder { color: rgba(26,26,46,0.25); }
.isv-url-row input:focus {
  border-color: var(--purple2);
  box-shadow: 0 0 0 3px rgba(139,92,200,0.12);
}
.isv-url-erro {
  display: none; margin-top: 8px; font-size: 13px;
  color: var(--erro); padding: 8px 12px;
  background: rgba(217,48,37,.07); border-radius: var(--rs);
  border: 1px solid rgba(217,48,37,.15);
}

/* ── Divisor ─────────────────────────────────────────────── */
.isv-ou {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0; color: var(--muted); font-size: 13px;
}
.isv-ou::before, .isv-ou::after { content:''; flex:1; height:1px; background: var(--border); }

/* ── Botões ──────────────────────────────────────────────── */
.isv-btn-pri {
  background: #653694;
  color: #fff;
  border: none; border-radius: var(--rs);
  padding: 14px 29px;
  font-family: 'Montserrat', sans-serif; font-size: 14px; font-weight: 700;
  letter-spacing: 0.5px; text-transform: uppercase;
  cursor: pointer; white-space: nowrap;
  transition: background .2s, transform .1s, box-shadow .2s;
  box-shadow: 0 2px 12px rgba(107,63,160,0.25);
}
.isv-btn-pri:hover {
  background: #7a44b0;
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(107,63,160,0.35);
}
.isv-btn-pri:active { transform: translateY(0); }
.isv-btn-pri:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.isv-btn-sec {
  background: var(--bg2); color: var(--muted);
  border: 1.5px solid var(--border); border-radius: var(--rs);
  padding: 11px 18px;
  font-family: 'Open Sans', sans-serif; font-size: 14px;
  cursor: pointer; transition: all .2s;
}
.isv-btn-sec:hover { border-color: var(--purple2); color: var(--purple); }
.isv-btn-full { display: block; width: 100%; text-align: center; margin-top: 14px; padding: 14px; font-size: 14px; }

/* ── Formulário ──────────────────────────────────────────── */
.isv-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.isv-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-bottom: 12px; }
@media(max-width:480px) { .isv-grid-2, .isv-grid-3 { grid-template-columns: 1fr; } }

.isv-field { display: flex; flex-direction: column; gap: 5px; }
.isv-field label {
  font-size: 11px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: 1px;
  font-family: 'Montserrat', sans-serif;
}
.isv-field input, .isv-field select {
  background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: var(--rs); padding: 10px 12px;
  font-family: 'Open Sans', sans-serif; font-size: 14px;
  color: var(--text); outline: none; -webkit-appearance: none;
  transition: border-color .2s, box-shadow .2s;
}
.isv-field input::placeholder { color: rgba(26,26,46,.25); }
.isv-field input:focus, .isv-field select:focus {
  border-color: var(--purple2);
  box-shadow: 0 0 0 3px rgba(139,92,200,0.12);
}
.isv-field select option { background: #fff; color: #1a1a2e; }

.isv-radios { display: flex; gap: 8px; flex-wrap: wrap; }
.isv-radio { flex: 1; min-width: 68px; cursor: pointer; }
.isv-radio input { display: none; }
.isv-radio span {
  display: flex; align-items: center; justify-content: center;
  padding: 9px 6px; font-size: 12px;
  background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: var(--rs); color: var(--muted);
  transition: all .2s; cursor: pointer;
}
.isv-radio input:checked + span {
  background: rgba(107,63,160,.07);
  border-color: var(--purple2);
  color: var(--purple);
  font-weight: 600;
}

.isv-actions { display: flex; gap: 10px; margin-top: 18px; }
.isv-actions .isv-btn-sec { flex: 1; }
.isv-actions .isv-btn-pri { flex: 2; }

/* ── Loading ─────────────────────────────────────────────── */
.isv-loading { text-align: center; padding: 48px 28px; }
.isv-spinner {
  width: 42px; height: 42px; margin: 0 auto 20px;
  border: 2px solid var(--border); border-top-color: var(--purple);
  border-radius: 50%; animation: isv-spin .8s linear infinite;
}
@keyframes isv-spin { to { transform: rotate(360deg); } }
.isv-loading-txt {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px; font-weight: 600;
  color: var(--text); margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.isv-loading-sub { font-size: 13px; color: var(--muted); }

/* ── Lead gate ───────────────────────────────────────────── */
.isv-lead-header { margin-bottom: 20px; }
.isv-lead-header h2 {
  font-size: 18px; margin-bottom: 8px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700; text-transform: uppercase; color: var(--text);
}
.isv-car-preview {
  display: flex; gap: 14px; align-items: center;
  background: var(--bg3); border: 1.5px solid var(--border);
  border-radius: var(--rs); padding: 14px; margin-bottom: 18px;
}
.isv-car-preview img { width: 80px; height: 58px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.isv-car-plat {
  font-size: 10px; color: var(--purple2);
  text-transform: uppercase; letter-spacing: 1.5px;
  margin-bottom: 3px; font-family: 'Montserrat', sans-serif;
}
.isv-car-nome {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px; font-weight: 600; margin-bottom: 2px; color: var(--text);
}
.isv-car-meta { font-size: 12px; color: var(--muted); }
.isv-lead-erro { display: none; margin-top: 8px; font-size: 13px; color: var(--erro); }

/* ── Resultado ───────────────────────────────────────────── */
.isv-result-total {
  background: linear-gradient(135deg, var(--purple), var(--purple3));
  border-radius: var(--r); padding: 30px; text-align: center; margin-bottom: 14px;
  position: relative; overflow: hidden;
  box-shadow: 0 8px 32px rgba(107,63,160,0.3);
}
.isv-result-total::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.isv-result-label {
  font-family: 'Montserrat', sans-serif; font-size: 10px;
  color: rgba(255,255,255,0.75); text-transform: uppercase;
  letter-spacing: 2.5px; margin-bottom: 12px;
}
.isv-result-value {
  font-family: 'Montserrat', sans-serif;
  font-size: 52px; font-weight: 800;
  color: #fff; line-height: 1;
}

.isv-breakdown {
  background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: var(--r); padding: 18px; margin-bottom: 12px;
}
.isv-brow {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.isv-brow:last-child { border-bottom: none; padding-bottom: 0; }
.isv-brow span:first-child { color: var(--muted); }
.isv-brow span:last-child { font-weight: 600; color: var(--text); }

.isv-aviso {
  font-size: 12px; color: var(--muted);
  border-left: 3px solid var(--purple2);
  padding: 10px 12px; margin-bottom: 16px; line-height: 1.5;
  background: var(--bg3); border-radius: 0 var(--rs) var(--rs) 0;
}

/* ── CTA Contacto ────────────────────────────────────────── */
.isv-cta-contacto {
  background: linear-gradient(135deg, #f5f0fb, #ede6f7);
  border: 1.5px solid rgba(107,63,160,0.2);
  border-radius: var(--r); padding: 20px;
  margin-bottom: 12px; text-align: center;
}
.isv-cta-contacto p {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px; font-weight: 600;
  color: var(--purple3); margin-bottom: 14px;
}

/* ── Nota localidade ─────────────────────────────────────── */
.isv-nota-local {
  font-size: 12px; color: var(--muted);
  margin-bottom: 14px; line-height: 1.5;
}

/* ── Ecrã obrigado ───────────────────────────────────────── */
#isv-s-obrigado h2 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700; text-transform: uppercase;
  color: var(--text);
}
