/* betahub-forms-surveys — shared base (tokens + primitives + app chrome + public form)
   Every scene imports this first, then its own <moment>.css for screen-specific bits.
   Colors sampled from the real Forms & Surveys UI. Namespace: bhfs-*. */

:root {
  --fs-bg: #0B1727;
  --fs-panel: #152438;
  --fs-panel-2: #0F1D30;
  --fs-tile: rgba(35, 46, 60, 0.25);
  --fs-border: #344050;
  --fs-text: #D8E2EF;
  --fs-muted: #9DA9BB;
  --fs-primary: #2C7BE5;
  --fs-link: #5997EB;
  --fs-accent: #3B7DDD;
  --fs-discord: #5865F2;
  --fs-green: #00D27A;
  --fs-orange: #F5803E;
  --fs-radius: 4px;
  --fs-font: 'Open Sans', system-ui, -apple-system, sans-serif;
  --fs-head: 'Poppins', system-ui, -apple-system, sans-serif;
}

/* ── Stage root ─────────────────────────────────────────────── */
.bhfs {
  font-family: var(--fs-font);
  color: var(--fs-text);
  background: var(--fs-bg);
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  font-size: 15px;
  line-height: 1.5;
}
.bhfs *, .bhfs *::before, .bhfs *::after { box-sizing: border-box; }
.bhfs h1, .bhfs h2, .bhfs h3, .bhfs h4 {
  font-family: var(--fs-head);
  font-weight: 500;
  margin: 0;
  color: var(--fs-text);
}

/* ── Primitives ─────────────────────────────────────────────── */
.bhfs-btn {
  font-family: var(--fs-head);
  font-size: 14px;
  font-weight: 500;
  border: 0;
  border-radius: var(--fs-radius);
  padding: 9px 18px;
  cursor: default;
  color: #fff;
  background: var(--fs-primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.bhfs-btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.bhfs-btn--ghost {
  background: transparent;
  border: 1px solid var(--fs-border);
  color: var(--fs-primary);
}
.bhfs-btn--outline {
  background: var(--fs-bg);
  border: 1px solid var(--fs-primary);
  color: var(--fs-primary);
}
.bhfs-btn--link { background: transparent; color: var(--fs-muted); padding: 9px 12px; }
.bhfs-btn--danger { background: transparent; border: 1px solid #E63757; color: #E63757; }
.bhfs-btn--discord { background: var(--fs-discord); border-radius: 10px; padding: 11px 20px; }

.bhfs-input, .bhfs-select, .bhfs-textarea {
  width: 100%;
  background: var(--fs-panel-2);
  border: 1px solid var(--fs-border);
  border-radius: var(--fs-radius);
  color: var(--fs-text);
  font-family: var(--fs-font);
  font-size: 14px;
  padding: 9px 12px;
}
.bhfs-textarea { resize: none; min-height: 120px; }
.bhfs-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%239DA9BB' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}
.bhfs-label { display: block; font-size: 13px; color: var(--fs-text); margin: 0 0 6px; font-weight: 600; }
.bhfs-hint { font-size: 12px; color: var(--fs-muted); }
.bhfs-req { color: #E06B84; }

.bhfs-card {
  background: var(--fs-panel);
  border: 1px solid var(--fs-border);
  border-radius: 8px;
  padding: 22px 26px;
}

.bhfs-badge {
  display: inline-block;
  font-family: var(--fs-head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 3px 8px;
  border-radius: 5px;
}
.bhfs-badge--scale  { color: #E06B84; background: rgba(224,107,132,0.14); }
.bhfs-badge--single { color: #D99A2B; background: rgba(217,154,43,0.14); }
.bhfs-badge--yesno  { color: #2BB587; background: rgba(43,181,135,0.14); }
.bhfs-badge--text   { color: #3FB6E6; background: rgba(63,182,230,0.14); }
.bhfs-badge--live   { color: var(--fs-green); background: rgba(0,210,122,0.14); }

/* value bars (survey breakdown) */
.bhfs-bar {
  position: relative;
  height: 10px;
  border-radius: 6px;
  background: rgba(52,64,80,0.55);
  overflow: hidden;
}
.bhfs-bar__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--fs-primary);
  border-radius: 6px;
  transition: width 900ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── App chrome (builder / results / bugs) ──────────────────── */
.bhfs-app { display: flex; height: 100%; }
.bhfs-side {
  width: 202px;
  flex: 0 0 202px;
  padding: 20px 14px;
  border-right: 1px solid rgba(52,64,80,0.35);
}
.bhfs-side__brand {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--fs-head); font-weight: 600; font-size: 18px;
  margin: 0 6px 20px;
}
.bhfs-side__logo { width: 22px; height: 22px; border-radius: 6px;
  background: linear-gradient(135deg, #21c07a, #16a34a); display:inline-block; }
.bhfs-side__proj { font-size: 12px; color: var(--fs-muted); margin: 0 6px 6px;
  border-bottom: 1px solid rgba(52,64,80,0.35); padding-bottom: 8px; }
.bhfs-side__nav { list-style: none; margin: 8px 0 0; padding: 0; }
.bhfs-side__nav li {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 8px; border-radius: 6px; font-size: 14px; color: var(--fs-text);
}
.bhfs-side__nav li .bhfs-ico { width: 16px; color: var(--fs-muted); flex: 0 0 16px; }
.bhfs-side__nav li.is-active { color: var(--fs-link); }
.bhfs-side__nav li.is-active .bhfs-ico { color: var(--fs-link); }
.bhfs-side__count { color: var(--fs-muted); }

.bhfs-main { flex: 1 1 auto; padding: 22px 28px; overflow: hidden; }
.bhfs-crumb { font-size: 14px; color: var(--fs-link); margin-bottom: 14px; }
.bhfs-crumb span { color: var(--fs-muted); }
.bhfs-titlebar {
  background: var(--fs-panel); border: 1px solid var(--fs-border); border-radius: 8px;
  padding: 20px 24px; display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.bhfs-titlebar h2 { font-size: 20px; }

/* ── Public page shell (hero / share) ───────────────────────── */
.bhfs-public {
  min-height: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 34px 20px;
  --acc: var(--fs-accent);
}
.bhfs-public.theme-light { background: #F4F6FA; color: #1B2A3D; }
.bhfs-pcard {
  width: 690px;
  max-width: 100%;
  background: var(--fs-panel);
  border-radius: 12px;
  padding: 40px 48px;
}
.theme-light .bhfs-pcard { background: #fff; box-shadow: 0 12px 40px rgba(20,30,50,0.12); }
.bhfs-pcard__logo {
  display: flex; align-items: center; gap: 10px;
  height: 30px; margin-bottom: 20px;
  font-family: var(--fs-head); font-weight: 600; font-size: 13px; letter-spacing: 0.12em;
  color: var(--acc);
}
.bhfs-pcard__mark {
  width: 28px; height: 28px; border-radius: 8px; flex: 0 0 28px;
  background: var(--acc); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; letter-spacing: 0; font-weight: 700;
  overflow: hidden;
}
.bhfs-pcard__mark--img { background: transparent; }
.bhfs-pcard__mark--img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bhfs-pcard h1 { font-size: 27px; margin-bottom: 12px; }
.bhfs-pcard__intro { color: var(--fs-muted); margin: 0 0 26px; }
.theme-light .bhfs-pcard__intro { color: #5a6b80; }
.bhfs-field { margin-bottom: 22px; }
.bhfs-drop {
  border: 1.5px dashed var(--fs-border); border-radius: 8px;
  padding: 26px; text-align: center; color: var(--fs-muted); font-size: 14px;
}
.bhfs-drop svg { width: 26px; height: 26px; opacity: 0.7; display: block; margin: 0 auto 8px; }
.bhfs-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.bhfs-files:empty { display: none; }
.bhfs-file {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px 6px 8px;
  background: var(--fs-panel-2); border: 1px solid var(--fs-border); border-radius: 6px;
  font-size: 13px; color: var(--fs-text);
}
.bhfs-file__ico { width: 18px; height: 18px; display: inline-flex; color: var(--fs-muted); }
.bhfs-file__ico svg { width: 18px; height: 18px; }
.bhfs-file__ico--image { color: #3FB6E6; }
.bhfs-file__ico--video { color: #E06B84; }
.bhfs-file__ico--log   { color: #D99A2B; }
.bhfs-file__size { color: var(--fs-muted); font-size: 12px; }
.bhfs-file__x { color: var(--fs-muted); margin-left: 2px; font-size: 15px; line-height: 1; }
.bhfs-contact { text-align: center; margin: 24px 0 10px; }
.bhfs-contact__or { color: var(--fs-muted); font-size: 12px; letter-spacing: 0.08em; margin: 12px 0; }
.bhfs-pcard__submit { text-align: right; margin-top: 8px; }
.bhfs-pcard__submit .bhfs-btn { background: var(--acc); }
.bhfs-poweredby { text-align: center; color: var(--fs-muted); font-size: 12px; margin-top: 28px; opacity: 0.75; }

/* public survey page (numbered questions) */
.bhfs-svy__as { font-size: 12.5px; color: var(--fs-muted); margin: -10px 0 20px; }
.bhfs-svy__as strong { color: var(--fs-text); font-weight: 600; }
.bhfs-svy__as span { color: var(--acc); }
.bhfs-svy__q { margin-bottom: 22px; }
.bhfs-svy__q h2 { font-size: 19px; font-weight: 500; margin-bottom: 4px; }
.bhfs-svy__q p { margin: 0 0 10px; color: var(--fs-text); font-size: 15px; }
.bhfs-svy__scale { display: flex; gap: 24px; }
.bhfs-svy__opts { display: flex; flex-direction: column; gap: 9px; }
.bhfs-radio { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; color: var(--fs-text); }
.bhfs-radio__dot {
  width: 16px; height: 16px; border-radius: 50%; flex: 0 0 16px;
  border: 1.5px solid var(--fs-border); position: relative;
}
.bhfs-radio.is-on .bhfs-radio__dot { border-color: var(--acc); }
.bhfs-radio.is-on .bhfs-radio__dot::after {
  content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--acc);
}

/* compact public page (hero): inline rows + contact chip */
.bhfs-line { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.bhfs-line__label { margin: 0; flex: 0 0 110px; }
.bhfs-files--inline { margin-top: 0; }
.bhfs-file--add { border-style: dashed; color: var(--fs-muted); background: transparent; }
.bhfs-cchip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 10px; border-radius: 999px;
  background: var(--fs-panel-2); border: 1px solid var(--fs-border);
  font-size: 13.5px; color: var(--fs-text);
}
.bhfs-cchip svg { width: 16px; height: 16px; flex: 0 0 16px; }
.bhfs-cchip--discord { background: var(--fs-discord); border-color: var(--fs-discord); color: #fff; }
.bhfs-cchip--ghost { background: transparent; border-style: dashed; color: var(--fs-muted); }
.theme-light .bhfs-cchip { background: #F4F6FA; border-color: #D4DBE6; color: #1B2A3D; }
.theme-light .bhfs-cchip--discord { background: var(--fs-discord); border-color: var(--fs-discord); color: #fff; }
.theme-light .bhfs-cchip--ghost { background: transparent; color: #5A6B80; }
.theme-light .bhfs-file--add { background: transparent; }

/* success flash after submit */
.bhfs-success {
  text-align: center; padding: 60px 20px;
}
.bhfs-success__check {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(0,210,122,0.15); color: var(--fs-green);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 18px;
}
.bhfs-success__check svg { width: 32px; height: 32px; }

/* ── Light theme overrides (public pages) ───────────────────── */
.bhfs-public.theme-light { --fs-border: #D4DBE6; }
.theme-light .bhfs-pcard h1 { color: #1B2A3D; }
.theme-light .bhfs-label { color: #1B2A3D; }
.theme-light .bhfs-hint { color: #5A6B80; }
.theme-light .bhfs-textarea,
.theme-light .bhfs-input {
  background: #F4F6FA;
  border-color: #D4DBE6;
  color: #1B2A3D;
}
.theme-light .bhfs-textarea[data-answer] { color: #1B2A3D; }
.theme-light .bhfs-drop { border-color: #C7D0DE; color: #5A6B80; }
.theme-light .bhfs-svy__as { color: #5A6B80; }
.theme-light .bhfs-svy__as strong, .theme-light .bhfs-svy__q h2, .theme-light .bhfs-svy__q p, .theme-light .bhfs-radio { color: #1B2A3D; }
.theme-light .bhfs-radio__dot { border-color: #C7D0DE; }
.theme-light .bhfs-file { background: #F4F6FA; border-color: #D4DBE6; color: #1B2A3D; }
.theme-light .bhfs-file__size, .theme-light .bhfs-file__x { color: #8593A6; }
.theme-light .bhfs-contact__or { color: #8593A6; }
.theme-light .bhfs-poweredby { color: #8593A6; }
.theme-light .bhfs-input::placeholder { color: #8593A6; }

/* entrance helper (reuse across scenes) */
.bhfs-enter { opacity: 0; transform: translateY(10px); }
.bhfs-enter.is-in { opacity: 1; transform: none; transition: opacity 500ms ease, transform 500ms cubic-bezier(0.16,1,0.3,1); }
