/* A target in the drawer over the list, and the editor for creating and changing one. Tokens only. */

/* ── the drawer ── */
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }
.drawer__title { font-size: 20px; }
.drawer__title:focus { outline: none; }
.drawer__sub { margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.drawer__email { display: inline-block; margin-top: 2px; font-size: 12px; color: var(--blue); text-decoration: none; }
.drawer__email:hover { text-decoration: underline; }
/* An address that opens the New email dialog: a button that looks like the link it replaces. */
.mb3 .mail-link { padding: 0; border: 0; background: none; font: inherit; color: var(--blue); text-align: left; cursor: pointer; }
.mb3 .mail-link:hover { text-decoration: underline; }
.mb3 .mail-link.drawer__email { font-size: 12px; }

.drawer__summary { padding: 13px 18px; border-bottom: 1px solid var(--rule); background: var(--footer); }
.drawer__ribbon-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; margin-bottom: 7px; }

.figures { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 15px; }
/* Value, weighted and stage read alike, in the text font: the data font is too thin at this size and looks muted. */
.figures__value, .figures__stage { margin-top: 4px; font-size: 14px; font-weight: 600; }
.figures__value { font-variant-numeric: tabular-nums; }
.figures__value--good { color: var(--hot); }
.figures__team { margin-left: auto; }
.figures__team .avs, .figures__team .avs-none { margin-top: 4px; }

.deadline { display: flex; align-items: center; gap: 9px; padding: 10px 18px; border-bottom: 1px solid var(--rule); background: var(--green-w); }
.deadline .icon { color: var(--hot); }
.deadline--late { background: var(--risk-h-b); }
.deadline--late .icon { color: var(--risk-h); }
.deadline__text { flex: 1; font-size: 12.5px; }
.deadline__text .num { margin-left: 7px; font-size: 11px; color: var(--muted); }

.tabs { display: flex; gap: 3px; padding: 10px 18px 0; border-bottom: 1px solid var(--rule); }
.mb3 .tabs button {
  margin-bottom: -1px;
  padding: 7px 11px;
  border-radius: 5px 5px 0 0;
  border-bottom: 2px solid transparent;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.mb3 .tabs button[aria-selected="true"] { background: var(--sunk); color: var(--text); border-bottom-color: var(--navy); }
.db:focus-visible { outline-offset: -2px; }

.tab-eyebrow { margin-bottom: 8px; }
.tab-eyebrow--gap { margin-top: 14px; }

.facts { display: grid; gap: 10px; margin: 16px 0 0; font-size: 13px; }
.facts__row { display: flex; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--rule); }
.facts dt { width: 128px; flex-shrink: 0; font-size: 12px; color: var(--muted); }
.facts dd { margin: 0; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }

/* The History tab: each change is a line of the timeline, the new value over what it was. */
.history__value { white-space: pre-wrap; }
.history__was { margin-top: 2px; font-size: 11.5px; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.history__restore, .tl-edit { margin-left: auto; height: 26px; gap: 5px; padding: 0 9px; font-size: 12px; }

.drawer__touch { font-size: 11px; color: var(--muted); }
.chip--view-only { height: 33px; padding: 0 12px; }

/* ── the editor ── */
.editor__eyebrow { margin: 0; letter-spacing: .13em; }
.editor__title { margin-top: 3px; font-size: 17px; }
.section-rule { margin-bottom: 11px; padding-top: 15px; border-top: 1px solid var(--rule); }

.dup-warning { margin-bottom: 16px; padding: 13px; border: 1px solid var(--dup-line); border-radius: 5px; background: var(--dup-b); }
.dup-warning__head { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; color: var(--dup); font-size: 13px; }
.dup-warning__row { padding: 5px 0; border-top: 1px solid var(--dup-line); font-size: 12px; color: var(--body); }
.dup-warning__who { margin-top: 2px; font-size: 11px; color: var(--muted); }
.dup-warning__note { margin-top: 8px; font-size: 11.5px; color: var(--body); }

/* Other people at the organisation: in the editor, a row of fields per person laid out like the rest of the form; in the
   drawer, a line per person. On a wide screen the labels show once, over the first row. */
.contact-row { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr 1fr 33px; gap: 12px; }
.contact-row__remove .btn { width: 33px; height: 33px; padding: 0; color: var(--muted); }
.contact-row__remove .btn:hover:not(:disabled) { color: var(--risk-h); }
.contact-row__remove-text { display: none; }
.contacts__add { margin-left: -9px; }
@media (min-width: 1001px) {
  .contact-row + .contact-row .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (max-width: 1000px) {
  .contact-row { grid-template-columns: 1fr; gap: 0; padding-top: 12px; border-top: 1px solid var(--rule); }
  .contact-row:first-child { padding-top: 0; border-top: 0; }
  .contact-row__remove { grid-column: 1 / -1; margin-top: -6px; justify-self: end; }
  .contact-row__remove .lbl { display: none; }
  .contact-row__remove .btn { width: auto; height: 27px; gap: 5px; padding: 0 9px; font-size: 12px; }
  .contact-row__remove-text { display: inline; }
}
.contact-fact + .contact-fact { margin-top: 7px; }
.contact-fact__reach { color: var(--muted); font-size: 12px; white-space: normal; }

/* Asking whether an edit to the organisation's details belongs on its other targets too. */
.related-changes { display: grid; gap: 6px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); font-size: 12.5px; }
.related-changes__row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; color: var(--body); overflow-wrap: anywhere; }
.related-changes__label { min-width: 104px; color: var(--muted); }
.related-changes__was { color: var(--muted); font-size: 11.5px; }
.related-list { margin-top: 12px; max-height: 220px; overflow-y: auto; }
.related-list__row { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 12px; color: var(--body); cursor: pointer; }
.related-list__row:first-child { border-top: 0; }
.related-list__row input { flex-shrink: 0; width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--navy); cursor: pointer; }
.related-list__who { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); }
.related-list + .modal__actions { flex-wrap: wrap; }
