/* ==========================================================================
   26-userlink.css — THE JOIN BETWEEN AN ACCOUNT AND THE PERSON

   Two new columns on the accounts table and one section in the edit dialog.
   Everything here is about telling three states apart at a glance, because
   the whole point of the join is knowing which accounts are joined:

       linked      a name, and a badge saying which kind of record
       not linked  said in words, quietly -- it is a normal state, not a
                   fault, and a row of red warnings on a new install would
                   be noise
       gone        linked to a record that is no longer there, which IS a
                   fault and is the one that gets the warning colour
   ========================================================================== */

.xp-um-person { line-height: 1.3; }

.ul-name {
  display: block;
  font-weight: 700;
  color: var(--text, #e8eef7);
}

/* WHICH KIND OF RECORD, in a word. Crew and Speaker are different chains --
   a crew member carries their own phone, a speaker does not -- so the badge
   is not decoration: it says what you can expect the other columns to hold. */
.ul-kind {
  display: inline-block;
  margin-top: 2px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
  border: 1px solid var(--c-border);
  color: var(--muted);
}
.ul-kind.ul-crew    { border-color: var(--cyan, #00b4d8); color: var(--cyan, #00b4d8); }
.ul-kind.ul-spk     { border-color: var(--brand, #c9a84c); color: var(--brand, #c9a84c); }

.ul-role {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: var(--muted);
}

.ul-phone { font-variant-numeric: tabular-nums; }

/* NOT LINKED IS NOT AN ERROR. Said in the quiet colour, same as an empty
   cell anywhere else in the app. */
.ul-none { color: var(--muted); opacity: .75; }

/* LINKED TO SOMEBODY WHO IS GONE IS an error: the account points at a crew
   member who was deleted, so the row claims a join it cannot show. */
.ul-gone {
  color: var(--red, #ef4444);
  font-size: 11px;
  font-weight: 700;
}

/* -------------------------------------------------------------------------
   THE DIALOG SECTION
   ------------------------------------------------------------------------- */
.ul-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--c-border);
}

.ul-head {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--brand, #c9a84c);
  margin-bottom: 10px;
}

/* The person's own fields sit side by side where there is room and stack on
   a phone, like every other pair of fields in these dialogs. */
.ul-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media screen and (max-width: 640px) {
  .ul-fields { grid-template-columns: 1fr; }
}

.ul-note {
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
}

/* The two notes that are not just explanation: one says the app did
   something on its own, the other says something is wrong. */
.ul-note.ul-auto { color: var(--cyan, #00b4d8); }
.ul-note.ul-warn { color: var(--red, #ef4444); font-weight: 600; }

/* On paper the picker is a control nobody can use, and the joined columns
   are worth keeping -- a printed account list wants the person's name on it
   more than it wants a dropdown. */
@media print {
  .ul-section { display: none !important; }
}
.pdf-exp .ul-section { display: none !important; }
