/* The quiet fills of Starling's controls (apps/app/shared/ui.css). */
.hc-ask {
  --fill: rgba(15, 14, 18, 0.05);
  --fill-strong: rgba(15, 14, 18, 0.09);
}

/* ── Starling's box ───────────────────────────────────────────────────────────────────────────────────────────────
   The product's own box (apps/app/workspace/StarlingComposer.tsx, docs/design-system/starling.md "Starling's box on
   its page"), drawn here as it is there: 26px round, its words 16px, a row of filled shapes 36px tall, each pressing at
   44px and standing as far from the bottom as from its side (15px), the words 19px in, the caret in Starling's blue.
   On the website's white page it is white with the glass's own shadow, so it reads as a box to write in. What can be
   brought opens from the box's attach control; the one ink press sends. */
.hc-ask {
  display: grid;
  gap: var(--space-3);
  width: min(100%, 560px);
}
.hc-box {
  position: relative;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  min-height: 125px;
  margin: 0;
  padding: 15px 15px 15px 19px;
  border-radius: 26px;
  background: var(--white);
  box-shadow:
    0 0 0 1px var(--hair),
    var(--lg-glass-shadow);
  caret-color: var(--ai-mark);
  transition: box-shadow 0.15s var(--ease);
}
.hc-box:focus-within {
  box-shadow: var(--lg-focus);
}
@media (forced-colors: active) {
  .hc-box:focus-within {
    outline: 2px solid Highlight;
    outline-offset: 2px;
  }
}
.hc-box.is-dragging {
  box-shadow:
    0 0 0 2px var(--accent),
    var(--lg-glass-shadow);
}
.hc-field {
  position: relative;
  flex: 1;
}
.hc-input,
.hc-demo {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: 0;
}
.hc-input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 50px;
  max-height: 200px;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--ink);
  resize: none;
  field-sizing: content;
}
.hc-input:focus {
  outline: none;
  box-shadow: none;
}
.hc-input::placeholder {
  color: var(--muted);
  opacity: 1;
}
/* The request Starling is shown being asked, typed where the visitor's own words go, with the box's caret. */
.hc-demo {
  position: absolute;
  top: 2px;
  right: 0;
  left: 0;
  color: var(--ink);
  pointer-events: none;
}
.hc-demo:empty,
.hc-box:not(.is-demo) .hc-demo {
  display: none;
}
.hc-box.is-demo .hc-input::placeholder {
  color: transparent;
}
.hc-demo::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 20px;
  margin-left: 1px;
  vertical-align: -4px;
  border-radius: 1px;
  background: var(--ai-mark);
  animation: hc-caret 1s steps(1, end) infinite;
}
.hc-box.is-resting .hc-demo::after {
  animation-play-state: paused;
}
@keyframes hc-caret {
  50% {
    opacity: 0;
  }
}
/* Sent: send gives under the finger, and the words stay beside the answer being written for them. */
.hc-box:is(.is-sending, .is-sent) .hc-demo::after {
  visibility: hidden;
}
.hc-box.is-sending .hc-go {
  transform: scale(0.92);
}

.hc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  margin-top: 10px;
}
/* A quiet plus opens the native picker, as on Starling’s page. Its 36px shape presses at 44px. */
.hc-attach {
  position: relative;
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  margin-left: -4px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--fill);
  color: var(--ink);
  font: 500 13px / 1 var(--sans);
  cursor: pointer;
  transition:
    background-color 0.15s var(--ease),
    transform 0.5s var(--ease-spring);
}
.hc-attach::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
}
.hc-attach:hover {
  background: var(--fill-strong);
}
.hc-attach:active {
  transform: scale(0.92);
}
.hc-attach:focus-visible,
.hc-go:focus-visible {
  --hc-send-focus: var(--ring-focus);
  outline: none;
  box-shadow: var(--ring-focus);
}
.hc-attach .icon {
  width: 16px;
  height: 16px;
  stroke-width: 1.75;
}
/* Show accepted sources in a single optical-midline slot with smooth vertical rolling transitions and zero dead gap. */
.hc-example {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 36px;
  overflow: hidden;
  color: var(--muted);
  font: 500 13px / 1 var(--sans);
  pointer-events: none;
}
.hc-example > [data-source-kind] {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  transform: translateY(0);
  opacity: 1;
  transition:
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.24s var(--ease);
}
.hc-example > [data-source-kind][hidden] {
  display: none;
}
.hc-example > [data-source-kind][data-slot="entering"] {
  transform: translateY(10px);
  opacity: 0;
  transition: none;
}
.hc-example > [data-source-kind][data-slot="leaving"] {
  transform: translateY(-10px);
  opacity: 0;
  transition:
    transform 0.26s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.2s var(--ease);
}
.hc-example-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
}
.hc-example .icon {
  flex: none;
  width: 16px;
  height: 16px;
  stroke-width: 1.75;
}
/* The one ink press, where the box sends: in words, or as the box's own send disc. */
.hc-go {
  position: relative;
  flex: none;
  min-height: 0;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 15px;
  transition:
    background-color 0.15s,
    transform 0.5s var(--ease-spring);
}
.hc-go::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
}
.hc-go-arrow {
  display: none;
  width: 17px;
  height: 17px;
  stroke-width: 2.2;
}
.hc-box[data-send="disc"] .hc-go {
  width: 36px;
  padding: 0;
  border-radius: 50%;
}
.hc-box[data-send="disc"] .hc-go-words {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.hc-box[data-send="disc"] .hc-go-arrow {
  display: block;
}
.hc-status {
  min-height: 1.4em;
  margin: 0;
  padding-left: 19px;
  font-size: 13px;
  line-height: var(--lh-snug);
  color: var(--accent-text);
}
.hc-status:empty {
  display: none;
}
.hc-fallback {
  display: none;
}
html:not(.js) .hc-ask > .hc-box {
  display: none;
}
html:not(.js) .hc-ask > .hc-fallback {
  display: inline-flex;
  justify-self: start;
}

@media (max-width: 759.98px) {
  /* The phone's box, as on /agent's phone: as tall as its contents, the words 16px in, each button 10px from its edges. */
  .hc-box {
    min-height: 96px;
    padding: 12px 10px 10px 16px;
  }
  .hc-foot {
    gap: 8px;
  }
  .hc-attach,
  .hc-go {
    height: 40px;
  }
  .hc-attach::before {
    inset: -2px -5px;
  }
  .hc-example {
    height: 40px;
  }
  .hc-box[data-send="disc"] .hc-go {
    width: 40px;
  }
  .home .hc-status {
    scroll-margin-bottom: var(--space-2);
  }
  .home #hero .hc-status[data-snap-status] {
    scroll-snap-align: end;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hc-demo::after,
  .hc-example {
    display: none;
  }
  .hc-example > [data-source-kind] {
    transition: none;
  }
}

/* Both desktop and mobile keep the send disc noticeably ready while stepping to full solid ink on focus, hover, or input. */
@media (min-width: 760px) {
  .home .hc-box:hover:not(:focus-within) {
    box-shadow:
      0 0 0 1px var(--hair-strong),
      var(--lg-glass-shadow);
  }
}

@media (forced-colors: active) {
  .hc-box:focus-within,
  .hc-ask :is(.hc-attach, .hc-go):focus-visible {
    outline: 2px solid Highlight;
    outline-offset: 2px;
  }
}
.home .hc-go {
  background: var(--layer-2);
  color: var(--ink);
  box-shadow: var(--hc-send-focus, inset 0 0 0 1px var(--hair-strong));
}
.home .hc-go:hover,
.home .hc-box:focus-within .hc-go,
.home .hc-box:has(.hc-input:not(:placeholder-shown)) .hc-go,
.home .hc-box:has(.hc-demo:not(:empty)) .hc-go,
.home .hc-box.is-sending .hc-go {
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--hc-send-focus, none);
}

/* The shared header keeps its ink action while a teacher's composer uses a tonal send disc. */
.hc-ask[data-page="for-teachers"] .hc-box[data-send="disc"] .hc-go {
  color: var(--ink);
  border-color: transparent;
  background: var(--layer-2);
  box-shadow: inset 0 0 0 1px var(--hair);
}
.hc-ask[data-page="for-teachers"] .hc-box[data-send="disc"] .hc-go:hover,
.hc-ask[data-page="for-teachers"] .hc-box[data-send="disc"] .hc-go:focus-visible {
  box-shadow: var(--ring-focus);
}
