/* Veruno.site QR generátor, vzhled editoru (redesign v2).
 *
 * Staví na tokenech z redesign.css (--vs-*), takže generátor a landing drží
 * jednu paletu. Vlastní prefix .vsg- proto, aby se nic nemíchalo se sekcemi
 * landingu, které mají .vs-.
 *
 * Vstupy mají záměrně font-size 16px. Menší písmo nutí iOS Safari stránku
 * při zaostření zvětšit a rozhodí rozvržení.
 */

.vsg-main { padding: 0 var(--vs-gutter) clamp(72px, 9vw, 120px); }
.vsg-wrap { max-width: var(--vs-max); margin: 0 auto; }

/* ── záhlaví ──────────────────────────────────────────────────────────── */

.vsg-hero { padding: clamp(40px, 6vw, 72px) 0 clamp(28px, 4vw, 44px); display: grid; gap: 18px; justify-items: start; }

.vsg-hero-pill {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--vs-line-2); border-radius: 999px;
  padding: 8px 16px 8px 12px;
  font-family: var(--vs-mono); font-size: 12px; letter-spacing: .16em;
  color: var(--vs-ink-soft); text-transform: uppercase;
}
.vsg-hero-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--vs-accent); }

.vsg-hero h1 {
  font-size: clamp(34px, 5.4vw, 64px); line-height: 1.04;
  letter-spacing: -.03em; font-weight: 800; margin: 0; max-width: 16ch;
}
.vsg-hero p { margin: 0; font-size: clamp(16px, 1.6vw, 19px); color: var(--vs-ink-soft); max-width: 62ch; line-height: 1.55; }

/* ── rozvržení ────────────────────────────────────────────────────────── */

.vsg-grid {
  display: grid; gap: 20px;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  align-items: start;
}
@media (max-width: 1040px) { .vsg-grid { grid-template-columns: 1fr; } }

.vsg-panel {
  background: var(--vs-panel);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 20px;
  padding: clamp(22px, 3vw, 40px);
  display: grid; gap: 28px;
}

.vsg-step {
  font-family: var(--vs-mono); font-size: 11px; letter-spacing: .16em;
  color: var(--vs-ink-mute); margin-bottom: 12px; text-transform: uppercase;
}

.vsg-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 20px; }

/* ── typ obsahu ───────────────────────────────────────────────────────── */

.vsg-types { display: flex; flex-wrap: wrap; gap: 8px; }
.vsg-type {
  padding: 10px 16px; min-height: 44px; border-radius: 999px;
  font-size: 15px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--vs-line-2); background: transparent; color: var(--vs-ink-soft);
  transition: background .2s, border-color .2s, color .2s;
}
.vsg-type:hover { background: var(--vs-panel-2); color: var(--vs-ink); }
.vsg-type.is-on { border-color: rgba(224, 87, 127, .5); background: rgba(224, 87, 127, .14); color: var(--vs-ink); }

/* ── pole formuláře ───────────────────────────────────────────────────── */

.vsg-section[hidden] { display: none; }
.vsg-fields { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.vsg-field { display: grid; gap: 8px; }
.vsg-field.full { grid-column: 1 / -1; }
.vsg-field label {
  font-family: var(--vs-mono); font-size: 11px; letter-spacing: .16em;
  color: var(--vs-ink-mute); text-transform: uppercase;
}

.vsg-input {
  height: 52px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--vs-line-2); background: var(--vs-bg);
  color: var(--vs-ink); font-size: 16px; font-family: inherit; outline: none;
  transition: border-color .2s;
  width: 100%;
}
textarea.vsg-input { height: auto; min-height: 110px; padding: 14px 16px; resize: vertical; line-height: 1.5; }
select.vsg-input { appearance: none; cursor: pointer; }
.vsg-input:focus { border-color: var(--vs-accent); }
.vsg-input::placeholder { color: var(--vs-ink-dim); }

/* ── styl bodů ────────────────────────────────────────────────────────── */

.vsg-styles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 96px), 1fr)); gap: 10px; }
.vsg-style {
  border: 1px solid var(--vs-line-2); background: transparent; color: var(--vs-ink-soft);
  border-radius: 12px; padding: 14px 10px 10px; cursor: pointer;
  display: grid; gap: 10px; justify-items: center; transition: background .2s, border-color .2s;
}
.vsg-style:hover { background: var(--vs-panel-2); }
.vsg-style.is-on { border-color: rgba(224, 87, 127, .5); background: rgba(224, 87, 127, .12); color: var(--vs-ink); }
.vsg-style-name { font-size: 12px; font-weight: 600; }

/* Miniatura tvaru bodů: 3×3 mřížka, tvar se mění podle varianty. */
.vsg-dots { display: grid; grid-template-columns: repeat(3, 7px); gap: 3px; }
.vsg-dots span { width: 7px; height: 7px; background: currentColor; display: block; }
.vsg-style[data-style="rounded"] .vsg-dots span { border-radius: 2px; }
.vsg-style[data-style="dots"] .vsg-dots span { border-radius: 50%; }
.vsg-style[data-style="classy"] .vsg-dots span { border-radius: 50% 2px 50% 2px; }

/* ── barvy ────────────────────────────────────────────────────────────── */

.vsg-pals { display: flex; flex-wrap: wrap; gap: 8px; }
.vsg-pal {
  width: 46px; height: 46px; border-radius: 10px; cursor: pointer; padding: 0;
  border: 2px solid var(--vs-line-2); display: grid; place-items: center;
  transition: border-color .2s, transform .15s;
}
.vsg-pal:hover { transform: translateY(-1px); }
.vsg-pal.is-on { border-color: var(--vs-accent); }
.vsg-pal span { width: 20px; height: 20px; border-radius: 5px; display: block; }

.vsg-colors { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 14px; margin-top: 16px; }
.vsg-color { display: flex; align-items: center; gap: 10px; }
.vsg-color > label {
  font-family: var(--vs-mono); font-size: 11px; letter-spacing: .12em;
  color: var(--vs-ink-mute); white-space: nowrap; min-width: 34px;
}
.vsg-swatch { width: 38px; height: 38px; border: 1px solid var(--vs-line-2); border-radius: 8px; cursor: pointer; background: none; padding: 2px; flex: none; }
.vsg-hex {
  flex: 1; min-width: 0; height: 38px; padding: 0 10px; border-radius: 8px;
  border: 1px solid var(--vs-line-2); background: var(--vs-bg); color: var(--vs-ink);
  font-family: var(--vs-mono); font-size: 13px; outline: none;
}
.vsg-hex:focus { border-color: var(--vs-accent); }

.vsg-warn {
  display: none; margin-top: 12px; padding: 10px 14px; border-radius: 10px;
  background: rgba(224, 87, 127, .12); border: 1px solid rgba(224, 87, 127, .4);
  color: var(--vs-ink); font-size: 13px;
}
.vsg-warn.is-on { display: block; }

/* ── segmentované volby (okraj, velikost, logo, mapy) ─────────────────── */

.vsg-seg { display: flex; gap: 6px; flex-wrap: wrap; }
.vsg-seg-btn {
  flex: 1 1 0; min-width: 88px; min-height: 44px; padding: 0 12px;
  border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--vs-line-2); background: transparent; color: var(--vs-ink-soft);
  transition: background .2s, border-color .2s, color .2s;
}
.vsg-seg-btn:hover { background: var(--vs-panel-2); color: var(--vs-ink); }
.vsg-seg-btn.is-on { border-color: rgba(224, 87, 127, .5); background: rgba(224, 87, 127, .14); color: var(--vs-ink); }

.vsg-hint { margin: 10px 0 0; font-size: 13px; color: var(--vs-ink-dim); line-height: 1.5; min-height: 1em; }

/* ── logo ─────────────────────────────────────────────────────────────── */

.vsg-upload {
  margin-top: 12px; border: 1px dashed var(--vs-line-3); border-radius: 12px;
  padding: 22px; text-align: center; cursor: pointer; transition: border-color .2s, background .2s;
}
.vsg-upload[hidden] { display: none; }
.vsg-upload:hover, .vsg-upload.is-drag { border-color: var(--vs-accent); background: rgba(224, 87, 127, .06); }
.vsg-upload p { margin: 8px 0 0; font-size: 13px; color: var(--vs-ink-soft); }
.vsg-upload .vsg-upload-sub { font-size: 11px; color: var(--vs-ink-dim); margin-top: 2px; }
.vsg-logo-preview { max-width: 72px; max-height: 72px; display: block; margin: 0 auto; }
.vsg-err { margin-top: 10px; font-size: 13px; color: var(--vs-accent-2); }
.vsg-err[hidden] { display: none; }

/* ── pata panelu ──────────────────────────────────────────────────────── */

.vsg-panel-foot {
  border-top: 1px solid var(--vs-line-2); padding-top: 22px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center;
}
.vsg-panel-foot p { margin: 0; font-size: 14px; color: var(--vs-ink-mute); line-height: 1.5; }

/* ── náhled ───────────────────────────────────────────────────────────── */

.vsg-side { display: grid; gap: 18px; position: sticky; top: 100px; }
@media (max-width: 1040px) { .vsg-side { position: static; } }

.vsg-preview {
  background: var(--vs-panel); border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 20px; padding: clamp(22px, 3vw, 40px);
  display: grid; gap: 22px; justify-items: center;
}
.vsg-preview-head { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.vsg-live {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--vs-mono); font-size: 11px; letter-spacing: .16em; color: var(--vs-accent);
}
.vsg-live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--vs-accent); animation: vsgPulse 1.8s infinite; }
@keyframes vsgPulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* Samolepka. Zaoblení je jen vzhled na obrazovce, stažené PNG je čtverec.
   Při volbě „bez okraje" QR doléhá k hraně plátna a projeví se zaoblení. */
.vsg-sticker {
  background: #ffffff; border-radius: 18px; padding: 22px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .55); transition: background .3s;
  max-width: 100%;
}
.vsg-qr { border-radius: 4.5%; overflow: hidden; line-height: 0; }
/* Zaobleni je v procentech, aby se zmensilo spolu s kodem na mobilu.
   6 px z navrhu bylo na 280 px tak malo, ze kod vypadal hranate.
   4,5 % je zretelne videt a ukroji z rohu vyhledavaciho vzoru jen
   zlomek modulu; vic uz by cteni kodu ohrozilo. */
.vsg-qr canvas, .vsg-qr svg { width: min(280px, 58vw); height: auto; display: block; }

.vsg-payload {
  font-family: var(--vs-mono); font-size: 12px; color: var(--vs-ink-mute);
  text-align: center; width: 100%; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.vsg-dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.vsg-dl-btn {
  height: 54px; border-radius: 10px; font-weight: 700; font-size: 16px;
  cursor: pointer; border: 1px solid var(--vs-line-2);
  background: var(--vs-panel-2); color: var(--vs-ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .2s;
}
.vsg-dl-btn:hover { background: var(--vs-panel-3); }
.vsg-dl-btn.is-primary { background: var(--vs-accent); color: var(--vs-accent-ink); border-color: transparent; }
.vsg-dl-btn.is-primary:hover { background: var(--vs-accent-2); }

.vsg-dl-row { display: flex; gap: 10px; width: 100%; }
.vsg-dl-alt {
  flex: 1; min-height: 46px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--vs-line-2); background: transparent; color: var(--vs-ink-soft);
  font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  transition: background .2s, color .2s;
}
.vsg-dl-alt:hover { background: var(--vs-panel-2); color: var(--vs-ink); }
.vsg-pro {
  font-family: var(--vs-mono); font-size: 10px; letter-spacing: .1em;
  color: var(--vs-accent); border: 1px solid rgba(224, 87, 127, .45);
  border-radius: 5px; padding: 2px 5px; line-height: 1;
}
.vsg-free { font-family: var(--vs-mono); font-size: 10px; letter-spacing: .1em; opacity: .75; }

.vsg-note { font-size: 13px; color: var(--vs-ink-dim); text-align: center; }

/* ── karta s účtem a promo ────────────────────────────────────────────── */

.vsg-upsell {
  background: linear-gradient(160deg, rgba(224, 87, 127, .16), rgba(224, 87, 127, .04)), var(--vs-panel);
  border: 1px solid rgba(224, 87, 127, .4); border-radius: 20px;
  padding: clamp(22px, 3vw, 32px); display: grid; gap: 12px;
}
.vsg-upsell-kicker { font-family: var(--vs-mono); font-size: 11px; letter-spacing: .16em; color: var(--vs-accent); text-transform: uppercase; }
.vsg-upsell h2 { font-weight: 800; font-size: 22px; letter-spacing: -.02em; line-height: 1.15; margin: 0; }
.vsg-upsell p { margin: 0; color: var(--vs-ink-soft); font-size: 15px; line-height: 1.55; }

.vsg-promo {
  background: var(--vs-panel); border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 18px; padding: 22px; display: grid; gap: 8px;
}
.vsg-promo h3 { margin: 0; font-size: 15px; font-weight: 700; }
.vsg-promo p { margin: 0; font-size: 13px; color: var(--vs-ink-mute); line-height: 1.55; }
