/* steps/brief.css: the Brief, Savva's pick "Centred composer" (generator-steps/brief opt-1). Scoped to .brief and named
   bf- so no other step's styles reach it. The effort chip and its stepped slider follow the first page's chat bar
   (generator-home/chatbar.css), sized to sit in this composer's bar. */
/* 672 = the option's 720 column less its 24px sides */
.view.brief { max-width: 672px; gap: 18px; margin-top: max(0px, calc(22vh - 36px)); }
.brief h1 { text-align: center; font-size: 26px; margin-bottom: 4px; }
.brief button { cursor: pointer; }
.brief svg { display: block; }

/* the composer; 16 = 10 + 6: it nests the 10px attachment chips 6px inside */
.bf-comp { position: relative; background: rgba(255,255,255,.05); border-radius: 16px; padding: 6px; transition: background-color .15s, box-shadow .15s; }
.bf-comp:focus-within { box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.bf-comp.over { background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.28); }
.bf-input { display: block; width: 100%; min-height: 96px; max-height: 260px; background: none; border: 0; outline: none; resize: none; color: #fff; font: 400 15px/1.55 var(--font); padding: 10px 12px 4px; scrollbar-width: none; }
.bf-input::-webkit-scrollbar { display: none; }
.bf-input::placeholder { color: rgba(255,255,255,.4); }
.bf-input:read-only { color: var(--ink-70); }

/* attachments: what the server read, on a 36px chip; a screenshot shows itself, 10 = its 26px thumb's 5 + 5 */
.bf-att { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 6px 0; }
.bf-att:empty { display: none; }
.bf-a { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 4px 0 10px; border-radius: 10px; background: rgba(255,255,255,.06); max-width: 100%; animation: bf-in .3s var(--ease-kit) both; }
/* the hovered chip lifts, so its tooltip sits over the chips after it */
.bf-a { position: relative; } .bf-a:hover { z-index: 3; }
.bf-a.th { padding-left: 5px; }
.bf-a > svg { color: var(--ink-85); }
.bf-th { width: 26px; height: 26px; flex: none; border-radius: 5px; object-fit: cover; object-position: top left; background: rgba(255,255,255,.06); display: block; }
.bf-an { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.bf-an b { font-weight: 400; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bf-an i { font-style: normal; font-size: 11px; color: rgba(255,255,255,.55); white-space: nowrap; font-variant-numeric: tabular-nums; }
/* still being read: the words shimmer, as on the first page */
.bf-an i.busy { background: linear-gradient(90deg, rgba(255,255,255,.35) 0 35%, rgba(255,255,255,.95) 50%, rgba(255,255,255,.35) 65% 100%) 0 0 / 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: bf-shimmer 1.6s linear infinite; }
.bf-a.err { padding-top: 5px; padding-bottom: 5px; }
.bf-a.err .bf-an { flex-wrap: wrap; row-gap: 0; }
.bf-a.err .bf-an i { color: #f0a0a0; white-space: normal; }
.bf-a .ib { width: 26px; height: 26px; flex: none; }
@keyframes bf-in { from { opacity: 0; transform: translateY(4px) scale(.97); } }
@keyframes bf-shimmer { from { background-position: 100% 0; } to { background-position: -150% 0; } }

/* a link: a Google Sheet or a dashboard to redesign */
.bf-link { display: flex; gap: 6px; padding: 0 6px 6px; }
.bf-link[hidden] { display: none; }
.bf-link input { flex: 1; min-width: 0; height: 34px; border-radius: 999px; border: 0; background: rgba(255,255,255,.06); color: #fff; font: inherit; padding: 0 14px; outline: none; }
.bf-link input::placeholder { color: rgba(255,255,255,.4); }
.bf-link input:focus { box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }

/* the bar under the words: add data, effort, continue */
.bf-bar { position: relative; display: flex; align-items: center; gap: 4px; padding: 4px; }
.brief kbd { font: 500 10.5px var(--font); color: rgba(255,255,255,.55); background: rgba(255,255,255,.06); border-radius: 4px; padding: 1px 5px; margin: 0 4px; }
.bf-send { width: 34px; height: 34px; flex: none; border-radius: 999px; border: 0; background: rgba(255,255,255,.92); color: #000; box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 rgba(0,0,0,.16); display: grid; place-items: center; transition: background-color .15s, scale .15s; }
.bf-send:hover { background: #fff; }
.bf-send:active { scale: .95; }
.bf-send:disabled { background: rgba(255,255,255,.08); box-shadow: none; color: rgba(255,255,255,.4); pointer-events: none; }
.brief .ib:disabled { opacity: .4; pointer-events: none; }
/* focus sits on the control's own edge, never an outline with a gap */
.brief button:focus-visible, .bf-track:focus-visible { outline: none; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.6); }

/* the + menu; 12 = its 8px rows + 4 */
.bf-menu { position: absolute; left: 4px; bottom: calc(100% + 4px); min-width: 240px; width: max-content; background: #161616; border-radius: 12px; padding: 4px; box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 16px 40px rgba(0,0,0,.6); z-index: 5; animation: bf-in .18s var(--ease-kit); }
.bf-menu[hidden] { display: none; }
.bf-menu button { width: 100%; height: 36px; display: flex; align-items: center; gap: 10px; padding: 0 10px; border: 0; background: none; border-radius: 8px; color: var(--ink-85); text-align: left; white-space: nowrap; }
.bf-menu button:hover, .bf-menu button:focus-visible { background: rgba(255,255,255,.06); color: #fff; box-shadow: none; }
.bf-menu .label { margin-left: auto; }

/* effort: the level's icon and name, quiet at rest, the thumb when open */
.bf-chip { height: 32px; flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 10px 0 11px; border: 0; border-radius: 999px; background: none; color: var(--ink-85); transition: background-color .25s, min-width .35s var(--ease), color .2s; min-width: 0; }
.bf-chip:hover { background: rgba(255,255,255,.06); color: #fff; }
.bf-chip-i { display: grid; place-items: center; color: var(--accent); }
.bf-chip > svg:last-child { color: rgba(255,255,255,.45); }
.bf-chip.on { min-width: 150px; background: rgba(255,255,255,.08); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.bf-chip:disabled { opacity: .4; pointer-events: none; }
/* the stepped slider opens downward over the examples, so it never covers the words.
   Corners: the 28px knob (14) sits 0 inside the track; the panel's 16 = its 10 + 6 */
.bf-eff { position: absolute; top: calc(100% + 2px); width: 280px; padding: 10px 12px 12px; border-radius: 16px; background: rgba(28,29,31,.98); box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 18px 50px rgba(0,0,0,.55); transform-origin: top right; animation: bf-drop .2s var(--ease-kit); z-index: 40; cursor: default; }
.bf-eff[hidden] { display: none; }
@keyframes bf-drop { from { opacity: 0; transform: translateY(-6px) scale(.97); } }
.bf-eff-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 12px; color: rgba(255,255,255,.55); }
.bf-eff-cr { color: #fff; font-weight: 500; font-variant-numeric: tabular-nums; cursor: help; }
.bf-track { --p: .667; position: relative; height: 28px; border-radius: 999px; background: rgba(0,0,0,.35); box-shadow: inset 0 1px 2px rgba(0,0,0,.4); cursor: pointer; touch-action: none; }
.bf-track i { position: absolute; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: rgba(255,255,255,.45); }
.bf-fill { position: absolute; left: 0; top: 0; bottom: 0; width: calc(28px + (100% - 28px) * var(--p)); border-radius: 999px; background: var(--accent); transition: width .35s var(--ease); }
.bf-knob { position: absolute; top: 0; left: calc((100% - 28px) * var(--p)); width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.4), inset 0 -1px 0 rgba(0,0,0,.12); transition: left .35s var(--ease); }
.bf-track.drag .bf-fill, .bf-track.drag .bf-knob { transition: none; }
.bf-eff-l { display: flex; justify-content: space-between; margin-top: 6px; }
.bf-eff-l button { border: 0; background: none; padding: 2px 0; font-size: 11.5px; color: rgba(255,255,255,.45); transition: color .2s; }
.bf-eff-l button:hover { color: rgba(255,255,255,.8); }
.bf-eff-l button.on { color: #fff; }
.bf-eff-why { margin: 8px 0 0; font-size: 12px; line-height: 1.4; color: rgba(255,255,255,.75); }
.bf-eff-n { margin: 4px 0 0; font-size: 11.5px; line-height: 1.4; color: rgba(255,255,255,.45); }
.bf-eff-n:empty { display: none; }

/* the example briefs */
.bf-ex { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.bf-ex button { height: 32px; padding: 0 12px; border-radius: 999px; border: 0; background: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); color: var(--ink-70); display: inline-flex; align-items: center; gap: 6px; transition: background-color .15s, color .15s; }
.bf-ex button:hover { background: rgba(255,255,255,.05); color: #fff; }
.bf-ex button.on { background: rgba(255,255,255,.08); box-shadow: none; color: #fff; }
.bf-ex button:disabled { opacity: .4; pointer-events: none; }

/* the reading line while the intake works */
.bf-status { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 20px; color: var(--ink-70); }
.bf-status .err { text-align: center; }
/* the Iris: the ssych mark as the small loader */
.bf-iris { height: 14px; width: 11.5px; overflow: visible; }
.bf-iris circle { animation: bf-iris 2.2s cubic-bezier(.65,0,.35,1) infinite; }
@keyframes bf-iris { 0% { r: 0; opacity: 1; } 60%, 85% { r: 420px; opacity: 1; } 100% { r: 420px; opacity: 0; } }

/* tooltips: one, ours; never a native title over it */
.brief [data-tip] { position: relative; }
.brief [data-tip]:hover::after, .brief [data-tip]:focus-visible::after { content: attr(data-tip); position: absolute; left: 50%; top: calc(100% + 6px); translate: -50% 0; white-space: nowrap; pointer-events: none; z-index: 20;
  background: rgba(24,24,24,.86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--ink-85); font: 400 11px/1 var(--font); padding: 6px 8px; border-radius: 6px; box-shadow: 0 0 0 1px rgba(255,255,255,.06); }
.brief [data-tip-wide]:hover::after { left: 0; translate: none; white-space: normal; width: max-content; max-width: 260px; line-height: 1.45; text-align: left; background: rgba(24,24,24,.97); }
.brief [data-tip-end]:hover::after { left: auto; right: 0; }
.brief .bf-an[data-tip]:hover::after { top: calc(100% + 12px); }
.brief :disabled[data-tip]::after, .brief [aria-expanded="true"][data-tip]::after { display: none; }

@media (max-width: 720px) {
  main[data-step="brief"] { padding: 36px 16px 32px; }
  .view.brief { margin-top: 0; gap: 14px; }
  .brief h1 { font-size: 22px; text-align: left; }
  .bf-input { min-height: 120px; }
  .brief kbd { display: none; }
  .bf-ex, .bf-status { justify-content: flex-start; }
  .bf-status .err { text-align: left; }
  .bf-chip.on { min-width: 120px; }
  .bf-eff { width: min(280px, calc(100vw - 48px)); }
}
@media (prefers-reduced-motion: reduce) {
  .brief *, .brief *::before, .brief *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .bf-iris circle { animation: none; r: 0; }
}
