/* G29: compact "How can I help you?" bar (Views/Shared/_AskBar.cshtml) for the organization console and the Program Team shell.
   Sizes come from the shared type scale (wwwroot/css/type-scale.css, loaded by every layout); 44px targets on phones.
   Works down to 320px: on narrow screens the bar takes its own row in the header. */
.askc { position: relative; flex: 1 1 220px; min-width: 0; max-width: 460px; font-size: var(--ts-control, .9375rem); line-height: 1.4; }
.askc-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.askc-field { position: relative; display: flex; align-items: center; width: 100%; }
.askc-ico { position: absolute; left: 10px; width: 18px; height: 18px; color: #4b5565; pointer-events: none; }
.askc .askc-input {
  width: 100%; max-width: none; min-height: var(--ts-ctl-h, 2.5rem); margin: 0;
  padding: .375rem 2.5rem .375rem 2.125rem;
  font: inherit; font-size: var(--ts-control, .9375rem); color: #1d2433;
  background: #fff; border: 1px solid #7a8496; border-radius: 6px; box-shadow: none;
}
.askc .askc-input::placeholder { color: #5b6472; opacity: 1; }
.askc .askc-input:focus { outline: 3px solid #1d4ed8; outline-offset: 1px; border-color: #1d4ed8; }
.askc-clear {
  position: absolute; right: 2px; display: grid; place-items: center; width: 36px; height: 36px;
  padding: 0; border: 0; border-radius: 50%; background: none; color: #4b5565; cursor: pointer;
}
.askc-clear svg { width: 16px; height: 16px; }
.askc-clear:hover { background: #eef1f6; color: #1d2433; }
.askc-clear:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 0; }
.askc-clear[hidden] { display: none; }
.askc-pop {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 1065; min-width: 260px;
  padding: 4px; max-height: min(60vh, 420px); overflow: auto;
  background: #fff; border: 1px solid #c9ced8; border-radius: 8px; box-shadow: 0 12px 32px rgba(16, 24, 40, .18);
}
.askc-pop[hidden] { display: none; }
.askc-list { list-style: none; margin: 0; padding: 0; }
.askc .ask-opt { display: grid; gap: 1px; min-height: 44px; padding: .4375rem .75rem; border-radius: 6px; cursor: pointer; text-align: left; }
.askc .ask-opt-title { font-size: var(--ts-body, .9375rem); font-weight: 600; color: #15243a; overflow-wrap: anywhere; }
.askc .ask-opt-line { font-size: var(--ts-small, .8125rem); color: #4b5565; }
.askc .ask-opt:hover, .askc .ask-opt[aria-selected="true"] { background: #eaf0ff; box-shadow: inset 3px 0 0 #1d4ed8; }
.askc .ask-opt-fallback { border-top: 1px solid #e3e7ee; border-radius: 0 0 6px 6px; }
.askc .ask-opt-fallback .ask-opt-title { font-weight: 400; color: #1d2433; }
.askc .ask-opt-fallback:only-child { border-top: 0; }

/* Organization console header (nwa-g3.css .topbar): the bar sits between the menu button and the tools. */
.organization-shell .topbar > .askc { margin: 0 12px; }

/* Program Team header: next to the menu button; a fixed width on desktop, where the header floats at the top right. */
.program-team-topbar .askc { flex: 1 1 220px; margin-right: 12px; }
@media (min-width: 992px) {
  .program-team-topbar .askc { flex: 0 0 auto; width: clamp(220px, 22vw, 320px); }
  .program-team-topbar .askc-pop { left: auto; right: 0; width: min(420px, 90vw); }
}

@media (max-width: 767.98px) {
  .askc { max-width: none; }
  .organization-shell .topbar { flex-wrap: wrap; row-gap: 8px; padding-top: 8px; padding-bottom: 8px; }
  .organization-shell .topbar > .askc { order: 3; flex: 1 1 100%; margin: 0; }
  .program-team-topbar .askc { order: 3; flex: 1 1 100%; margin: 6px 0 0; }
  .askc-pop { min-width: 0; }
}

@media (forced-colors: active) {
  .askc .ask-opt[aria-selected="true"] { outline: 2px solid Highlight; }
}

/* G35: layouts that had no bar (member v1, Program Team on _LayoutJobProviders and the ElevanceHealth _Layout). The bar sits in its
   own slim row under the header. Under 992 px only an icon button ("Ask how to…") shows; it opens the field over the page top. */
.askc-strip { display: flex; justify-content: flex-end; padding: 6px 16px; background: #fff; border-bottom: 1px solid #e3e7ee; }
.askc-strip .askc { flex: 0 1 420px; }
.askc-toggle {
  display: none; place-items: center; width: 44px; height: 44px; padding: 0; margin: 0;
  border: 1px solid #7a8496; border-radius: 6px; background: #fff; color: #1d2433; cursor: pointer;
}
.askc-toggle svg { width: 20px; height: 20px; }
.askc-toggle:hover { background: #eef1f6; }
.askc-toggle:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }
@media (max-width: 991.98px) {
  .askc--collapse { flex: 0 0 auto; width: auto; max-width: none; }
  .askc--collapse .askc-toggle { display: grid; }
  .askc--collapse .askc-field { display: none; }
  /* Open: the field sits over the top of the page, edge to edge with an 8px gutter (fixed, so no header can clip it). */
  .askc--collapse.askc--open .askc-field {
    display: flex; position: fixed; z-index: 1066; top: 8px; left: 8px; right: 8px; width: auto;
    padding: 6px; background: #fff; border-radius: 8px; box-shadow: 0 12px 32px rgba(16, 24, 40, .25);
  }
  .askc--collapse.askc--open .askc-ico { left: 18px; }
  .askc--collapse.askc--open .askc-pop { position: fixed; z-index: 1066; top: 64px; left: 8px; right: 8px; width: auto; min-width: 0; max-height: calc(100vh - 80px); }
  .askc-strip { padding: 4px 8px; }
}
@media (min-width: 992px) {
  .askc--collapse .askc-pop { left: auto; right: 0; width: min(420px, 90vw); }
}

/* G43: voice input. The mic button is added by ask-bar.js only where the browser has the Web Speech API. 44px target, 1rem input
   text, and the clear button steps left of the mic. The ring pulses only when motion is allowed. */
.askc .askc-input { font-size: 1rem; min-height: max(2.75rem, var(--ts-ctl-h, 2.5rem)); }
.askc-field.has-mic .askc-input { padding-right: 3rem; }
.askc-field.has-mic.has-text .askc-input { padding-right: 5.5rem; }
.askc-mic {
  position: absolute; right: 0; top: 0; bottom: 0; display: grid; place-items: center; width: 44px; min-height: 44px; padding: 0; margin: 0;
  border: 0; border-radius: 0 6px 6px 0; background: none; color: #1d4ed8; cursor: pointer;
}
.askc-mic .icon { width: 20px; height: 20px; }
.askc-mic:hover { background: #eef1f6; }
.askc-mic:focus-visible { outline: 3px solid #1d4ed8; outline-offset: -3px; }
.askc-mic[aria-pressed="true"] { background: #fdecec; color: #b42318; box-shadow: 0 0 0 3px rgba(180, 35, 24, .35); }
.askc-field.has-mic .askc-clear { right: 44px; width: 44px; height: 44px; top: 0; border-radius: 0; }
.askc-voice-msg { margin-top: 4px; font-size: var(--ts-meta, .875rem); color: #7a2b0e; }
.askc-voice-msg[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .askc-mic[aria-pressed="true"] { animation: askc-pulse 1.2s ease-out infinite; }
  @keyframes askc-pulse { 0% { box-shadow: 0 0 0 0 rgba(180, 35, 24, .45); } 100% { box-shadow: 0 0 0 10px rgba(180, 35, 24, 0); } }
}
@media (forced-colors: active) {
  .askc-mic[aria-pressed="true"] { outline: 3px solid Highlight; }
}

/* G43: the strip is the full "How can I help you?" bar directly under the header on every layout (no icon-only collapse),
   aligned to the 1140px page container; the field fills the row. */
.askc-strip { display: block; padding: 8px 0; }
.askc-strip-inner { max-width: 1140px; margin: 0 auto; padding: 0 12px; }
.askc-strip .askc { flex: none; width: 100%; max-width: none; }
.askc-strip .askc-pop { left: 0; right: 0; width: auto; }
@media (max-width: 991.98px) { .askc-strip { padding: 6px 0; } }
