/* Hupso branding — overrides of the Chainlit/shadcn CSS variables */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;500;700&display=swap');

/* Agrandir (hupso licence, valid on all subdomains): headings.
   Variable font: a single source covers every weight. */
@font-face {
  font-family: 'Agrandir';
  src: url('/public/fonts/Agrandir-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

.font-agrandir {
  font-family: 'Agrandir', 'Noto Sans', sans-serif;
}

/* Message headings (markdown rendered as .prose) in Agrandir */
.prose h1, .prose h2, .prose h3, .prose h4 {
  font-family: 'Agrandir', 'Noto Sans', sans-serif;
}

/* Every button label in Agrandir (hupso chart). The element selector covers
   all shadcn variants (solid, ghost, outline, icon) without depending on the
   bundle's class names; purely iconographic buttons have no text, so the rule
   is a no-op for them. The weight is not forced: each variant keeps its own.
   !important required: this file is injected BEFORE the bundle's Chainlit CSS
   (order of <link> tags in index.html), whose Tailwind preflight sets
   button { font-family: inherit } — at equal specificity (element selector),
   the rule loaded afterwards would win and Agrandir would be dead. */
button,
[role="button"] {
  font-family: 'Agrandir', 'Noto Sans', sans-serif !important;
}

/* Hides the theme selector (stable id of the Chainlit 2.11 frontend):
   the app is light-only, theme forcing lives in custom.js. */
#theme-toggle {
  display: none !important;
}

/* Assistant message content column (Chainlit 2.11 structure, verified in the
   frontend bundle):
     .ai-message (flex gap-4) = <Avatar /> + <div class="flex-col items-start
     flex-grow min-w-[150px]"> holding .message-content (w-full).
   This flex item has NO min-width: 0: it refuses to shrink below the minimum
   width of its content, so a wide element (quiz, flashcards) pushes the whole
   column past the viewport and overflows to the right.
   min-width: 0 is the standard flexbox fix: the column stays within the
   viewport and the content adapts.
   The .inline-custom wrapper is already full-width by stretch (all its
   ancestors under .message-content are flex-col without items-start): no need
   to force it. */
.ai-message > div {
  min-width: 0;
}

/* AI avatar hidden: no Chainlit config option to disable it (without
   default_avatar_file_url, the frontend shows a generic fallback avatar — it
   does not disappear). In .ai-message, the only direct <span> child is the
   avatar (the text column and steps are <div>s): the selector cannot hide
   anything else. The text column then starts at the left edge and takes the
   full width, which also removes the centring offset of the custom elements.
   To re-enable the avatar (e.g. a future Pia avatar), remove this rule. */
.ai-message > span {
  display: none;
}

/* User message bubble: LMS grey */
[data-step-type="user_message"] .bg-accent {
  background-color: var(--pc-surface) !important;
}

/* Compact composer: the send/stop button moves up onto the input line.
   Chainlit 2.11 structure (verified in the bundle):
     #message-composer (flex-col, p-3 px-4, min-h-24)
       ├─ #chat-input (p-0, fixed h/min-h 40px, text-base → 24px line)
       └─ action row (flex justify-between)
          ├─ left group (upload, audio, MCP…: ALL disabled in our config, so
          │  the row contains nothing but the submit button)
          └─ right group > #chat-submit / #stop-button (h-8 w-8)
   We cancel the row's height and position the right group absolutely,
   vertically centred in the composer: saves ~40px of vertical space.
   ⚠️ If we ever enable the action buttons (upload, audio, MCP, dictation),
   they would reappear on this zero-height row: revisit this rule.
   The background is the input area: very light LMS grey. */
#message-composer {
  position: relative;
  min-height: 0;
  background-color: #F6F6F5 !important;
}
#message-composer > div:last-child {
  height: 0;
  overflow: visible;
}
#message-composer > div:last-child > div:last-child {
  position: absolute;
  right: 16px; /* = the composer's px-4 */
  top: 50%;
  transform: translateY(-50%);
}
/* The text never runs under the repositioned button, and the 24px line is
   centred within the 40px of the textarea (box-sizing: border-box everywhere):
   8 + 24 + 8 = 40. In multiline mode the textarea grows and these paddings
   simply become the top/bottom breathing room of the block. */
#chat-input {
  padding-right: 48px;
  padding-top: 8px;
  padding-bottom: 8px;
}

/* Send and stop buttons: LMS purple.
   hsl(var(--primary)) = #5A59F6, the hupso purple (same value as the
   component form declared on :root below), documentedly the send-button
   colour and the LMS_PURPLE constant of the custom elements. */
#chat-submit,
#stop-button {
  background-color: hsl(var(--primary)) !important;
  color: #FFFFFF !important;
}
#chat-submit:hover:not(:disabled),
#stop-button:hover:not(:disabled) {
  background-color: #747BE6 !important;
}
#chat-submit:disabled {
  background-color: #C3C9FB !important;
}

/* Shared hupso design tokens — declared on :root (NOT on .profia-conv):
   #chat-profiles and #header live outside the conversations bar tree and also
   consume these variables. --profia-chrome-h is the vertical chrome height
   reserved by the fixed conversations bar and mirrored by the native header. */
:root {
  --pc-hover: #eef0fe;
  --pc-hover-strong: #e3e7fd;
  --pc-hover-border: #ccd3fa;
  --pc-accent: #4f46e5;
  --pc-ink: #1f1f24;
  --pc-muted: #8b8b96;
  --pc-muted-2: #6b6b76;
  --pc-border: #ececf1;
  --pc-surface: #f2f2f6;
  --pc-danger: #b91c1c;
  --pc-danger-strong: #991b1b;
  --pc-radius: 10px;
  --profia-chrome-h: 60px;
  /* Width of the admin formation selector: 25% on desktop, 30% below an iPad (768px). */
  --profia-profiles-width: 25vw;
}

@media (max-width: 767.98px) {
  :root {
    --profia-profiles-width: 30vw;
  }
}

/* We raise the specificity to load after the Chainlit CSS */
:root:root {
  --font-sans: 'Noto Sans', sans-serif;

  --background: 0 0% 100%;
  --foreground: 0 0% 20%;

  --card: 0 0% 100%;
  --card-foreground: 0 0% 20%;

  --popover: 0 0% 100%;
  --popover-foreground: 0 0% 20%;

  /* Primary hupso purple #5A59F6 (= chat send button, LMS_PURPLE of the custom
     elements) replacing the initial orange 16 85% 55%: drives the solid buttons
     (e.g. "Envoyer le commentaire" of the feedback dialog), the hover of link
     pills, badges and progress bars. */
  --primary: 240 90% 66%;
  --primary-foreground: 0 0% 100%;

  --secondary: 0 0% 96%;
  --secondary-foreground: 0 0% 20%;

  --muted: 0 0% 96%;
  --muted-foreground: 0 0% 45%;

  /* --accent drives the hover of ghost/outline buttons and menu items
     (hover:bg-accent throughout the Chainlit frontend). Light hupso blue
     #E7E9FB (= LMS_PURPLE_LIGHT of the custom elements), replacing the
     initial peach 19 69% 93%. The user message bubble also uses .bg-accent but
     is already overridden in grey above (the !important rule). */
  --accent: 234 71% 95%;
  --accent-foreground: 0 0% 20%;

  --destructive: 0 84% 60%;
  --destructive-foreground: 0 0% 100%;

  --border: 19 50% 88%;
  /* Resting field border: light blue #C3C9FB (disabled send-button palette)
     instead of the peach 19 69% 93%. */
  --input: 234 87% 87%;
  /* Focus rings (outline of the comment textarea, etc.): hupso purple instead
     of orange. */
  --ring: 240 90% 66%;
  --radius: 0.75rem;
}

body {
  font-family: 'Noto Sans', sans-serif;
}

/* Hides the blinking cursor « ● » (Chainlit 2.11 frontend: the same
   BlinkingCursor component — hard-coded, no config option — serves both as
   the cursor at the end of streamed text AND as the run loader during waits).
   Our single wait indicator is the "Je réfléchis" step (thinking.py); the text
   being written is enough while streaming.
   !important required: the span also carries the Tailwind .inline-block class,
   loaded AFTER this file — at equal specificity, it would win and the rule
   would be dead. Pure CSS rule: no JS, no CPU cost. */
.loading-cursor {
  display: none !important;
}

#user-nav-button {
  display: none !important;
}

/* Welcome-screen logo hidden: while the agent is being created, the Chainlit
   2.11 frontend shows a centred waiting screen (div#welcome-screen) whose only
   content for us is the large hupso logo (img.logo w-[200px], rendered by the
   Logo component for lack of a chat-profile icon — verified in the frontend
   bundle). No config option to disable it: pure CSS rule.
   The selector is scoped to #welcome-screen so as not to touch the same logo
   reused by the /login page (never shown: see the session rules). Once the
   welcome message is streamed, the welcome screen disappears anyway (the
   component returns null as soon as a message exists). */
#welcome-screen .logo {
  display: none;
}

/* Boot: hidden until Chainlit's final render (custom.js), admin selector included. */
html.profia-boot-pending .profia-conv,
html.profia-boot-pending #root {
  visibility: hidden;
}

/* Ended session: Chainlit's /login is never shown, custom.js renews from there. */
html.profia-signin #root {
  visibility: hidden;
}

.profia-session-ended {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px 16px;
  background: #ffffff;
  color: var(--pc-ink);
  text-align: center;
}

.profia-session-ended-title {
  margin: 0;
  font-family: 'Agrandir', 'Noto Sans', sans-serif;
  font-size: 18px;
  font-weight: 700;
}

.profia-session-ended-text {
  margin: 0;
  color: var(--pc-muted-2);
  font-size: 14px;
}

.profia-session-ended-action {
  margin-top: 8px;
  padding: 10px 18px;
  border-radius: var(--pc-radius);
  background-color: hsl(var(--primary));
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.profia-session-ended-action:hover {
  background-color: #747be6;
}

.profia-session-ended-action:focus-visible {
  outline: 2px solid var(--pc-accent);
  outline-offset: 2px;
}

/* Static copy shown by custom.js while a formation change remounts the chat (below the bar). */
.profia-freeze {
  position: fixed;
  inset: 0;
  z-index: 39;
  pointer-events: none;
}

/* Empty chat: keep the composer where the footer puts it, above the watermark (custom.js). */
#welcome-screen {
  justify-content: flex-end;
  margin-top: 0;
  padding-bottom: max(0px, calc(var(--profia-watermark-h, 16.5px) - 8px));
  opacity: 1;
}

/* Footer booking link (custom.js): the watermark text, only underlined to read as a link. */
.watermark .profia-book-oral {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.watermark .profia-book-oral:hover {
  color: hsl(var(--primary));
}

/* Tooltips in light hupso blue (background #E7E9FB, border #C3C9FB) instead of
   the white/salmon-border pair (--border: 19 50% 88%) that gave them an
   orangey look. Chainlit 2.11 structure (Radix, verified in the bundle): the
   visible box carries the bg-popover/border classes and contains a
   VisuallyHidden span role="tooltip" (aria descriptor): the :has() therefore
   targets ONLY the tooltips, not the dropdowns/menus that share bg-popover. */
.bg-popover:has([role="tooltip"]) {
  background-color: #E7E9FB;
  border-color: #C3C9FB;
}

/* Instant positive feedback — part 1/2 (part 2 is in custom.js):
   hides ANY unclassified dialog AND its overlay from the first paint, as long
   as custom.js has not revealed it (class .profia-dialog-visible). Without
   this masking, the comment popup of a positive vote flickers for a few frames
   before the MutationObserver submits it (Radix mounts the dialog content
   lazily, after a first paint).
   Chainlit 2.11 structure (Radix, verified in the bundle): the Dialog portal
   places the overlay then the [role="dialog"] content as direct children of
   body — the overlay is the immediately preceding sibling, captured by
   :has(+ …).
   ⚠️ FLAT selectors required: a :has() nested inside a :has() is invalid and
   would silently drop the WHOLE rule (never reintroduce one here). Hence the
   generic classification by the JS: every dialog is revealed except the
   positive feedback, submitted before revelation.
   Only applies if custom.js runs (.profia-dialogs-js on body): if the script
   is dead, the rule is inert and everything stays native. */
body.profia-dialogs-js [role="dialog"]:not(.profia-dialog-visible),
body.profia-dialogs-js div:has(+ [role="dialog"]:not(.profia-dialog-visible)) {
  display: none !important;
}

/* ==========================================================================
   "Conversations" dropdown (custom.js — replaces the native sidebar, v1.4)
   Full-width row FIXED at the very top of the viewport; dropdown panel as an
   inset card overlay. 100% home-made DOM: no class from the Chainlit bundle.
   ========================================================================== */

/* Native Chainlit header row (#header, stable id of the 2.11 bundle): it now
   holds nothing visible for us — the native "new discussion" button is hidden
   below (replaced by the bar's "+"), #theme-toggle and #user-nav-button too.
   On chat pages (class set by custom.js at boot, before React's first render)
   it KEEPS 60px: it is what reserves the vertical space of the bar, since the
   bar is fixed, out of flow — a foreign node inserted in flow into the column
   was swept away by React on the first reload or re-render, hence a flash of
   old UI (REX 30/09). Elsewhere (login) its height is zero: it disappears.
   Admin case: the profile selector (#chat-profiles, 40px) is FIXED over the
   left area of the bar, reserved by the trigger's margin-left (see the
   profia-admin rules). We do NOT move this React node: a removeChild on a
   relocated node would crash React on SPA navigation. z-index 41 > bar (40):
   the selector stays clickable above it — but this z-index makes the header a
   full-width shell ABOVE the fixed bar: without pointer-events: none it would
   intercept all its clicks (REX 30/09: bar unclickable in the LMS iframe — the
   programmatic .click() of the tests bypasses hit-testing, hence the
   non-detection).
   overflow: visible is REQUIRED because #chat-profiles lives inside #header:
   with height: 0 the header would clip it (the selector floats over the bar),
   so it must not clip its overflow.
   The horizontal padding below (12px) is part of the admin slot offset of the
   trigger margin (html.profia-admin .profia-conv-trigger): change both
   together or the selector and the trigger stop being 8px apart. */
#header {
  height: 0;
  padding: 0 12px;
  overflow: visible;
  z-index: 41;
  /* Empty shell covered by the bar: transparent to clicks… */
  pointer-events: none;
}

/* … except the admin profile selector, re-enabled; in vw since a % collapses on its parent. */
#chat-profiles {
  pointer-events: auto;
  gap: 8px;
  height: 40px;
  width: var(--profia-profiles-width);
  padding: 0 10px;
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius);
  background: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--pc-ink);
}

/* Admin thread switch: fade out, hold until synced, fade back in (150ms = THREAD_FADE_MS). */
[data-step-type],
#welcome-screen,
.profia-conv-current,
#chat-profiles > span,
div:has(> #message-composer) {
  transition: opacity 150ms ease;
}

html.profia-thread-leaving [data-step-type],
html.profia-thread-leaving #welcome-screen,
html.profia-thread-leaving .profia-conv-current,
html.profia-thread-leaving #chat-profiles > span,
html.profia-thread-leaving div:has(> #message-composer) {
  opacity: 0;
}

/* Held content is hidden at once (back/forward, reload): only its reveal fades. */
html.profia-thread-pending.profia-admin [data-step-type],
html.profia-thread-pending.profia-admin #welcome-screen,
html.profia-thread-pending.profia-admin div:has(> #message-composer),
html.profia-thread-pending #chat-profiles > span,
html.profia-thread-switch [data-step-type],
html.profia-thread-switch #welcome-screen,
html.profia-thread-switch .profia-conv-current {
  opacity: 0;
  pointer-events: none;
  transition: none;
}

/* Chainlit's loaders (thread page, app overlay on a profile change) only flashed while held. */
html.profia-thread-pending.profia-admin #root .lucide-loader.animate-spin {
  visibility: hidden;
}

/* Fixed like the bar so it never scrolls with the column; centred on the bar's controls. */
html.profia-chat #chat-profiles {
  position: fixed;
  top: calc((var(--profia-chrome-h) - 40px - 1px) / 2);
  left: 12px;
  z-index: 41;
}

#chat-profiles > span,
#chat-profiles > span * {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Same chevron as the conversations trigger (the bundle forces !size-5). */
#chat-profiles > svg {
  flex-shrink: 0;
  width: 14px !important;
  height: 14px !important;
  margin-left: 0;
  color: var(--pc-muted-2);
  transition: transform 150ms ease;
}

#chat-profiles[data-state="open"] > svg {
  transform: rotate(180deg);
}

/* Formation menu kept in the viewport (data-test is only set by Chainlit's ChatProfiles). */
[role="listbox"]:has([data-test^="select-item:"]) {
  max-width: calc(100vw - 24px);
}

[data-radix-popper-content-wrapper] > :has([data-test^="select-item:"]) {
  border-color: var(--pc-border);
  border-radius: 12px;
  /* Brand shadow tint: rgba is --pc-ink (#1f1f24) at 12% alpha. */
  box-shadow: 0 12px 28px rgba(31, 31, 36, 0.12);
}

/* Our formations have no description: the native hover card only showed an empty box. */
#chat-profile-description {
  display: none;
}

[data-test^="select-item:"] {
  white-space: normal;
  padding-top: 8px;
  padding-bottom: 8px;
  border-radius: 8px;
  cursor: pointer;
}

[data-test^="select-item:"][data-highlighted] {
  background-color: var(--pc-hover);
}

[data-test^="select-item:"][data-state="checked"] {
  color: var(--pc-accent);
  font-weight: 600;
}

/* Admin bar on the sticky profia-admin class: the selector vanishes while Chainlit remounts. */
html.profia-admin .profia-conv-bar {
  gap: 8px;
}

/* Slot of the fixed selector: header padding (12) + gap (8) − bar padding (6) = 14px. */
html.profia-admin .profia-conv-trigger {
  height: 40px;
  margin-left: calc(var(--profia-profiles-width) + 14px);
  padding: 0 10px;
  border: 1px solid var(--pc-border);
  background: #ffffff;
}

html.profia-admin .profia-conv-trigger:hover,
#chat-profiles:hover {
  background-color: var(--pc-hover);
  border-color: var(--pc-hover-border);
}

html.profia-admin .profia-conv-new {
  width: 40px;
  height: 40px;
}

.profia-conv-trigger:focus-visible,
.profia-conv-new:focus-visible {
  outline: 2px solid var(--pc-accent);
  outline-offset: 2px;
}

/* No ring on the selector: Radix refocuses it each time the menu closes. */
#chat-profiles:focus,
#chat-profiles:focus-visible {
  outline: none;
  box-shadow: none;
}

html.profia-chat #header {
  height: var(--profia-chrome-h);
  /* flex-shrink: the chat column is h-full → the flex container over-allocates
     and would let the header compress (~56px, REX 30/09): the fixed bar
     (60px) would overflow onto the messages. The chrome does not compress,
     the scrollable column flexes. */
  flex-shrink: 0;
  /* Native items-center would suffice; explicit beats implicit. */
  align-items: center;
}

/* Fixed bar, direct child of <body> — OUT of React's reach (never removed,
   never moved): it exactly covers the header (same 60px) and appears as soon
   as custom.js runs, before the React boot — no more visible UI transition
   when switching conversation. */
.profia-conv {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: #ffffff;
}

/* Off the chat pages the bar cannot exist: custom.js no longer drives
   bar.hidden, the .profia-chat class (set at boot, before React's first
   render) is the single source of truth for its visibility. */
html:not(.profia-chat) .profia-conv {
  display: none;
}

.profia-conv-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  /* Target height from the mockup: 60px, border included. */
  min-height: var(--profia-chrome-h);
  /* Breathing room around the controls: the hovers are inset rounded pills
     (like the "+"), never edge-to-edge bands. Right side widened (13px): the
     "+" aligns with the LMS drawer close cross — chrome outside the iframe,
     offset measured on a capture, constant because the cross keeps a fixed
     right margin whatever the drawer width. */
  padding: 8px 13px 8px 6px;
  border-bottom: 1px solid var(--pc-border);
}

.profia-conv-trigger {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: var(--pc-radius);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--pc-ink);
  cursor: pointer;
  text-align: left;
}

/* Hover shared by the three controls of the zone (dropdown trigger, panel
   items, admin profile selector): the light blue of the "+" (--pc-hover),
   more legible than the near-grey --accent. #chat-profiles is an id: it beats
   the bundle's utility class without !important. */
.profia-conv-trigger:hover,
.profia-conv-item:hover,
#chat-profiles:hover {
  background-color: var(--pc-hover);
}

.profia-conv-current {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profia-conv-chevron {
  flex-shrink: 0;
  color: var(--pc-muted-2);
  transition: transform 150ms ease;
}

.profia-conv.is-open .profia-conv-chevron {
  transform: rotate(180deg);
}

/* "+" new conversation, aligned on the bar (mockup) — delegates to the native
   Chainlit button (hidden below): native dialog preserved. Blue pill visible
   at rest (background + slightly darker outline), not a plain hover. */
.profia-conv-new {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 1px solid #dde2fb;
  border-radius: var(--pc-radius);
  background: var(--pc-hover);
  font-size: 1.3rem;
  line-height: 1;
  color: var(--pc-accent);
  cursor: pointer;
}

.profia-conv-new:hover {
  background: var(--pc-hover-strong);
  border-color: var(--pc-hover-border);
}

/* Native Chainlit "new discussion" button (#new-chat-button, stable id of the
   2.11 bundle): unclear and misaligned — replaced by the bar's "+" which
   delegates the click to it (its native confirmation dialog is kept, it is
   wanted; a programmatic .click() works despite display:none). Hidden in PURE
   CSS, not via a class set in JS: such a class disappeared on every React
   re-render and the button reappeared during the re-hiding (flash of old UI
   when switching conversation, REX 30/09). The hide is gated on
   html.profia-conv-ok (set by custom.js only once the bar is actually mounted):
   if the bar is torn down (401/404 on the context endpoint), the class is
   dropped and the native button reappears on its own, so the user keeps a way
   to open a new conversation. */
html.profia-conv-ok #new-chat-button {
  display: none !important;
}

.profia-conv-panel {
  /* Closed by default: the JS no longer drives panel.hidden, the is-open class
     on the bar is the single source of truth (see rule below). */
  display: none;
  position: absolute;
  top: 100%;
  left: 8px;
  right: 8px;
  z-index: 60;
  max-height: 320px;
  overflow-y: auto;
  margin-top: 4px;
  padding: 10px 12px 12px;
  background: #ffffff;
  border: 1px solid var(--pc-border);
  border-radius: 12px;
  /* Brand shadow tint: rgba is --pc-ink (#1f1f24) at 12% alpha. */
  box-shadow: 0 12px 28px rgba(31, 31, 36, 0.12);
}

.profia-conv.is-open .profia-conv-panel {
  display: block;
}

.profia-conv-title {
  margin: 0 0 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--pc-muted);
}

.profia-conv-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 8px;
}

.profia-conv-item.is-active {
  background: var(--pc-surface);
}

.profia-conv-dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: transparent;
}

.profia-conv-item.is-active .profia-conv-dot {
  background: var(--pc-accent);
}

.profia-conv-open {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 4px 0;
  text-align: left;
  font-size: 0.88rem;
  color: var(--pc-ink);
  cursor: pointer;
}

.profia-conv-time {
  flex-shrink: 0;
  font-size: 0.78rem;
  color: var(--pc-muted);
}

.profia-conv-delete {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 6px;
  color: var(--pc-muted);
  cursor: pointer;
}

.profia-conv-delete:hover {
  background: #fdecec;
  color: #d33;
}

.profia-conv-empty {
  margin: 4px 8px;
  font-size: 0.85rem;
  color: var(--pc-muted);
}

/* Inline delete confirmation (never a browser popup). */
.profia-conv-item.is-confirming {
  background: #fdf3f3;
}

.profia-conv-ask {
  flex: 1;
  min-width: 0;
  font-size: 0.85rem;
  color: var(--pc-danger);
}

.profia-conv-yes,
.profia-conv-no {
  flex-shrink: 0;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.82rem;
  cursor: pointer;
}

.profia-conv-yes {
  background: var(--pc-danger);
  color: #ffffff;
}

.profia-conv-yes:hover {
  background: var(--pc-danger-strong);
}

.profia-conv-no {
  color: var(--pc-muted-2);
}

.profia-conv-no:hover {
  background: #f0f0f3;
}