/* ══════════════════════════════════════════════════════════════════════════
   Desktop Widget configurator
   ══════════════════════════════════════════════════════════════════════════ */

.wg-main {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.wg-hero {
  text-align: center;
  margin-bottom: 32px;
}
.wg-hero h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 10px;
}
.wg-dot { color: var(--accent); }
.wg-sub { color: var(--muted); font-size: 1rem; max-width: 480px; margin: 0 auto; }

/* ── Card shared ── */
.wg-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 8px 30px rgba(0,0,0,.2);
  margin-bottom: 20px;
}
.wg-h   { font-size: 1.15rem; font-weight: 600; margin-bottom: 6px; }
.wg-p   { color: var(--muted); font-size: .88rem; margin-bottom: 20px; }

/* ── Form ── */
.wg-field { margin-bottom: 20px; }
.wg-field label {
  display: block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.wg-field input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--mono);
  font-size: .88rem;
  padding: 12px 14px;
  border-radius: 10px;
  transition: border-color .15s;
}
.wg-field input:focus {
  outline: none;
  border-color: var(--accent);
}

.wg-hint {
  font-size: .78rem;
  color: var(--muted);
  margin-top: 8px;
  min-height: 18px;
}
.wg-hint.ok  { color: var(--green); }
.wg-hint.err { color: var(--red);   }

.wg-pill-group {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 6px;
}
.wg-pill-group button {
  width: 100%;
  min-width: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--sans);
  font-size: .85rem;
  font-weight: 600;
  padding: 10px 4px;
  border-radius: 10px;
  cursor: pointer;
  transition: color .15s, background .15s, border-color .15s;
}
.wg-pill-group button:hover { color: var(--text); border-color: var(--accent); }
.wg-pill-group button.active {
  background: rgba(124,109,250,.14);
  border-color: var(--accent);
  color: var(--accent2);
}

/* ── Actions ── */
.wg-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}
.wg-actions > * { min-width: 0; }

.wg-cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent);
  border: none;
  color: #fff;
  font-family: var(--sans);
  font-size: .95rem;
  font-weight: 600;
  padding: 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: background .15s, box-shadow .15s, transform .1s;
}
.wg-cta:hover:not(:disabled) {
  background: var(--accent2);
  box-shadow: 0 6px 20px rgba(124,109,250,.35);
}
.wg-cta:active:not(:disabled) { transform: translateY(1px); }
.wg-cta:disabled { opacity: .4; cursor: not-allowed; }
.wg-cta svg { width: 16px; height: 16px; }

.wg-secondary {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--sans);
  font-size: .9rem;
  font-weight: 500;
  padding: 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.wg-secondary:hover:not(:disabled) { color: var(--accent2); border-color: var(--accent); }
.wg-secondary:disabled { opacity: .4; cursor: not-allowed; }
.wg-secondary svg { width: 15px; height: 15px; }

/* ── Preview card ── */
.wg-preview-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 20px;
}
.wg-preview-label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.wg-preview-frame {
  display: flex;
  justify-content: center;
  padding: 12px;
  background:
    radial-gradient(circle at 30% 20%, rgba(124,109,250,.08), transparent 55%),
    radial-gradient(circle at 75% 80%, rgba(52,211,153,.06), transparent 55%),
    var(--surface2);
  border-radius: 12px;
}
.wgp-bg {
  position: relative;
  width: 100%; max-width: 520px; aspect-ratio: 520 / 200;
  background: rgba(11,11,18,.96);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--sans);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.wgp-accent {
  position: absolute; left: 3.2%; top: 8%;
  width: 3px; height: 15%;
  background: var(--accent);
  border-radius: 2px;
}
.wgp-divider {
  position: absolute; top: 11%; bottom: 11%; left: 50%;
  width: 1px;
  background: var(--border);
}
.wgp-left, .wgp-right {
  padding: 3% 3.8%;
  position: relative;
}
.wgp-left  { padding-left: 7%; }
.wgp-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 2%;
}
.wgp-brand { font-weight: 700; font-size: 2.4cqw; }
.wgp-brand-dot { color: var(--accent); }
.wgp-live {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 1.5cqw; font-weight: 700;
  color: var(--green);
  letter-spacing: .5px;
}
.wgp-live-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); animation: wgp-pulse 1.5s ease infinite; }
@keyframes wgp-pulse { 50% { opacity: .4; } }
.wgp-sub { font-size: 1.5cqw; color: var(--muted); font-weight: 500; margin-bottom: 6%; }
.wgp-lbl { font-size: 1.4cqw; color: var(--muted); font-weight: 700; letter-spacing: .5px; margin-bottom: 2%; }
.wgp-price   { font-size: 6.2cqw; font-weight: 300; line-height: 1; }
.wgp-balance { font-size: 4.4cqw; font-weight: 300; line-height: 1.05; }
.wgp-change  { font-size: 2.1cqw; font-weight: 600; color: var(--green); margin-top: 2.5%; }
.wgp-usd     { font-size: 2.1cqw; font-weight: 600; color: var(--accent2); margin-top: 2.5%; }

.wgp-range-lbl { margin-top: 5.5%; font-size: 1.4cqw; color: var(--muted); font-weight: 700; letter-spacing: .5px; }
.wgp-range-track {
  margin-top: 3%; height: 3px; width: 100%; background: rgba(40,40,60,1); border-radius: 2px; overflow: hidden;
}
.wgp-range-bar { height: 100%; background: var(--accent); }
.wgp-range-row { margin-top: 4px; display: flex; justify-content: space-between; font-family: var(--mono); font-size: 1.4cqw; }
.wgp-range-lo { color: var(--red);   }
.wgp-range-hi { color: var(--green); }

.wgp-copy {
  font-family: var(--mono); font-size: 1.6cqw; color: var(--muted);
  background: rgba(17,17,28,.9);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 8px;
}
.wgp-stats {
  margin-top: 5.5%;
  padding-top: 4%;
  border-top: 1px solid var(--border);
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
}
.wgp-stat-k { font-size: 1.2cqw; font-weight: 700; letter-spacing: .5px; color: var(--muted); }
.wgp-stat-v { font-family: var(--mono); font-size: 2.1cqw; margin-top: 2px; }
.wgp-stat-v.y { color: var(--yellow, #fbbf24); }
.wgp-stat-v.g { color: var(--green);  }
.wgp-stat-v.p { color: var(--accent); }

/* Container-query font sizing so the preview scales with width */
.wgp-bg { container-type: inline-size; }

/* ── Tutorial ── */
.wg-steps {
  list-style: none;
  counter-reset: step;
  display: grid; gap: 12px;
}
.wg-steps li {
  display: flex; gap: 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}
.wg-step-n {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(124,109,250,.15);
  color: var(--accent2);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem;
}
.wg-step-body { flex: 1; min-width: 0; }
.wg-step-title { font-weight: 600; font-size: .95rem; margin-bottom: 4px; }
.wg-step-text {
  color: var(--muted); font-size: .85rem; line-height: 1.5;
  word-break: break-word;
}
.wg-step-text code {
  font-family: var(--mono); font-size: .78rem;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--text);
}
.wg-link-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 7px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: color .15s, border-color .15s;
}
.wg-link-btn:hover { color: var(--accent2); border-color: var(--accent); }

/* ── Mobile block ── */
.wg-mobile-block { display: none; }
.wg-mobile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 40px 28px;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0,0,0,.2);
}
.wg-mobile-card svg {
  width: 56px; height: 56px;
  color: var(--accent);
  margin: 0 auto 18px;
  display: block;
}
.wg-mobile-card h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.wg-mobile-card p {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.5;
  margin-bottom: 24px;
}
.wg-mobile-card strong { color: var(--text); font-weight: 600; }
.wg-mobile-back {
  display: inline-block;
  padding: 10px 18px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 500;
  transition: color .15s, border-color .15s;
}
.wg-mobile-back:hover { color: var(--accent2); border-color: var(--accent); }

/* ── Responsive ── */
@media (max-width: 760px), (pointer: coarse) {
  .wg-main { padding: 24px 16px 60px; }
  .wg-preview-card, .wg-main > .wg-card { display: none; }
  .wg-mobile-block { display: block; }
}
