/* components.css — styling for the ONE shared control set (Odoo #4019, OR-20260904-DTD1720).
 *
 * Uses only tokens already defined in app.css (--brand-*, --radius-*). No new palette, no new
 * font, no new spacing scale — a component set that invents its own design language is a
 * second design system, which is the thing this file exists to prevent.
 *
 * ⚖ INK DISCIPLINE: text stays on the grey/ink ramp; colour carries in BORDERS and EDGES,
 * never as coloured text on a tint. The active row is a NAVY FILL with white text, which is
 * the ratified selected-state on this site, not a tinted background with coloured ink.
 */

/* ---------------------------------------------------------------- person picker */
[data-ptr-picker] { position: relative; }

.ptr-picker-input {
  width: 100%; padding: 10px 12px; font-size: 1rem; font-family: inherit;
  border: 1px solid #9aa3ad; border-radius: var(--radius-ctl);
  background: var(--brand-white); color: var(--brand-ink); min-height: 44px;
}
.ptr-picker-input:focus { outline: 2px solid var(--brand-navy); outline-offset: 1px; }

.ptr-picker-list {
  list-style: none; margin: 4px 0 0; padding: 0;
  border: 1px solid var(--brand-hairline); border-radius: var(--radius-ctl);
  background: var(--brand-white); max-height: 300px; overflow-y: auto;
  position: absolute; left: 0; right: 0; z-index: 40;
  box-shadow: 0 6px 18px rgba(0,0,0,.10);
}
.ptr-picker-item {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 12px; min-height: 44px; cursor: pointer;
  border-bottom: 1px solid var(--brand-hairline);
}
.ptr-picker-item:last-child { border-bottom: 0; }
.ptr-picker-item:hover { background: var(--brand-parchment); }
/* selected = navy fill + white text (the ratified selected state), never coloured ink */
.ptr-picker-item.is-active { background: var(--brand-navy); }
.ptr-picker-item.is-active .ptr-picker-name,
.ptr-picker-item.is-active .ptr-picker-sub { color: var(--brand-white); }
.ptr-picker-name { font-weight: 600; }
.ptr-picker-sub  { font-size: .88rem; }
.ptr-picker-none { padding: 12px; color: var(--brand-muted); font-size: .92rem; }
.ptr-picker-chosen { margin: 6px 0 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- toast (JS variant) */
.ptr-toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 100;
  max-width: min(92vw, 460px); padding: 12px 16px;
  background: var(--brand-ink); color: var(--brand-white);
  border-radius: var(--radius-card); box-shadow: 0 8px 24px rgba(0,0,0,.22);
  font-size: .95rem; line-height: 1.35;
}
/* an error is a solid dark fill with a crimson EDGE — not crimson text */
.ptr-toast.is-error { border-left: 4px solid var(--brand-crimson); }

/* 390px-first: the picker and toast must not force the page body sideways */
@media (max-width: 420px) {
  .ptr-picker-list { max-height: 240px; }
  .ptr-toast { left: 12px; right: 12px; transform: none; max-width: none; }
}
