/* ══ A tool's steps as a conversation (EMSGuide, assets/js/ems-guide-chat.js) ══
   Tyler 11-08: "almost like talking to an AI ... going back and forth". Same
   voice as the AI coaches (ems-tools.css .cc-*): the guide is a sparkle on navy
   on the left, the member is navy on the right. What they attach sits on their
   bubble as a file card. Prefix gc-. */
.gc { display: flex; flex-direction: column; gap: 10px; }
.gc-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; }
.gc-log { list-style: none; margin: 0; padding: 4px 2px 6px; display: flex; flex-direction: column; gap: 14px;
  min-height: 160px; max-height: clamp(320px, 54vh, 600px); overflow-y: auto; overscroll-behavior: contain; scroll-padding-bottom: 12px; }
.gc-msg { display: flex; gap: 10px; align-items: flex-start; min-width: 0; margin: 0; }
.gc-msg.is-me { justify-content: flex-end; }
.gc-av { flex: none; width: 30px; height: 30px; margin-top: 2px; border-radius: 10px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(140deg, var(--ems-navy-500), var(--ems-navy-800)); }
.gc-card { flex: 0 1 auto; min-width: 0; max-width: 620px; padding: 12px 15px; border-radius: 6px 18px 18px 18px; background: var(--ems-soft);
  font: 400 15px/1.55 var(--ems-font-body); color: var(--ems-ink); overflow-wrap: anywhere; }
.gc-msg.is-safety .gc-card { background: var(--ems-red-50); box-shadow: inset 3px 0 0 var(--ems-red-500, #BE1E2D); }
.gc-md > :first-child { margin-top: 0; }
.gc-md > :last-child { margin-bottom: 0; }
.gc-md p { margin: 0 0 8px; }
.gc-md ul, .gc-md ol { margin: 4px 0 8px; padding-left: 20px; }
.gc-md strong, .gc-md b { color: var(--ems-navy-800); }

.gc-me { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; max-width: min(80%, 520px); }
.gc-bub { padding: 10px 14px; border-radius: 18px 18px 6px 18px; background: var(--ems-navy-500); color: #fff;
  font: 400 15px/1.5 var(--ems-font-body); overflow-wrap: anywhere; white-space: pre-wrap; box-shadow: 0 8px 18px -14px rgba(22, 32, 99, .9); }
.gc-msg.is-failed .gc-bub, .gc-msg.is-failed .gc-files { opacity: .65; }
.gc-fail { margin: 0; display: inline-flex; align-items: center; gap: 6px; font: 500 13px/1.3 var(--ems-font-ui); color: var(--ems-red-600, #9b1824); }

/* An attachment: a file card, the way a file sits in a chat. */
.gc-files { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.gc-file { display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px 8px 10px; border-radius: 14px; background: var(--ems-surface);
  box-shadow: 0 0 0 1px var(--ems-line-2), 0 6px 14px -12px rgba(22, 32, 99, .7); color: var(--ems-navy-700); max-width: 100%; }
.gc-file > svg { flex: none; width: 32px; height: 32px; padding: 7px; border-radius: 9px; background: var(--ems-navy-50); color: var(--ems-navy-500); box-sizing: border-box; }
.gc-file > span { min-width: 0; display: flex; flex-direction: column; gap: 1px; text-align: left; }
.gc-file b { font: 600 13.5px/1.25 var(--ems-font-ui); color: var(--ems-navy-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.gc-file small { font: 400 12px/1.2 var(--ems-font-ui); color: var(--ems-mute); }
.gc-file-x { flex: none; width: 26px; height: 26px; min-height: 0; padding: 0; margin-left: 2px; border: 0; border-radius: 50%; background: none; color: var(--ems-mute);
  display: grid; place-items: center; cursor: pointer; box-shadow: none; }
.gc-file-x:hover, .gc-file-x:focus-visible { background: var(--ems-soft-2); color: var(--ems-navy-700); outline: none; }

/* Tap-to-answer replies under the guide's latest message. */
.gc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.gc-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--ems-line-2);
  background: var(--ems-surface); color: var(--ems-navy-700); font: 600 13.5px/1.2 var(--ems-font-ui); text-align: left; cursor: pointer;
  transition: border-color var(--ems-dur-fast), background var(--ems-dur-fast), transform var(--ems-dur-fast); }
.gc-chip:hover, .gc-chip:focus-visible { border-color: var(--ems-navy-300); background: var(--ems-navy-50); outline: none; }
.gc-chip:active { transform: translateY(1px); }
.gc-chip.is-att { border-color: var(--ems-navy-500); background: var(--ems-navy-500); color: #fff; }
.gc-chip.is-att:hover, .gc-chip.is-att:focus-visible { background: var(--ems-navy-600); border-color: var(--ems-navy-600); }

/* "I have what I need" + the tool's own Build button, in the thread. */
.gc-ready { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--ems-surface);
  box-shadow: 0 0 0 1.5px var(--ems-good-200, #9fd3b2); }
.gc-ready-ic { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--ems-good-50); color: var(--ems-good); }
.gc-ready > div { flex: 1 1 180px; min-width: 0; }
.gc-ready b { display: block; font: 600 14.5px/1.3 var(--ems-font-ui); color: var(--ems-navy-800); }
.gc-ready small { display: block; margin-top: 2px; font-size: 13px; color: var(--ems-mute); }
.gc-ready .primary { display: inline-flex; align-items: center; gap: 8px; }

.gc-msg.is-typing .gc-card { display: inline-flex; align-items: center; padding: 14px 16px; }
.gc-dots { display: inline-flex; gap: 4px; }
.gc-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--ems-navy-400); animation: gc-dot 1.1s ease-in-out infinite; }
.gc-dots i:nth-child(2) { animation-delay: .15s; }
.gc-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes gc-dot { 0%, 80%, 100% { opacity: .35; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .gc-dots i { animation: none; opacity: .7; } }

/* The composer: Attach · the box · Dictate · Send. */
.gc-dock { display: flex; flex-direction: column; gap: 8px; }
.gc-pend { display: flex; flex-wrap: wrap; gap: 6px; }
.gc-comp { position: relative; display: flex; align-items: flex-end; gap: 6px; padding: 6px; border-radius: 18px; background: var(--ems-surface);
  box-shadow: 0 0 0 1.5px var(--ems-line-2); transition: box-shadow var(--ems-dur-fast); }
.gc-comp:focus-within { box-shadow: 0 0 0 2px var(--ems-navy-400); }
.gc-q { flex: 1; min-width: 0; min-height: 40px; max-height: 180px; margin: 0; padding: 9px 6px; border: 0; background: none; resize: none; box-shadow: none;
  font: 400 15.5px/1.45 var(--ems-font-body); color: var(--ems-ink); }
.gc-q:focus { outline: none; box-shadow: none; }
.gc-ib, .gc-send { flex: none; width: 40px; height: 40px; min-height: 0; padding: 0; border-radius: 12px; display: grid; place-items: center; cursor: pointer; }
.gc-ib { border: 0; background: none; color: var(--ems-mute); box-shadow: none; }
.gc-ib:hover, .gc-ib:focus-visible, .gc-ib[aria-expanded="true"] { background: var(--ems-navy-50); color: var(--ems-navy-600); outline: none; }
.gc-ib.is-on { background: var(--ems-red-50); color: var(--ems-red-500, #BE1E2D); }
.gc-send { border: 0; background: var(--ems-navy-500); color: #fff; box-shadow: none; transition: background var(--ems-dur-fast); }
.gc-send:hover, .gc-send:focus-visible { background: var(--ems-navy-700); outline: none; }
.gc-send:disabled { background: var(--ems-navy-200); cursor: default; }
.gc-att { position: static; }
.gc-menu { position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 20; min-width: 260px; padding: 6px; border-radius: 16px; background: var(--ems-surface);
  box-shadow: var(--ems-pop), 0 0 0 1px var(--ems-line); display: flex; flex-direction: column; gap: 2px; }
.gc-menu[hidden] { display: none; }
.gc-menu button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 0; padding: 9px 10px; border: 0; border-radius: 11px; background: none;
  box-shadow: none; text-align: left; cursor: pointer; color: var(--ems-navy-700); }
.gc-menu button > svg { flex: none; width: 34px; height: 34px; padding: 8px; border-radius: 10px; background: var(--ems-navy-50); color: var(--ems-navy-500); box-sizing: border-box; }
.gc-menu button span { display: flex; flex-direction: column; gap: 1px; }
.gc-menu b { font: 600 14px/1.25 var(--ems-font-ui); color: var(--ems-navy-800); }
.gc-menu small { font: 400 12.5px/1.3 var(--ems-font-ui); color: var(--ems-mute); }
.gc-menu button:hover, .gc-menu button:focus-visible { background: var(--ems-soft); outline: none; }

/* The résumé pop-up: every résumé they have as paper (EMSKit.pickResume). */
.gc-modal .modal { width: min(760px, calc(100vw - 32px)); max-width: none; }
.gc-rp { padding: 4px 2px 6px; }

@media (max-width: 640px) {
  .gc-log { max-height: 62vh; }
  .gc-me { max-width: 88%; }
  .gc-menu { min-width: 0; right: 0; }
}
