/* Shared "try-before-signup" widget — loaded on the homepage and
 * the dedicated /qr-code-generator and /short-link-generator
 * landing pages. Loads alongside /lnks-builder.css (which owns
 * the destination + QR-design pickers themselves). */
:root { --mint: #75FB90; --mint-deep: #1ABC4E; }
.h-widget-wrap {
  position: relative;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 56px) clamp(12px, 3vw, 28px) clamp(28px, 4vw, 56px);
  max-width: 1280px;
}
.h-widget-canvas {
  position: relative;
  background: #0a0a0b;
  color: #fff;
  border-radius: 28px;
  padding: clamp(36px, 5vw, 72px) clamp(20px, 4vw, 56px) clamp(28px, 4vw, 48px);
  isolation: isolate;
  overflow-x: clip;
}
.h-widget-glow {
  position: absolute; inset: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.h-widget-glow::before, .h-widget-glow::after {
  content: "";
  position: absolute; pointer-events: none;
  width: 90%; height: 120%;
}
.h-widget-glow::before {
  top: -50%; right: -25%;
  background: radial-gradient(ellipse at center, rgba(117,251,144,0.20) 0%, rgba(117,251,144,0) 65%);
}
.h-widget-glow::after {
  bottom: -55%; left: -20%;
  background: radial-gradient(ellipse at center, rgba(117,251,144,0.13) 0%, rgba(117,251,144,0) 65%);
}
.h-widget-head {
  position: relative; z-index: 1;
  max-width: 880px; margin: 0 auto clamp(28px, 3vw, 40px);
  text-align: center;
}
.h-widget-head .h-hero-eyebrow { justify-content: center; margin-bottom: 18px; color: var(--mint); }
.h-widget-h1 {
  font-size: clamp(38px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.98;
  margin: 0 0 18px;
  color: #fff;
  text-wrap: balance;
}
.h-widget-h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--mint) 0%, var(--mint-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.h-widget-lead {
  font-size: clamp(15px, 1.5vw, 19px);
  color: rgba(255,255,255,0.78);
  margin: 0 auto;
  max-width: 56ch;
  line-height: 1.55;
}
.h-widget-lead strong { color: var(--mint); font-weight: 600; }
.h-widget-steps {
  display: inline-flex; flex-wrap: wrap; justify-content: center;
  gap: 10px 22px;
  margin-top: 22px;
  font-family: "Victor Mono", ui-monospace, monospace;
  font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}
.h-widget-steps span { display: inline-flex; align-items: center; gap: 8px; }
.h-widget-steps b {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(117,251,144,0.18);
  color: var(--mint);
  font-weight: 700; letter-spacing: 0; font-size: 11px;
}
.h-widget-shell {
  position: relative; z-index: 1;
  background: #fff;
  color: #0a0a0b;
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.40);
  padding: clamp(20px, 3vw, 32px);
  overflow-x: clip;
}
.h-widget-grid {
  display: grid; gap: clamp(20px, 3vw, 32px);
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: start;
  min-width: 0;
}
.h-widget-form, .h-widget-preview-col { min-width: 0; }
@media (max-width: 760px) {
  .h-widget-grid { grid-template-columns: 1fr; gap: 14px; }
  .h-widget-preview-col { order: 2; position: static; }
  .h-widget-preview-shell { padding: 14px; flex-direction: row; gap: 14px; align-items: center; }
  .h-widget-preview { width: 88px; max-width: 88px; padding: 8px; flex: 0 0 88px; border-radius: 12px; }
  .h-widget-preview-meta { text-align: left; font-size: 11.5px; }
}
@media (max-width: 540px) {
  .h-widget-wrap { padding: 14px 8px 24px; }
  .h-widget-canvas { border-radius: 20px; padding: 28px 14px 22px; }
  .h-widget-shell  { border-radius: 16px; padding: 14px; }
  .h-widget-h1     { font-size: clamp(32px, 9vw, 44px); letter-spacing: -0.035em; }
  .h-widget-steps  { gap: 6px 14px; font-size: 10.5px; }
  .h-widget-steps b { width: 18px; height: 18px; font-size: 10px; }
}
.h-widget-form { display: flex; flex-direction: column; gap: 6px; }
.h-widget-label {
  font-family: "Victor Mono", ui-monospace, monospace;
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: #6B6B73;
  margin: 8px 0 4px;
}
.h-widget-label:first-child { margin-top: 0; }
.h-widget-input {
  width: 100%;
  border: 1.5px solid #E5E4E7;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px; color: #0a0a0b;
  background: #fff; outline: 0;
  transition: border-color 100ms ease;
  font-family: inherit;
}
.h-widget-input:focus { border-color: #0a0a0b; }
.h-widget-slug {
  display: flex; align-items: stretch;
  border: 1.5px solid #E5E4E7;
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 100ms ease;
}
.h-widget-slug:focus-within { border-color: #0a0a0b; }
.h-widget-slug-prefix {
  display: inline-flex; align-items: center;
  padding: 0 12px;
  background: #F7F7F8;
  font-family: "Victor Mono", ui-monospace, monospace;
  font-size: 13.5px; color: #6B6B73;
  border-right: 1.5px solid #E5E4E7;
}
.h-widget-slug-input {
  border: 0; border-radius: 0;
  flex: 1; min-width: 0;
  font-family: "Victor Mono", ui-monospace, monospace;
  font-size: 14px;
}
.h-widget-status {
  min-height: 18px; font-size: 12px; color: #6B6B73;
  padding-left: 4px;
}
.h-widget-status.is-ok  { color: #1a6a3a; }
.h-widget-status.is-err { color: #c0392b; }
.h-widget-templates {
  display: flex; gap: 10px;
  overflow-x: auto; padding: 4px 4px 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.h-widget-templates::-webkit-scrollbar { height: 6px; }
.h-widget-templates::-webkit-scrollbar-thumb { background: #E5E4E7; border-radius: 3px; }
.h-widget-tpl {
  flex: 0 0 88px;
  aspect-ratio: 1 / 1;
  border: 2px solid #E5E4E7;
  border-radius: 14px;
  background: #fff;
  cursor: pointer; padding: 8px;
  display: grid; place-items: center;
  transition: border-color 100ms ease, transform 100ms ease;
  scroll-snap-align: start;
}
.h-widget-tpl:hover { border-color: #B5B5BC; transform: translateY(-1px); }
.h-widget-tpl.is-active { border-color: #0a0a0b; }
.h-widget-tpl svg { width: 100%; height: 100%; display: block; }
.h-widget-tpl-loading { color: #6B6B73; font-size: 13px; padding: 8px 4px; }
.h-widget-customize {
  margin-top: 16px;
  border: 1px solid #E5E4E7;
  border-radius: 14px;
  background: #fff;
}
.h-widget-customize summary {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; user-select: none;
  list-style: none;
  padding: 14px 16px;
  color: #0a0a0b; font-weight: 600; font-size: 14px;
}
.h-widget-customize summary::-webkit-details-marker { display: none; }
.h-widget-customize summary svg {
  width: 18px; height: 18px; color: #6B6B73;
  margin-left: auto;
  transition: transform 150ms ease;
}
.h-widget-customize[open] summary svg { transform: rotate(180deg); }
.h-widget-customize[open] summary { border-bottom: 1px solid #E5E4E7; }
.h-widget-customize-eyebrow {
  font-family: "Victor Mono", ui-monospace, monospace;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: #6B6B73;
}
.h-widget-customize-label { color: #0a0a0b; }
.h-widget-customize > div { padding: 16px; }
.h-widget-slug-dice {
  background: #F7F7F8; border: 0; border-left: 1.5px solid #E5E4E7;
  padding: 0 12px; cursor: pointer; color: #0a0a0b;
  display: flex; align-items: center; justify-content: center;
}
.h-widget-slug-dice:hover { background: #EFEFEF; }
.h-widget-slug-dice:focus-visible { outline: 0; background: #EFEFEF; box-shadow: inset 0 0 0 2px #0a0a0b; }
.h-widget-slug-dice svg { width: 18px; height: 18px; }
.h-widget-label-opt { font-weight: 500; color: #6B6B73; text-transform: none; letter-spacing: 0; font-family: inherit; font-size: 12.5px; }
.h-widget-cta {
  margin-top: 18px;
  background: var(--mint); color: #0a0a0b;
  border: 0; border-radius: 12px;
  padding: 16px 18px;
  font-size: 15px; font-weight: 700; letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(117,251,144,0.35);
  transition: transform 100ms ease, box-shadow 150ms ease, background 100ms ease;
}
.h-widget-cta:hover:not([disabled]) { background: var(--mint); color: #0a0a0b; transform: translateY(-1px); box-shadow: 0 12px 28px rgba(117,251,144,0.55); }
.h-widget-cta[disabled] {
  background: #F0F0F2; color: #B5B5BC;
  cursor: not-allowed; box-shadow: none; transform: none;
}
.h-widget-msg {
  background: #FFE5E5; color: #c0392b;
  padding: 10px 14px; border-radius: 10px;
  font-size: 13px; margin-top: 8px;
}
.h-widget-foot {
  font-size: 12.5px; color: #6B6B73;
  margin-top: 8px; line-height: 1.5;
}
.h-widget-preview-col { position: sticky; top: 88px; align-self: start; }
.h-widget-preview-shell {
  background: #F7F7F8; border-radius: 18px;
  padding: clamp(20px, 3vw, 28px);
  display: flex; flex-direction: column; align-items: center;
  gap: 14px;
}
.h-widget-preview {
  width: 100%; max-width: 240px; aspect-ratio: 1 / 1;
  background: #fff; border-radius: 14px;
  padding: 14px;
  display: grid; place-items: center;
}
.h-widget-preview svg { width: 100%; height: 100%; display: block; }
.h-widget-preview-meta {
  font-family: "Victor Mono", ui-monospace, monospace;
  font-size: 12px; color: #6B6B73;
  text-align: center; word-break: break-all;
}
/* Floating mini-preview — pops up bottom-right when the inline
 * preview scrolls out of view. Same pattern as the dashboard QR
 * editor. Click opens a fullscreen modal. */
.hw-mini-preview {
  position: fixed;
  right: 16px; bottom: 16px;
  z-index: 40;
  width: 96px; height: 96px;
  background: #fff;
  border: 1px solid #E5E4E7;
  border-radius: 16px;
  padding: 6px;
  box-shadow: 0 14px 36px rgba(10,10,11,0.22), 0 4px 12px rgba(10,10,11,0.10);
  cursor: pointer;
  display: none !important; align-items: center; justify-content: center;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.18s;
  opacity: 0;
}
/* Only enable the floating preview on mobile/tablet — on desktop
 * the sticky side preview is always visible so the mini would
 * just duplicate it. */
@media (max-width: 980px) {
  .hw-mini-preview.is-visible { display: inline-flex !important; opacity: 1; }
}
.hw-mini-preview:hover { transform: translateY(-2px); }
.hw-mini-preview:active { transform: translateY(0); }
.hw-mini-preview svg { width: 100%; height: 100%; display: block; }
.hw-mini-tag {
  position: absolute;
  top: -8px; right: -6px;
  background: #75FB90; color: #0a0a0b;
  font-family: "Victor Mono", ui-monospace, monospace;
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 999px;
  pointer-events: none;
}
.hw-modal {
  position: fixed; inset: 0;
  background: rgba(10,10,11,0.78);
  z-index: 60;
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
  backdrop-filter: blur(4px);
}
.hw-modal.is-open { display: flex; }
.hw-modal-card {
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  max-width: min(420px, calc(100vw - 32px));
  width: 100%;
  position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,0.4);
}
.hw-modal-stage {
  aspect-ratio: 1 / 1;
  width: 100%;
  display: flex; align-items: center; justify-content: center;
}
.hw-modal-stage svg { width: 100%; height: auto; display: block; }
.hw-modal-close {
  position: absolute; top: 10px; right: 10px;
  width: 36px; height: 36px;
  border-radius: 999px;
  background: #fff; border: 1px solid #E5E4E7;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  color: #0a0a0b;
}
.hw-modal-close svg { width: 18px; height: 18px; }
.hw-modal-close:hover { border-color: #0a0a0b; }
