@import url('https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,400;0,600;0,700;0,800;0,900;1,400;1,700;1,800&display=swap');

:root {
  --brand:        #FF6600;
  --brand-hover:  #CC5200;
  --text:         #4D4D4D;
  --muted:        #4D4D4D;
  --bg-card:      #ffffff;
  --border:       #e5e5e5;
  --error:        #B00020;
  --focus:        #005BFF;
  --radius-card:  16px;
  --radius-btn:   10px;
  --radius-opt:   12px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: 'Barlow', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  color: var(--text);
}

button, input, select, textarea {
  font-family: inherit;
}

body {
  background: #1a1a1a url("https://image.novidades.bancobpi.pt/lib/fe201173736404747c1c77/m/1/28b17425-01d3-4bb4-9eb6-cc8233a6b1b8.png") center / cover no-repeat fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.38);
  z-index: 0;
}

.app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

#app-root {
  width: min(980px, 100%);
}

.card {
  width: min(980px, 100%);
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
}
.card-padded {
  padding: 64px 32px 36px;
}
@media (max-width: 420px) {
  .card-padded { padding: 40px 18px 24px; }
}

.card--intro     { min-height: 678px; }
.card--dados     { min-height: 758px; }
.card--step      { min-height: 522px; }
.card--res-smart { min-height: 604px; }
.card--res-mixed { min-height: 699px; }
.card--res-gprs  { min-height: 745px; }
.card--res-wifi  { min-height: 712px; }
.card--res-fixo  { min-height: 745px; }

@media (max-width: 600px) {
  .card--intro,
  .card--dados,
  .card--step,
  .card--res-smart,
  .card--res-mixed,
  .card--res-gprs,
  .card--res-wifi,
  .card--res-fixo { min-height: 0; }
}

h1 { font-size: 1.75rem; margin: 0 0 10px; line-height: 1.2; }
h2 { font-size: 1.25rem; margin: 0 0 18px; line-height: 1.3; }
p  { color: var(--muted); margin: 0 0 16px; line-height: 1.55; }

.stepper {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--brand);
  color: #fff;
  border: 2px solid transparent;
  padding: 13px 24px;
  border-radius: var(--radius-btn);
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}
.btn:hover  { background: var(--brand-hover); }
.btn:active { transform: scale(0.98); }
.btn:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.btn[disabled], .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.btn.secondary {
  background: #fff;
  color: var(--brand);
  border-color: var(--brand);
}
.btn.secondary:hover { background: #fff8f3; }

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #FF6600;
  border: 2px solid #FF6600;
  padding: 12px 32px;
  border-radius: 4px;
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease;
  white-space: nowrap;
}
.btn-outline:hover { background: #fff8f3; }

.card-intro {
  background: linear-gradient(135deg, #F5B05B 0%, #FF6600 100%);
  border-radius: var(--radius-card);
  padding: clamp(48px, 7vw, 96px) clamp(24px, 4vw, 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: clamp(16px, 2.5vw, 28px);
}
.card-intro .badge {
  display: inline-block;
  background: rgba(255,255,255,0.30);
  color: #fff;
  font-size: clamp(13px, 1.5vw, 17px);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 18px;
  border-radius: 22px;
  margin-bottom: 0;
}
.card-intro h1 {
  color: #fff;
  font-size: clamp(40px, 8.2vw, 80px);
  font-weight: 700;
  margin: 0;
  line-height: 100%;
}
.card-intro p {
  color: #fff;
  font-size: clamp(16px, 2.45vw, 24px);
  font-weight: 400;
  margin: 0;
  line-height: 130%;
  max-width: 640px;
}
.btn-intro {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: #FF6600;
  border: none;
  padding: 13px 28px;
  border-radius: var(--radius-btn);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease;
}
.btn-intro:hover  { opacity: 0.92; }
.btn-intro:active { transform: scale(0.98); }
.btn-intro:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.btn-intro:focus-visible {
  outline: 3px solid rgba(255,255,255,0.8);
  outline-offset: 3px;
}

.dados-layout {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 0;
  min-height: 480px;
}
.dados-copy {
  padding: 36px 24px 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.dados-copy h2 {
  font-size: clamp(28px, 4.9vw, 48px);
  font-weight: 700;
  line-height: 120%;
  margin: 0 0 16px;
  color: var(--text);
}
.dados-copy h2 span {
  color: #FF6600;
}
.dados-copy p {
  font-size: clamp(15px, 2.05vw, 20px);
  font-weight: 400;
  color: var(--muted);
  line-height: 140%;
  margin: 0;
}
.dados-form {
  padding: 28px 32px 32px 28px;
  overflow-y: auto;
}
.dados-form .actions {
  justify-content: flex-start;
}
@media (max-width: 599px) {
  .dados-layout {
    grid-template-columns: 1fr;
  }
  .dados-copy {
    padding: 28px 24px 16px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .dados-form {
    padding: 20px 24px 28px;
  }
}

.field {
  display: block;
  margin-bottom: 16px;
}
.field label {
  display: block;
  font-weight: 400;
  margin-bottom: 8px;
  font-size: clamp(16px, 2.45vw, 24px);
  line-height: 130%;
}
.field label .req {
  color: #4D4D4D;
  font-weight: 400;
}
.field input,
.field select {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  font-size: 0.9rem;
  color: var(--text);
  background: #fff;
  transition: border-color 0.12s;
  appearance: none;
}
.field input::placeholder {
  color: #4D4D4D;
  opacity: 1;
}
.field .error-msg {
  color: var(--error);
  font-size: 0.82rem;
  margin-top: 4px;
  min-height: 1.1em;
}

.field-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  color: var(--muted);
}
.field-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--brand);
  cursor: pointer;
}
.field-check input[type="checkbox"]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.phone-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
}
.phone-prefix {
  background: #FF6600;
  color: #fff;
  font-size: clamp(14px, 1.6vw, 16px);
  font-weight: 700;
  padding: 0 14px;
  border: 1.5px solid #FF6600;
  border-right: none;
  border-radius: 4px 0 0 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  font-family: 'Barlow', sans-serif;
  line-height: 1;
}
.phone-prefix:hover  { background: var(--brand-hover); border-color: var(--brand-hover); }
.phone-prefix:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.field .phone-input {
  flex: 1;
  min-width: 0;
  border: 1.5px solid var(--border);
  border-left: none;
  border-radius: 0 4px 4px 0;
  padding: 8px 12px;
  font-size: 0.9rem;
  color: var(--text);
  background: #fff;
  font-family: inherit;
}
.field .phone-input:focus {
  outline: 3px solid var(--focus);
  outline-offset: 0;
  border-color: var(--focus);
}
.country-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 50;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  min-width: 280px;
  max-height: 320px;
  display: flex;
  flex-direction: column;
  font-family: 'Barlow', sans-serif;
  overflow: hidden;
}
.country-menu[hidden] { display: none; }
.country-search {
  border: 0;
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
  font: inherit;
  font-size: 0.92rem;
  outline: none;
  border-radius: 0;
}
.country-search:focus {
  background: #FFF8F2;
}
.country-list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  overflow-y: auto;
  flex: 1 1 auto;
}
.country-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text);
  transition: background 0.1s;
}
.country-list li[hidden] { display: none; }
.country-list li:hover,
.country-list li[aria-selected="true"] {
  background: #FFF3E8;
}
.country-list .country-flag { font-size: 1.1rem; }
.country-list .country-dial { color: var(--muted); font-weight: 600; }

.result-image-stack {
  position: relative;
  width: 306px;
  height: 423px;
  margin: 0 auto;
  flex-shrink: 0;
}
.result-image-stack .img-base {
  position: absolute;
  width: 305.67px;
  height: 283.42px;
  top: 139.63px;
  left: 0;
  z-index: 1;
}
.result-image-stack .img-overlay {
  position: absolute;
  width: 217px;
  height: 212px;
  top: 0;
  left: 49px;
  z-index: 2;
}

.required-note {
  font-size: 0.78rem;
  color: #A3A3A3;
  margin-top: 8px;
  text-align: left;
}
.required-note span {
  color: #A3A3A3;
  font-weight: 700;
}

.honeypot {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.q-step {
  font-size: clamp(18px, 2.45vw, 24px);
  font-weight: 400;
  color: var(--text);
  margin: 0 0 24px;
  line-height: 130%;
  font-family: 'Barlow', sans-serif;
  text-align: center;
}
.q-step .q-num {
  color: var(--brand);
  font-weight: 700;
}
.q-step .q-key {
  color: #4D4D4D;
  font-weight: 700;
}

.radio-group {
  display: grid;
  grid-template-columns: minmax(min-content, max-content);
  justify-content: center;
  gap: 12px;
  margin: 8px 0 24px;
  max-width: 100%;
}
@media (max-width: 599px) {
  .radio-group { grid-template-columns: 1fr; }
}
.radio-item {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: clamp(16px, 2.45vw, 24px);
  font-weight: 400;
  line-height: 130%;
  color: var(--text);
  font-family: 'Barlow', sans-serif;
  cursor: pointer;
  padding: 10px 18px;
  border-radius: 10px;
  transition: background 0.12s;
  background: transparent;
  border: 1.5px solid transparent;
  text-align: left;
  width: 100%;
}
.radio-item:hover {
  background: #fff8f4;
  border-color: #ffd4b3;
}
.radio-item .r-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #4D4D4D;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.12s;
}
.radio-item[aria-pressed="true"] .r-circle {
  border-color: #FF6600;
}
.radio-item[aria-pressed="true"] .r-circle::after {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #FF6600;
}
.radio-item:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.result-header {
  background: #FF6600;
  padding: 12px 20px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.result-header .rh-logo {
  background: #FFDAC2;
  color: #FF6600;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
  justify-self: start;
  font-family: 'Barlow', sans-serif;
}
.result-header .rh-title {
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  text-align: center;
  justify-self: center;
}
.result-header .rh-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 5px;
  line-height: 1;
  justify-self: end;
  transition: background 0.12s;
}
.result-header .rh-close:hover { background: rgba(255,255,255,0.2); }

.rh-restart {
  margin-left: auto;
  background: rgba(255,255,255,0.25);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.3s;
  font-family: inherit;
}
.rh-restart:hover {
  background: rgba(255,255,255,0.4);
  transform: rotate(-90deg);
}
.rh-restart:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.restart-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fade-in 0.15s ease-out;
}
.restart-confirm-dialog {
  background: #fff;
  border-radius: 12px;
  padding: 24px 28px;
  max-width: 420px;
  width: calc(100% - 32px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
  font-family: 'Barlow', sans-serif;
}
.restart-confirm-dialog h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 700;
}
.restart-confirm-dialog p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
}
.restart-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.result-body {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 24px;
  padding: 60px 32px 36px;
  align-items: start;
}
@media (max-width: 599px) {
  .result-body {
    grid-template-columns: 1fr;
    padding: 20px 20px 28px;
  }
}

.result-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}
.result-tagline {
  font-size: clamp(18px, 2.45vw, 24px);
  font-weight: 400;
  color: #4D4D4D;
  margin: 0;
  line-height: 130%;
  font-style: normal;
  text-align: center;
  max-width: 247px;
}
.result-tagline em {
  font-weight: 700;
  font-style: normal;
  color: #FF6600;
}
.result-badge {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: #FF6600;
  color: #fff;
  font-weight: 700;
  height: 45px;
  width: fit-content;
  padding: 16px;
  border-radius: 28px;
  letter-spacing: 0.03em;
}
.result-left img {
  width: 100%;
  max-width: 310px;
  height: auto;
  aspect-ratio: 310 / 304;
  border-radius: 12px;
  object-fit: contain;
}

.result-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 449px;
}
.result-right p {
  font-size: clamp(15px, 2.05vw, 20px);
  font-weight: 400;
  color: #4D4D4D;
  margin: 0;
  line-height: 140%;
}
.result-right .bullets,
.result-right .bullets li {
  font-size: clamp(15px, 2.05vw, 20px);
  font-weight: 400;
  color: #4D4D4D;
  line-height: 140%;
}
.result-right p strong          { font-weight: 700; color: #4D4D4D; }
.result-right .bullets li strong { font-weight: 700; color: #4D4D4D; }
.result-right p.result-section-title {
  font-size: clamp(15px, 2.05vw, 20px);
  font-weight: 700;
  color: #4D4D4D;
  line-height: 140%;
  margin: 8px 0 2px;
}
.result-right p.result-section-title--orange {
  color: #FF6600 !important;
}
.result-right p.result-list-title {
  font-weight: 700;
  margin: 0 0 4px;
}

.result-divider {
  border: none;
  border-top: 2px solid #F8F8F8;
  height: 0;
  margin: 8px 0;
  width: 100%;
}
.result-right p.result-ideal {
  font-size: clamp(15px, 2.05vw, 20px);
  color: #FF6600;
  font-weight: 400;
  line-height: 140%;
  margin: 10px 0 0;
}
.result-right p.result-ideal strong {
  font-weight: 700;
  color: #FF6600;
}
.result-link {
  font-size: 16px !important;
  line-height: 140%;
  color: #FF6600;
  margin: 0;
}
.result-link a {
  color: #FF6600;
  font-weight: 400;
  text-decoration: underline;
  text-decoration-skip-ink: none;
  text-underline-offset: auto;
}

.result-ctas {
  display: inline-flex;
  align-items: center;
  padding: 20px 0;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 0;
}
.result-ctas .btn,
.result-ctas .btn-outline {
  width: 188px;
  height: 52px;
  padding: 11px 22px 13px 22px;
  border-radius: 4px;
  font-weight: 600;
}

.bullets {
  list-style: none;
  padding-left: 0;
  color: var(--text);
  margin: 0 0 16px;
  line-height: 1.7;
}
.bullets li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 4px;
}

.bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.52em;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: #FF6600;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}

.card-padded .actions {
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 420px) {
  h1 { font-size: 1.45rem; }
}

.toast-confirm {
  position: fixed;
  top: 32px;
  bottom: auto;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: #1a7a4a;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 400;
  padding: 14px 24px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  z-index: 100;
  white-space: nowrap;
  animation: toast-in 0.22s ease, toast-out 0.3s ease 3.5s forwards;
  font-family: 'Barlow', sans-serif;
}
.toast-confirm strong {
  font-weight: 700;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-16px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes toast-out {
  from { opacity: 1; }
  to   { opacity: 0; pointer-events: none; }
}

.radio-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.radio-option {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  margin: 0;
}

.radio-option input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin: 0;
  padding: 0;
  border: 2px solid #4D4D4D;
  border-radius: 50%;
  background: transparent;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
}

.radio-option input[type="radio"]:checked {
  border-color: #FF6600;
}

.radio-option input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: #FF6600;
}

.radio-option input[type="radio"]:checked + .radio-label {
  font-weight: 700;
}

.radio-option input[type="radio"]:focus-visible {
  outline: 2px solid #FF6600;
  outline-offset: 2px;
}

.dados-form .field--inline {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px 16px;
}

.dados-form .field--inline > label {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
}

.dados-form .field--inline > .radio-row {
  grid-column: 2;
  grid-row: 1;
  flex: none; 
}

.dados-form .field--inline > .error-msg {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 0;
}

.dados-form .radio-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Barlow', sans-serif;
  font-size: clamp(16px, 2.45vw, 24px);
  line-height: 130%;
  font-weight: 400;
  color: #4D4D4D;
  white-space: nowrap;
  margin: 0;
}

@media (max-width: 640px) {
  .dados-form .field--inline {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .dados-form .field--inline > .radio-row {
    grid-column: 1;
    grid-row: 2;
  }
  .dados-form .field--inline > .error-msg {
    grid-row: 3;
  }
}

.dados-form .field input.is-invalid {
  border-color: #D00;
}

.dados-form .error-msg:not(:empty) {
  color: #D00;
  font: 400 13px/1.3 'Barlow', sans-serif;
  margin-top: 4px;
}

.dados-form .error-msg:not(:empty)::before {
  content: '⚠ ';
  margin-right: 2px;
}

.result-tagline em {
  color: #FF6600;
  font-style: normal;
  font-weight: 700;
}

.bullets li strong {
  color: #4D4D4D;
  font-weight: 700;
}

.result-link {
  color: #FF6600;
}

.result-link a {
  color: #FF6600;
  text-decoration: underline;
}