/*
 * The Finney FAB (plan 2026-09-29-014 U1, KTD1): the launcher shared by the
 * Service Portal chat and the Desk assistant. These are the Service Portal
 * launcher's rules, moved here. Colours follow the host page:
 *   --finney-fab-bg / --finney-fab-fg / --finney-fab-hover / --finney-fab-focus
 * fall back to the portal's brand variables, so a provider's theme reaches
 * the button unchanged; the Desk sets them to its accent.
 */

.finney-fab[hidden] { display: none !important; }

.finney-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 48px;
  min-height: 48px;
  padding: 0 18px 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--finney-fab-bg, var(--brand-primary, #14b8a6));
  color: var(--finney-fab-fg, var(--brand-on-primary, #000));
  font: 600 15px/1 var(--font-ui, var(--font-sans, system-ui, sans-serif));
  box-shadow: 0 10px 28px -12px color-mix(in srgb, var(--portal-text, #000) 45%, transparent);
  cursor: pointer;
}
.finney-fab:hover { background: var(--finney-fab-hover, var(--brand-hover, var(--finney-fab-bg, var(--brand-primary, #14b8a6)))); }
.finney-fab:active { background: var(--finney-fab-pressed, var(--brand-pressed, var(--finney-fab-bg, var(--brand-primary, #14b8a6)))); }
.finney-fab:focus-visible { outline: 3px solid var(--finney-fab-focus, var(--portal-focus, #1a4fd6)); outline-offset: 3px; }
.finney-fab-icon { flex: none; }

/* Unread: a small dot. */
.finney-fab-unread { display: none; width: 10px; height: 10px; border-radius: 50%; background: var(--brand-attention, var(--brand-accent, #f4b942)); box-shadow: 0 0 0 2px var(--finney-fab-bg, var(--brand-primary, #14b8a6)); }
.finney-fab[data-unread="true"] .finney-fab-unread { display: inline-block; }

/* Attention: a warning ring and a "!" badge, never the unread dot. */
.finney-fab-alert {
  display: none; position: absolute; top: -6px; right: -6px; width: 20px; height: 20px;
  align-items: center; justify-content: center; border-radius: 50%;
  background: var(--finney-fab-warn, #b45309); color: #fff; font: 800 13px/1 system-ui, sans-serif;
  box-shadow: 0 0 0 2px var(--finney-fab-ring-gap, #fff); pointer-events: none;
}
.finney-fab[data-state="attention"] {
  box-shadow: 0 0 0 3px var(--finney-fab-ring-gap, #fff), 0 0 0 6px var(--finney-fab-warn, #b45309), 0 10px 28px -12px color-mix(in srgb, var(--portal-text, #000) 45%, transparent);
}
.finney-fab[data-state="attention"] .finney-fab-alert { display: inline-flex; }

/* Powered by Finney: a tiny fixed mark on the button. */
.finney-fab-mark {
  position: absolute; top: -5px; left: -5px; width: 18px; height: 18px; padding: 2px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); pointer-events: none;
}
[data-brand-powered-by-off] .finney-fab [data-powered-by] { display: none !important; }

.finney-fab-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (max-width: 599px) {
  .finney-fab { right: 16px; bottom: 16px; }
}

/* Plan 2026-10-06-012: why Finney cannot act for the person here, beside the
 * launcher (the Requests pages; the Practice pages keep .pw-finney-seat-note). */
.finney-seat-note { position: fixed; right: 20px; bottom: 84px; z-index: 996; max-width: 260px; padding: 8px 10px; border: 1px solid var(--line, var(--border, rgba(0,0,0,0.12))); border-radius: 8px; background: var(--surface, var(--bg-surface, #fff)); color: var(--muted, var(--text-muted, #555)); font-size: 12px; line-height: 1.35; box-shadow: 0 4px 14px rgba(0,0,0,0.18); }
@media (max-width: 599px) { .finney-seat-note { right: 16px; bottom: 76px; } }
