/* AssistantChat (DavidsonHR.Shared.Ui/Assistant) — the PORTAL'S "Virtual HR Manager" card, shared.
   These are the portal's own rules (DavidsonHR.VirtualHrm/wwwroot/app.css: .vhm-head, .vhm-chat,
   .chat-msg, .chat-typing, .vhm-foot) under this component's class names, so the panel looks the same
   in either host. The header and the input are always visible; only the log scrolls, inside the
   card. 360px is the portal's height; a host that wants another size passes a class (asst-tall). */
.asst-card { position: relative; display: flex; flex-direction: column; overflow: hidden; height: 22.5rem; background: #fff;
             border: 1px solid #e3e6ea; border-radius: .75rem; font-family: inherit; }
.asst-card.asst-tall { height: min(35rem, 62vh); min-height: 22.5rem; }
/* For a host that lays the card out in a flex column and wants it to take whatever height is left:
   the card grows and shrinks with its container, and the log scrolls inside it. */
.asst-card.asst-grow { height: auto; flex: 1 1 0; min-height: 0; }
.asst-card.asst-fill { height: 100%; border: 0; border-radius: 0; }

.asst-head { flex: 0 0 auto; background-color: #08203d; color: #fff; padding: .6875rem .875rem; font-weight: 600; font-size: .9375rem; }

/* No padding at the top: a question pins flush to the log's top edge (below). */
.asst-log { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 .875rem .75rem; font-size: .875rem; color: #1f2937; }
.asst-log > .asst-empty, .asst-log > .asst-error { margin-top: .75rem; }
/* THE QUESTION BAR (Steven, 2026-10-06): lightly shaded, the log's full width, and PINNED to the top while its
   own answer scrolls under it - it lives in its question's group (.asst-grp), so the next question pushes it
   away. "You:" says what it is, not the shade alone. A host with wider log padding widens the bar to match. */
.asst-grp { margin-bottom: .25rem; }
/* Out by exactly the log's padding (.875rem), not 14px - where the root size is under 16px (the portal scales it) 14px
   stuck out past the log and gave it a sideways scroll bar (2026-11-06). */
.asst-msg.asst-q { position: sticky; top: 0; z-index: 1; margin: 0 -.875rem .625rem; padding: .5rem .875rem;
                   background: #eef3f8; border-bottom: 1px solid #dbe3ec; }
.asst-log[hidden] { display: none; }
/* The host's cover (the portal's Simon video) fills the same space the conversation does. */
.asst-cover { flex: 1 1 auto; min-height: 0; overflow: hidden; display: flex; }
.asst-cover > * { flex: 1 1 auto; min-width: 0; }
.asst-cover[hidden] { display: none; }
.asst-empty { color: #8a94a6; font-style: italic; }
/* THE ASSISTANT'S FACE AND NAME over each answer (2026-11-06) - only when the host gives an AssistantAvatar (the portal's
   Simon). The crop is the host's: --asst-avatar-size / --asst-avatar-pos (background-size / -position of the picture). */
.asst-who { display: flex; align-items: center; gap: .6rem; margin-bottom: .35rem; line-height: 1.2; }
.asst-avatar { flex: 0 0 auto; width: 2.5rem; height: 2.5rem; border-radius: 50%; background-color: #fff; background-repeat: no-repeat;
               background-size: var(--asst-avatar-size, cover); background-position: var(--asst-avatar-pos, center); box-shadow: 0 0 0 1px #c9d2dc; }
.asst-who strong { color: #08203d; }
.asst-firm { color: #5a6b7b; font-weight: 400; }
.asst-firm::before { content: "· "; }
.asst-log > .asst-greeting { margin-top: 1.25rem; }
/* The offer to pass it to the team ("Would you like a member of the team to contact you…? If so just reply yes.") - light
   blue, with a blue rule down its left so it stands out by more than its colour (Steven, 2026-11-06) */
.asst-md p.asst-offer { background: #e8f1f7; border-left: 3px solid #005883; border-radius: 4px; padding: .5rem .75rem; color: #0b3550; }
.asst-msg { margin-bottom: .75rem; line-height: 1.45; }
.asst-text { white-space: pre-wrap; overflow-wrap: anywhere; }

/* An answer, formatted (AssistantMarkdown): paragraphs, lists, headings and tables, kept compact to
   suit the card. A wide table scrolls sideways inside the answer rather than stretching the card. */
.asst-md { overflow-wrap: anywhere; }
.asst-md > :first-child { margin-top: 0; }
.asst-md > :last-child { margin-bottom: 0; }
.asst-md p { margin: 0 0 .5rem; }
.asst-md ul, .asst-md ol { margin: 0 0 .5rem; padding-left: 1.375rem; }
.asst-md li { margin: 2px 0; }
/* Headings RELATIVE to the answer's text (Steven, 2026-10-06: they were a fixed 14px, so in the popped-out window,
   where the text is 16px, a heading came out smaller than the words under it). Always a little larger, and bold. */
.asst-md h1, .asst-md h2 { font-size: 1.2em; font-weight: 700; margin: .8em 0 .3em; line-height: 1.3; }
.asst-md h3, .asst-md h4 { font-size: 1.1em; font-weight: 700; margin: .8em 0 .3em; line-height: 1.3; }
.asst-md table { display: block; overflow-x: auto; max-width: 100%; border-collapse: collapse; margin: .25rem 0 .625rem; font-size: .8125rem; }
.asst-md th, .asst-md td { border: 1px solid #d5dae1; padding: .25rem .625rem; text-align: left; vertical-align: top; overflow-wrap: normal; }
.asst-md th { background: #f1f4f8; font-weight: 600; }
.asst-md hr { border: 0; border-top: 1px solid #e3e6ea; margin: .625rem 0; }
.asst-md code { font-family: inherit; }
/* The high-risk paragraph (2026-11-06, AssistantRisk): a quote block, boxed. It opens "High risk for your business." in
   bold, so the words say it as well as the colour. */
.asst-md blockquote { margin: .625rem 0 .5rem; padding: .5rem .75rem; border: 1px solid #f0c9a6; border-left-width: 4px; background: #fff4ea;
                      border-radius: 6px; color: #5c3410; }
.asst-md blockquote p:last-child { margin-bottom: 0; }
/* The draft while it's rewritten with documents (2026-11-06): still readable, greyed - the overlay says why. The
   anchor is the log's first child, sticky and of no height; a sticky top of 50% is half the VISIBLE chat, so the
   overlay sits in the middle of the response box, both ways, wherever it's scrolled. */
.asst-overlay-anchor { position: sticky; top: 50%; height: 0; z-index: 3; }
.asst-overlay { position: absolute; top: 0; left: 0; right: 0; margin: 0 auto; width: fit-content; max-width: calc(100% - 1rem);
                transform: translateY(-50%); text-align: center;
                display: flex; align-items: center; justify-content: center; gap: .5rem; padding: .375rem .875rem;
                background: #fff; border: 1px solid #c9d2dc; border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,.15);
                color: #1f2937; font-size: .8125rem; }
.asst-revising { opacity: .55; transition: opacity .2s; }
@media (prefers-reduced-motion: reduce) { .asst-revising { transition: none; } }
.asst-thinking { color: #5a6b7b; font-style: italic; font-size: .8125rem; margin-bottom: .625rem; display: flex; align-items: center; gap: .5rem; }
/* The spinner beside "thinking…" / "checking the latest official guidance…" (2026-10-06): motion, not colour,
   says it's working. Stilled for anyone who has asked their system for less motion - the words still say it. */
.asst-spin { flex: 0 0 auto; width: .875rem; height: .875rem; border-radius: 50%; border: 2px solid #c9d2dc; border-top-color: #005883;
             animation: asst-spin .8s linear infinite; }
@keyframes asst-spin { to { transform: rotate(360deg); } }
/* While it searches official sites: a globe that keeps turning (2026-10-06). */
.asst-globe { flex: 0 0 auto; width: 1rem; height: 1rem; fill: none; stroke: #005883; stroke-width: 1.7; stroke-linecap: round;
              animation: asst-spin 1.6s linear infinite; }
@media (prefers-reduced-motion: reduce) { .asst-spin, .asst-globe { animation: none; } }
.asst-error { color: #b32121; font-size: .8125rem; margin-bottom: .625rem; }
.asst-error::before { content: "Error: "; font-weight: 700; }

/* "open a case" inside an answer: a link, or a button that looks like one. Underlined always —
   colour alone must not be what marks it. */
.asst-link { display: inline; padding: 0; border: 0; background: none; font: inherit; color: #005883; text-decoration: underline; cursor: pointer; }
.asst-link:hover { color: #0C7BB8; }

/* Sources, as the portal lists them: the word, then a document icon beside each name. */
.asst-sources { margin-top: .5rem; display: flex; flex-direction: column; gap: .25rem; align-items: flex-start; }
.asst-source { display: inline-flex; align-items: center; gap: .375rem; color: #005883; text-decoration: none; }
a.asst-source:hover span { text-decoration: underline; }
/* A source that opens the document preview (2026-10-13): a button that looks exactly like the link it was. */
button.asst-source { background: none; border: 0; padding: 0; font: inherit; text-align: left; cursor: pointer; }
button.asst-source:hover span, button.asst-source:focus-visible span { text-decoration: underline; }
button.asst-source:focus-visible { outline: 2px solid #005883; outline-offset: 2px; border-radius: 2px; }
span.asst-source { color: #1f2937; }
.asst-doc { width: 1.125rem; height: 1.125rem; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
/* Grouped by library folder (2026-11-06): the folder's name over its documents, which sit a little in. */
.asst-source-group { display: flex; align-items: center; gap: .375rem; margin-top: .25rem; font-size: .8125rem; font-weight: 700; color: #4b5566; }
.asst-folder { width: 1rem; height: 1rem; flex: 0 0 auto; fill: none; stroke: #b07d1e; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.asst-source-group ~ .asst-source-row { padding-left: 1.125rem; }
/* A document cited inside an answer (2026-11-06): the sources' colour, no icon, no underline until hovered (Steven). */
.asst-inline-doc { color: #005883; text-decoration: none; white-space: normal; }
.asst-inline-doc:hover span, .asst-inline-doc:focus-visible span { text-decoration: underline; }
.asst-inline-doc:focus-visible { outline: 2px solid #005883; outline-offset: 2px; border-radius: 2px; }

/* The tester's "why this document?" (ShowDetail only): an (i) beside the source — hover for the gist,
   click to open the entries that were used, in full, under it. Never shown to a client. */
.asst-source-row { display: flex; align-items: center; gap: .5rem; }
/* Small, so it reads as a footnote mark beside the name rather than a second button (Steven,
   2026-09-17: "make info buttons smaller"). The hit area is padded back out for a finger. */
.asst-why { flex: 0 0 auto; width: .875rem; height: .875rem; padding: 0; border: 1px solid #005883; border-radius: 50%; background: #fff; color: #005883;
            font: italic 700 .5938rem/1 Georgia, "Times New Roman", serif; cursor: help; position: relative; }
.asst-why::after { content: ""; position: absolute; inset: -6px; }
.asst-why:hover, .asst-why[aria-expanded="true"] { background: #005883; color: #fff; }
.asst-why-body { align-self: stretch; margin: 2px 0 .375rem 1.5rem; padding: .5rem .625rem; border: 1px dashed #c8d0dc; border-radius: .375rem; background: #f8fafc; font-size: .7812rem; line-height: 1.4; }
.asst-why-entry + .asst-why-entry { margin-top: .5rem; padding-top: .5rem; border-top: 1px solid #e3e6ea; }
.asst-why-label { font-weight: 700; color: #08203d; }
/* What a CLIENT sees behind the (i): the section heading, and the document's own words. */
.asst-why-section { font-weight: 700; color: #08203d; }
.asst-why-quote { margin: .1875rem 0 0; padding: 2px 0 2px .625rem; border-left: .1875rem solid #005883; border-radius: 0; font-style: italic; color: #1f2937; }
.asst-why-quote::before { content: "\201C"; }
.asst-why-quote::after { content: "\201D"; }
.asst-why-none { color: #6b7280; font-style: italic; }
.asst-why-q { font-weight: 600; margin-top: 2px; }
.asst-why-a { color: #374151; white-space: pre-wrap; }

/* The tester's footnote (ShowDetail). Never shown to a client. */
.asst-detail { margin-top: .375rem; padding-top: .3125rem; border-top: 1px dashed #d5dae3; font-size: .75rem; color: #6b7280; }

.asst-foot { flex: 0 0 auto; display: flex; border-top: 1px solid #e3e6ea; }
.asst-foot input { flex: 1; border: none; padding: .75rem .875rem; font-size: .875rem; min-width: 0; font-family: inherit; background: #fff; }
.asst-foot button { border: none; padding: .75rem 1.125rem; background-color: #005883; color: #fff; cursor: pointer; font-weight: 600; font-family: inherit; font-size: .875rem; }
.asst-foot button:hover:not(:disabled) { background-color: #0C7BB8; }
.asst-foot button:disabled { opacity: .6; cursor: default; }
.asst-foot input:focus, .asst-foot button:focus { outline: none; }
.asst-foot input:focus-visible { box-shadow: inset 0 -2px 0 #005883; }

/* A host's icon button at the right of Send (FootEnd - the portal's pop out / pop back in, Steven 2026-10-06):
   a blue icon on white, set off from Send by a rule. Icon only, so it says what it does on hover or keyboard
   focus (.asst-pop-tip), and to a screen reader through its aria-label. */
.asst-foot .asst-pop { position: relative; flex: 0 0 2.875rem; padding: 0; display: flex; align-items: center; justify-content: center;
                       background: #fff; color: #005883; border-left: 1px solid #e3e6ea; font-size: 1.1875rem; }
.asst-foot .asst-pop:hover:not(:disabled), .asst-foot .asst-pop:focus-visible { background: #e8f1f7; }
.asst-foot .asst-pop:focus-visible { box-shadow: inset 0 0 0 2px #005883; }
.asst-pop-tip { position: absolute; right: .25rem; bottom: calc(100% + .375rem); white-space: nowrap; pointer-events: none; opacity: 0;
                background: #1f2937; color: #fff; font-size: .75rem; font-weight: 400; padding: .25rem .5rem; border-radius: .375rem; transition: opacity .12s; }
.asst-pop:hover .asst-pop-tip, .asst-pop:focus-visible .asst-pop-tip { opacity: 1; }

/* HOW SHOULD WE CONTACT YOU? (2026-10-16): the popup after a "yes", over the chat card only. Each choice says where it
   goes in words, and the chosen one has its radio filled - the light background is extra, never the only sign. */
.asst-ask-veil { position: absolute; inset: 0; z-index: 5; background: rgba(8, 20, 40, .45); display: flex; align-items: center;
                 justify-content: center; padding: .875rem; }
.asst-ask { background: #fff; border-radius: .625rem; box-shadow: 0 .625rem 1.875rem rgba(0, 0, 0, .3); width: 100%; max-width: 21.25rem;
            max-height: 100%; display: flex; flex-direction: column; font-size: .875rem; color: #1f2937; }
.asst-ask:focus { outline: none; }
.asst-ask-head { display: flex; justify-content: space-between; align-items: center; padding: .75rem .875rem; border-bottom: 1px solid #e3e6ea; font-weight: 600; }
.asst-ask-x { border: 0; background: none; font-size: 1.125rem; line-height: 1; cursor: pointer; color: #59607a; padding: .125rem .25rem; }
.asst-ask-x:focus-visible { outline: 2px solid #005883; border-radius: .25rem; }
.asst-ask-body { padding: .625rem .875rem; overflow-y: auto; }
.asst-opt { display: flex; gap: .625rem; align-items: flex-start; padding: .5rem .375rem; border-radius: .375rem; cursor: pointer; }
.asst-opt:hover { background: #f3f5f9; }
.asst-opt input { margin-top: .1875rem; accent-color: #005883; }
.asst-opt b { display: block; font-weight: 600; }
.asst-opt-sub { display: block; color: #59607a; font-size: .8125rem; overflow-wrap: anywhere; }
.asst-opt-picked { background: #e8f1f7; }
.asst-opt-cancel { border-top: 1px solid #e3e6ea; margin-top: .25rem; padding-top: .625rem; border-radius: 0; }
.asst-ask-foot { display: flex; justify-content: flex-end; padding: .625rem .875rem; border-top: 1px solid #e3e6ea; }
.asst-ask-ok { border: 0; border-radius: .375rem; padding: .5rem 1rem; background: #005883; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.asst-ask-ok:hover:not(:disabled) { background: #0C7BB8; }
.asst-ask-ok:disabled { opacity: .5; cursor: default; }
.asst-ask-ok:focus-visible { outline: 2px solid #1f2937; outline-offset: 2px; }
