.zw-hero-prompt {
  /* Dark theme tokens (default) */
  --zw-text: #f4f3fb;
  --zw-box-bg: rgba(255, 255, 255, 0.04);
  --zw-box-border: rgba(255, 255, 255, 0.12);
  --zw-box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.5);
  --zw-placeholder: rgba(255, 255, 255, 0.35);
  --zw-count: rgba(255, 255, 255, 0.4);
  --zw-count-num: rgba(255, 255, 255, 0.6);
  --zw-hint: rgba(255, 255, 255, 0.4);
  --zw-kbd-color: rgba(255, 255, 255, 0.85);
  --zw-kbd-bg: rgba(255, 255, 255, 0.1);
  --zw-kbd-border: rgba(255, 255, 255, 0.18);
  --zw-chips-label: rgba(255, 255, 255, 0.45);
  --zw-chip-bg: rgba(255, 255, 255, 0.04);
  --zw-chip-border: rgba(255, 255, 255, 0.14);
  --zw-chip-hover-bg: rgba(255, 255, 255, 0.07);

  max-width: 760px;
  margin: 0 auto 60px;
}

/* Light theme tokens — for use over white/light backgrounds */
.zw-hero-prompt.zw-theme-light {
  --zw-text: #1a1a2e;
  --zw-box-bg: rgba(255, 255, 255, 0.72);
  --zw-box-border: rgba(15, 17, 23, 0.12);
  --zw-box-shadow: 0 20px 50px -24px rgba(15, 17, 23, 0.2);
  --zw-placeholder: rgba(15, 17, 23, 0.4);
  --zw-count: rgba(15, 17, 23, 0.45);
  --zw-count-num: rgba(15, 17, 23, 0.65);
  --zw-hint: rgba(15, 17, 23, 0.45);
  --zw-kbd-color: rgba(15, 17, 23, 0.75);
  --zw-kbd-bg: rgba(15, 17, 23, 0.06);
  --zw-kbd-border: rgba(15, 17, 23, 0.14);
  --zw-chips-label: rgba(15, 17, 23, 0.5);
  --zw-chip-bg: rgba(255, 255, 255, 0.85);
  --zw-chip-border: rgba(15, 17, 23, 0.12);
  --zw-chip-hover-bg: #ffffff;
}

/* Glass box that blends into whatever background it sits on */
.zw-hp-box {
  position: relative;
  background: var(--zw-box-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--zw-box-border);
  border-radius: 24px;
  box-shadow: var(--zw-box-shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Primary-color glow on focus (no dotted border) */
.zw-hp-box:focus-within {
  border-color: rgba(255, 88, 14, 0.55);
  box-shadow: 0 0 0 1px rgba(255, 88, 14, 0.35),
    0 0 26px -4px rgba(255, 88, 14, 0.22), var(--zw-box-shadow);
}

.zw-hp-input {
  display: block;
  width: 100%;
  min-height: 140px;
  padding: 22px 24px 72px;
  border: none !important;
  border-radius: 24px;
  resize: none;
  outline: none !important;
  box-shadow: none !important;
  font-size: 16px;
  line-height: 1.65;
  color: var(--zw-text);
  /* Force transparent so themes can't paint it white on focus */
  background: transparent !important;
  background-color: transparent !important;
  caret-color: #ff580e;
  box-sizing: border-box;
}

.zw-hp-input:focus,
.zw-hp-input:focus-visible {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  background-color: transparent !important;
  color: var(--zw-text);
}

.zw-hp-input::placeholder {
  color: var(--zw-placeholder);
  opacity: 1;
}

.zw-hp-btn {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 12px 22px;
  border: none;
  border-radius: 12px;
  background: #ff580e;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  box-shadow: 0 6px 18px -4px rgba(255, 88, 14, 0.55);
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.zw-hp-btn:hover {
  transform: translateY(-1px);
  background: #ee4900 !important;
  color: #fff !important;
  box-shadow: 0 12px 26px -6px rgba(255, 88, 14, 0.65);
}

/* Keep it orange on focus/active — override the theme's blue button state */
.zw-hp-btn:focus,
.zw-hp-btn:focus-visible,
.zw-hp-btn:active {
  background: #ff580e !important;
  color: #fff !important;
  border: none !important;
  outline: none !important;
}

.zw-hp-btn:disabled {
  opacity: 0.7;
  cursor: progress;
}

.zw-hp-btn-ic {
  width: 15px;
  height: 15px;
  fill: #fff;
  flex-shrink: 0;
}

/* Bottom-left meta row: character counter + Tab hint */
.zw-hp-foot {
  position: absolute;
  left: 24px;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: calc(100% - 190px);
  pointer-events: none;
}

.zw-hp-count {
  font-size: 12px;
  color: var(--zw-count);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.zw-hp-count-num {
  color: var(--zw-count-num);
  font-weight: 600;
}

/* Highlight the counter when a submit was blocked for being too short */
.zw-hp-foot.is-low .zw-hp-count,
.zw-hp-foot.is-low .zw-hp-count-num {
  color: #ff8a4c;
}

/* Tab hint — fades in when the prompt has multiple placeholders */
.zw-hp-hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--zw-hint);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.zw-hp-hint.is-visible {
  opacity: 1;
  transform: none;
}

/* Inline validation message under the box */
.zw-hp-error {
  margin: 12px 0 0;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #ff8a4c;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.zw-hp-error.is-visible {
  opacity: 1;
}

.zw-hp-hint kbd {
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  color: var(--zw-kbd-color);
  background: var(--zw-kbd-bg);
  border: 1px solid var(--zw-kbd-border);
  border-radius: 5px;
  padding: 1px 6px;
}

/* Full-bleed so the chips sit on one centered line, not capped by the box width */
/* Center a content-width (one-line) row on the page without 100vw, which
   would include the scrollbar and trigger a horizontal scrollbar. */
.zw-hp-chips {
  margin-top: 32px;
  width: max-content;
  margin-left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

.zw-hp-chips-label {
  display: block;
  color: var(--zw-chips-label);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  margin-bottom: 16px;
}

.zw-hp-chips-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  justify-content: center;
  padding: 0 16px;
}

/* Below the one-line width, drop the full-bleed centering and let chips wrap. */
@media (max-width: 860px) {
  .zw-hp-chips {
    width: auto;
    margin-left: 0;
    transform: none;
  }
  .zw-hp-chips-row {
    flex-wrap: wrap;
  }
}

/* Respect reduced-motion: no chip/button transitions. */
@media (prefers-reduced-motion: reduce) {
  .zw-hp-box,
  .zw-hp-btn,
  .zw-hp-chip,
  .zw-hp-hint {
    transition: none !important;
  }
}

/* Glass pill chips with a bare orange icon */
.zw-hp-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--zw-chip-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--zw-text);
  border: 1px solid var(--zw-chip-border);
  border-radius: 999px;
  padding: 10px 20px 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease;
}

.zw-hp-chip-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.zw-hp-chip-ic svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: #ff580e;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Orange border + glow fade in smoothly on hover/focus (no movement) */
.zw-hp-chip:hover,
.zw-hp-chip:focus,
.zw-hp-chip:focus-visible,
.zw-hp-chip:active {
  background: var(--zw-chip-hover-bg) !important;
  color: var(--zw-text) !important;
  outline: none !important;
  border-color: rgba(255, 88, 14, 0.6) !important;
  box-shadow: 0 0 0 1px rgba(255, 88, 14, 0.4),
    0 0 18px -2px rgba(255, 88, 14, 0.3) !important;
}
