/* Styles for the in-browser generators. Matches the landing-page tokens. */

.hero-tool {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 880px;
}
.tool-mount { min-height: 460px; }
.tool { padding: 22px 20px 18px; }
.tool [hidden] { display: none !important; }

.hero:has(.hero-tool) { padding-bottom: 36px; }
.gen-result {
  border-radius: 22px;
  padding: 16px 16px 14px;
  color: #fff;
  background: linear-gradient(145deg, #17172A 0%, #292154 50%, #5F4CD6 130%);
}
.tool h2 {
  margin: 0;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .72);
}
.gen-result-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.gen-result .kicker { color: rgba(255, 255, 255, .72); }
.gen-strength {
  margin: 0;
  flex: 0 0 auto;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.2;
  color: #fff;
  background: rgba(12, 10, 24, .45);
  border-radius: 999px;
  padding: 6px 10px;
}
.gen-value {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.45;
  color: #fff;
  margin-top: 12px;
  overflow-wrap: anywhere;
  word-break: break-all;
  user-select: text;
  min-height: 1.45em;
}
.gen-local {
  margin-top: 12px;
  color: var(--ink3);
  font-size: 14px;
}

.gen-alert,
.gen-warn {
  margin-top: 12px;
  border-radius: 14px;
  padding: 12px 14px;
}
.gen-alert {
  background: var(--amber-s);
  color: #6b4410;
}
.gen-alert p,
.gen-warn p { font-size: 15px; line-height: 1.45; }
.gen-alert p + p,
.gen-warn p + p { margin-top: 6px; }
.gen-warn { background: var(--indigo-s); color: var(--indigo-d); }

.gen-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  align-items: center;
}
.tool button.btn {
  border: 0;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
.tool button.gen-primary {
  background: var(--indigo);
  color: #fff;
  box-shadow: 0 1px 2px rgba(22, 20, 31, .12), 0 10px 24px -10px rgba(22, 20, 31, .30);
}
.tool button.gen-primary:hover { background: var(--indigo-d); color: #fff; }
.tool button.gen-secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid rgba(22, 20, 31, .14);
  font-weight: 700;
}
.tool button.gen-secondary:hover { border-color: rgba(22, 20, 31, .32); color: var(--ink); }
.gen-actions .btn { flex: 1 1 140px; }
.gen-status {
  flex: 1 1 100%;
  min-height: 1.3em;
  margin: 0;
  font-weight: 700;
  font-size: 15px;
  color: var(--mint);
}

.gen-length { margin-top: 16px; }
.gen-length-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-weight: 700;
  font-size: 15px;
}
.gen-length output { font-variant-numeric: tabular-nums; }
.tool input[type="range"] {
  width: 100%;
  margin-top: 8px;
  accent-color: var(--indigo);
  height: 28px;
}
.gen-hint { margin-top: 6px; }

.gen-types,
.gen-presets,
.gen-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.gen-types { margin-top: 14px; }
.gen-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(22, 20, 31, .14);
  background: #fff;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
}
.gen-chip input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.gen-chip.is-on,
.gen-chip[aria-pressed="true"] {
  background: var(--indigo-s);
  border-color: transparent;
  color: var(--indigo-d);
}
.gen-chip:focus-within {
  outline: 3px solid var(--indigo);
  outline-offset: 3px;
}
.tool button.gen-chip { font: inherit; font-weight: 700; font-size: 14px; }

.gen-rules {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(22, 20, 31, .08);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.gen-legend {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.02em;
}
.gen-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.gen-field label,
.gen-class-name {
  display: block;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 6px;
}
.tool select,
.tool input[type="text"],
.tool input[type="number"] {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(22, 20, 31, .16);
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
  font-size: 16px;
}
.gen-class {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 8px;
  align-items: end;
}
.gen-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 44px;
  padding: 10px 0;
  font-size: 15px;
  color: var(--ink);
}
.gen-check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--indigo); flex: 0 0 auto; }

.gen-prompt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--paper);
  border-radius: 16px;
}
.gen-prompt p { flex: 1 1 200px; font-size: 15px; color: var(--ink2); }
.gen-more { margin-top: 16px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 720px) {
  .gen-grid.two { grid-template-columns: 1fr 1fr; }
  .tool { padding: 26px 26px 22px; }
  .gen-value { font-size: 22px; }
}
@media (max-width: 900px) {
  .tool-mount { min-height: 520px; }
  .hero-tool { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tool * { scroll-behavior: auto; }
}
