/* Helvia Go - Multistep wizard */

:root {
  --primary: #ee0111;
  --primary-dark: #c9000e;
  --success: #10b981;
  --danger: #ef4444;
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --text-dark: #1a1a1a;
  --text-main: #2d2d2d;
  --text-light: #535352;
  --text-muted: #8a8a8a;
  --border: #ebebeb;
  --border-strong: #d4d4d4;
  --gradient: linear-gradient(135deg, #ee0111 0%, #c9000e 100%);
  --shadow-md: 0 4px 12px -2px rgba(15,23,42,0.08);
  --shadow-lg: 0 16px 40px -8px rgba(238,1,17,0.15);
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --nav-h: 60px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: var(--font-sans);
  color: var(--text-main);
  background: var(--bg-soft);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
[hidden] { display: none !important; }

.ico { width: 18px; height: 18px; flex-shrink: 0; display: block; }
.ico-sm { width: 14px; height: 14px; }
.ico-xl { width: 32px; height: 32px; }
.ico-inherit { color: inherit; }

/* NAV */
.navbar {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-wrap {
  max-width: 640px; margin: 0 auto; height: 100%;
  padding: 0 1.25rem; display: flex; align-items: center; gap: 0.75rem;
}
.nav-logo img { height: 30px; width: auto; }
.nav-spacer { flex: 1; }
.nav-link-text { font-size: 0.82rem; font-weight: 600; color: var(--text-light); }
.topbar-right .badge-pill {
  display: inline-flex; align-items: center;
  padding: 0.2rem 0.65rem;
  background: white; border: 1px solid var(--border);
  border-radius: 999px; font-size: 0.72rem; font-weight: 600;
  color: var(--text-light); max-width: 180px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.topbar-right .badge-pill strong { color: var(--text-dark); }

/* STANDALONE LAYOUT */
.go-standalone-main {
  min-height: 100vh;
  padding: calc(var(--nav-h) + 1.5rem) 1.25rem 2rem;
  display: flex; justify-content: center; align-items: flex-start;
}

.go-wizard {
  width: 100%; max-width: 560px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 1.5rem 1.5rem 1.25rem;
  animation: fadeIn 0.35s ease both;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* WIZARD HEAD */
.go-wizard-head { margin-bottom: 1.5rem; }
.go-wizard-step-label {
  font-size: 0.78rem; font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.6rem;
}
.go-wizard-progress {
  height: 6px;
  background: var(--bg-soft);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.go-wizard-progress-bar {
  height: 100%;
  background: var(--gradient);
  border-radius: 999px;
  transition: width 0.35s ease;
}

/* PANELS */
.go-wizard-body { min-height: 200px; }
.go-wizard-panel h2 {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text-dark);
  margin-bottom: 0.35rem;
}
.panel-sub {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}
.go-wizard-panel--center { text-align: center; }

/* FORM */
.form { display: flex; flex-direction: column; gap: 0.85rem; }
.field { display: flex; flex-direction: column; gap: 0.3rem; }
.field > span { font-size: 0.78rem; font-weight: 700; color: var(--text-main); }
.field input, .field textarea {
  font-family: inherit; font-size: 0.95rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: white; color: var(--text-dark); width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(238,1,17,0.1);
}
.field textarea { resize: vertical; min-height: 64px; }
.info-line { font-size: 0.82rem; color: var(--text-light); }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.7rem 1.2rem; border-radius: var(--radius-md);
  font-weight: 700; font-size: 0.88rem;
  border: 1px solid transparent;
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 16px; height: 16px; }
.btn-primary {
  background: var(--gradient); color: white;
  box-shadow: 0 8px 24px -6px rgba(238,1,17,0.45);
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; transform: none; filter: none; box-shadow: none; }
.btn-outline {
  background: white; color: var(--text-dark);
  border-color: var(--border-strong);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost {
  background: transparent; color: var(--text-light);
  border-color: var(--border);
}
.btn-ghost:hover { color: var(--primary); border-color: var(--primary); }
.btn-lg { padding: 0.9rem 1.4rem; font-size: 0.95rem; }
.btn-sm { padding: 0.45rem 0.85rem; font-size: 0.78rem; }
.cta-pulse { animation: ctaGlow 2.5s ease-in-out infinite; }
@keyframes ctaGlow {
  0%, 100% { box-shadow: 0 8px 24px -6px rgba(238,1,17,0.45); }
  50% { box-shadow: 0 12px 36px -4px rgba(238,1,17,0.65); }
}
.link-btn {
  background: none; border: none; padding: 0;
  color: var(--primary); font-weight: 700; text-decoration: underline;
  font-size: inherit; cursor: pointer;
}

/* WIZARD NAV */
.go-wizard-nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; margin-top: 1.5rem; padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.go-wizard-nav--first { justify-content: flex-end; }
.go-wizard-nav--first .btn-primary { flex: 1; max-width: 100%; }
.go-wizard-nav:not(.go-wizard-nav--first) .btn-primary { flex: 1; }
.wizard-legal {
  margin-top: 1rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}

/* STATUS */
.form-status { margin-top: 0.75rem; }
.form-error {
  padding: 0.65rem 0.85rem;
  background: rgba(239,68,68,0.06);
  border: 1px solid rgba(239,68,68,0.25);
  color: var(--danger);
  border-radius: var(--radius-sm);
  font-size: 0.82rem; font-weight: 600;
}

/* TRUST */
.trust-row {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem;
  margin-top: 1.25rem; padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.72rem; font-weight: 600; color: var(--text-muted);
}
.trust-row span { display: inline-flex; align-items: center; gap: 0.3rem; }
.trust-row .ico { color: var(--primary); }

/* GIFT */
.gift-burst {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--gradient); color: white;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: 0 12px 32px -8px rgba(238,1,17,0.45);
}
.gift-amount {
  font-size: 2.25rem; font-weight: 900; letter-spacing: -0.04em;
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-align: center; margin: 0.5rem 0;
}

/* NUMBERS */
.region-tabs { position: relative; margin-bottom: 0.75rem; }
.region-select {
  width: 100%; display: grid; grid-template-columns: 1fr auto;
  align-items: center; gap: 0.3rem 0.5rem;
  padding: 0.55rem 0.75rem;
  background: white; border: 1px solid var(--border-strong);
  border-radius: var(--radius-md); cursor: pointer;
  text-align: left; font-family: inherit;
}
.region-tabs.open .region-select {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(238,1,17,0.1);
}
.region-select-label {
  grid-column: 1; font-size: 0.65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted);
}
.region-select-value { grid-column: 1; display: flex; align-items: center; gap: 0.5rem; }
.region-select .caret { grid-column: 2; grid-row: 1 / span 2; width: 16px; height: 16px; color: var(--text-muted); }
.region-select-value .text { display: flex; flex-direction: column; line-height: 1.15; }
.region-select-value .code { font-size: 0.9rem; font-weight: 800; color: var(--text-dark); }
.region-select-value .name { font-size: 0.72rem; color: var(--text-muted); }
.region-menu {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: white; border: 1px solid var(--border-strong);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  padding: 0.25rem; z-index: 20; max-height: 260px; overflow-y: auto;
}
.region-option {
  width: 100%; display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 0.5rem; padding: 0.45rem 0.6rem;
  background: transparent; border: none; border-radius: var(--radius-sm);
  cursor: pointer; text-align: left; font-family: inherit;
}
.region-option:hover { background: var(--bg-soft); }
.region-option.selected { background: rgba(238,1,17,0.06); }
.region-option .code { font-size: 0.85rem; font-weight: 800; }
.region-option .name { font-size: 0.72rem; color: var(--text-muted); }
.region-option .check { width: 16px; height: 16px; color: var(--primary); }
.flag { width: 24px; height: 24px; object-fit: contain; border-radius: 3px; box-shadow: 0 0 0 1px var(--border); }

.numbers-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem; margin-bottom: 0.75rem;
}
.number-tile {
  display: flex; flex-direction: column; gap: 0.15rem;
  padding: 0.75rem 0.85rem;
  background: white; border: 1px solid var(--border-strong);
  border-radius: var(--radius-md); cursor: pointer;
  transition: all 0.15s; position: relative; text-align: left;
}
.number-tile:hover { border-color: var(--primary); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.number-tile.selected {
  border-color: transparent;
  background: rgba(238,1,17,0.04);
  box-shadow: 0 0 0 2px var(--primary), var(--shadow-md);
}
.number-tile .num { font-size: 0.92rem; font-weight: 800; color: var(--text-dark); }
.number-tile .meta { font-size: 0.68rem; color: var(--text-muted); display: inline-flex; align-items: center; gap: 0.25rem; }
.number-tile .meta svg { width: 12px; height: 12px; }
.number-tile .check {
  position: absolute; top: 0.45rem; right: 0.5rem;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--gradient); color: white;
  display: none; align-items: center; justify-content: center;
}
.number-tile .check svg { width: 10px; height: 10px; }
.number-tile.selected .check { display: inline-flex; }
.btn-refresh { margin-bottom: 0.5rem; }

.loading-block {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: center;
  gap: 0.5rem; padding: 2rem 1rem;
  font-size: 0.85rem; color: var(--text-light);
}

/* CONFIG */
.block {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1rem;
  margin-bottom: 0.75rem;
}
.block-flat { background: white; }
.block-head { margin-bottom: 0.6rem; }
.block-head h3 {
  font-size: 0.85rem; font-weight: 800; color: var(--text-dark);
  display: flex; align-items: center; gap: 0.4rem;
}
.block-head .opt {
  font-size: 0.65rem; font-weight: 600; color: var(--text-muted);
  background: white; padding: 0.1rem 0.4rem;
  border-radius: 999px; border: 1px solid var(--border);
}

.welcome-tabs {
  display: flex; gap: 0.25rem;
  background: white; padding: 0.2rem;
  border-radius: var(--radius-md); border: 1px solid var(--border);
  margin-bottom: 0.6rem;
}
.welcome-tab {
  flex: 1; padding: 0.4rem 0.5rem;
  font-size: 0.75rem; font-weight: 700;
  background: transparent; border: none;
  border-radius: var(--radius-sm); color: var(--text-muted);
}
.welcome-tab.active {
  background: var(--gradient); color: white;
  box-shadow: 0 2px 8px rgba(238,1,17,0.3);
}

.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 1.25rem 0.75rem; text-align: center; background: white;
}
.dropzone .ico { margin: 0 auto 0.4rem; color: var(--text-muted); }
.dropzone .drop-text { font-size: 0.82rem; }
.dropzone.over { border-color: var(--primary); background: rgba(238,1,17,0.03); }
.drop-status {
  margin-top: 0.5rem; font-size: 0.78rem; padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.2);
  color: var(--success); font-weight: 600;
}

.mode-options { display: flex; flex-direction: column; gap: 0.45rem; margin-bottom: 0.75rem; }
.mode {
  display: flex; align-items: flex-start; gap: 0.55rem;
  padding: 0.7rem 0.85rem;
  background: white; border: 1px solid var(--border-strong);
  border-radius: var(--radius-md); cursor: pointer;
}
.mode:has(input:checked) {
  border-color: transparent;
  background: rgba(238,1,17,0.04);
  box-shadow: 0 0 0 2px var(--primary);
}
.mode input { margin-top: 0.15rem; accent-color: var(--primary); }
.mode-title { font-weight: 700; font-size: 0.85rem; }
.mode-desc { font-size: 0.72rem; color: var(--text-muted); }
.forward-numbers .field { margin-bottom: 0.5rem; }
.fwd-extras { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 0.5rem; }

.checkbox-row {
  display: flex; align-items: flex-start; gap: 0.55rem;
  padding: 0.7rem 0.85rem;
  background: white; border: 1px solid var(--border-strong);
  border-radius: var(--radius-md); cursor: pointer;
}
.checkbox-row input { margin-top: 0.15rem; accent-color: var(--primary); }
.checkbox-row:has(input:checked) {
  border-color: transparent;
  background: rgba(238,1,17,0.04);
  box-shadow: 0 0 0 2px var(--primary);
}
.check-title { font-weight: 700; font-size: 0.85rem; }
.check-desc { font-size: 0.72rem; color: var(--text-muted); }

/* RECAP */
.wizard-recap {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
}
.recap-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem;
}
.recap-grid > div span {
  display: block; font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--text-muted); margin-bottom: 0.15rem;
}
.recap-grid > div strong { font-size: 0.88rem; color: var(--text-dark); }

/* READY */
.ready-stage { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; padding: 1rem 0; }
.ready-spinner {
  width: 48px; height: 48px; border-radius: 50%;
  border: 3px solid rgba(238,1,17,0.12);
  border-top-color: var(--primary);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.ready-check {
  width: 68px; height: 68px; border-radius: 50%;
  background: var(--gradient); color: white;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 32px -8px rgba(238,1,17,0.45);
}
.ready-phone {
  font-size: 1.3rem; font-weight: 900; color: var(--text-dark);
  padding: 0.45rem 1rem;
  background: var(--bg-soft); border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

/* SPINNER */
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: white;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
.btn-outline .spinner, .btn-ghost .spinner {
  border-color: rgba(238,1,17,0.2); border-top-color: var(--primary);
}

/* TOASTS */
.toasts {
  position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 1000;
  display: flex; flex-direction: column; gap: 0.4rem; max-width: 320px;
}
.toast {
  background: white; border: 1px solid var(--border-strong);
  border-left-width: 3px; padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  font-size: 0.82rem; font-weight: 600;
}
.toast.error { border-left-color: var(--danger); color: var(--danger); }
.toast.success { border-left-color: var(--success); color: var(--success); }
.toast.info { border-left-color: var(--primary); }

/* FOOTER */
.footer-mini {
  max-width: 560px; margin: 0 auto 1.5rem;
  padding: 0 1.25rem;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.72rem; color: var(--text-muted);
  flex-wrap: wrap; gap: 0.4rem;
}
.footer-mini a { color: var(--text-light); }

@media (max-width: 600px) {
  .go-wizard { padding: 1.25rem 1.1rem 1rem; border-radius: var(--radius-lg); }
  .numbers-grid { grid-template-columns: 1fr; }
  .hide-mob { display: none; }
  .go-wizard-nav { flex-direction: column-reverse; }
  .go-wizard-nav .btn { width: 100%; }
  .go-wizard-nav--first { flex-direction: column; }
}
