/* contacts.css: the styles of screens/contacts.js, screens/contact.js and screens/contact_form.js. OWNER: the contacts builder.
   The rules of ortuzar.css hold here too, and a unit test reads this file for them: the five colours (as the
   variables --paper, --ink, --grey, --rule, --red; write no colour value here), the five type sizes (14, 17, 20, 27,
   30; reading and typed text 16), the weights 300, 400 and 500, the spacing scale (--s1 to --s8), no shadow, no
   rounded corner, no motion. The shared pieces of a form (the label above, the ruled line, the row of words, the
   black bar, the list under a name field) are in ortuzar.css: use them, do not restyle them here.
   Begin every selector with the screen's own name, so that nothing here can change another screen. */

/* ---- the list of people (.contacts), and an advisor's clients on their page ----
   A ruled row is one link: the name in Medium, then in grey what tells this person from another. On the phone the
   grey words follow the name and wrap with it; on the Mac they stand in a column of their own. */
.contacts .people .row,.contact .people .row{display:block}
.contacts .people .org,.contact .people .org{color:var(--grey)}
.contacts .people{padding-top:0}
/* "New contact" goes somewhere, so it is underlined like every other link (the two words that stand in this place
   on the Works screen are a choice, and are not) */
.contacts .searchrow .view a{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}
@media(min-width:900px){
  .contacts .people .row,.contact .people .row{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);column-gap:var(--s5)}
}

/* ---- one person (.contact) ---- */
.contact .head{padding-bottom:var(--s2)}
.contact dl.facts{grid-template-columns:104px minmax(0,1fr)}
.contact dl.facts dd{overflow-wrap:anywhere}
.contact .facts .notes{white-space:pre-line}
/* THE WORDS THAT TAKE A TAP AMONG THE FACTS. The lines of the facts stand 27 points apart, as the mockup draws them,
   which is closer than two areas of 44 points can stand. So each area is cut to fit: the advisor's name reaches up;
   "Add" on the email line reaches up over "Handled by" (which never takes a tap); "Add" on the telephone line reaches
   down into the room under the facts; and the row of actions below reaches down, not up. Each is still 44 points
   tall and no two share any ground. A browser test taps the top, middle and bottom of each. */
.contact .facts dd[data-fact=advisor] .tap{padding:16px 6px 6px;margin:-16px -6px -6px}
.contact .facts .tap.add-email{padding:21px 6px 1px;margin:-21px -6px -1px}
.contact .facts .tap.add-phone{padding:3px 6px 19px;margin:-3px -6px -19px}
/* an area that reaches over the line above or below it lies on top of that line, so that a tap there is the word's */
.contact .facts .tap,.contact .actions .tap,.contact .entry .what .tap{position:relative;z-index:1}
.contact .actions{row-gap:22px}
.contact .actions .tap,.contact .actions button.link.tap{padding:5px 6px 17px;margin:-5px -6px -17px}
.contact .actions .md{font-weight:500}
/* the works a person holds: the mockup's table. The work's own lines are the link; the small lines stand under them. */
.contact .held td a{display:block;text-decoration:none}
.contact .held .small{display:block}
.contact .held td.num .small{margin-top:2px}
.contact .held td.d-only .small{margin-top:2px}
/* the journal: a grey date in the working size (as the mockup's picture has it), then the entry */
.contact .day{padding-top:var(--s4)}
.contact .day>h3{font-size:17px;line-height:23px;font-weight:300;color:var(--grey)}
.contact .entry .note{margin-top:2px;white-space:pre-line}
/* several works in one entry: one to a line, the lines 44 points apart, each line the whole of its link */
.contact .entry .items li{padding:10px 0 11px}
.contact .entry .items a{display:block;padding:10px 0 11px;margin:-10px 0 -11px}
.contact .nothing{padding:var(--s3) 0}
@media(min-width:900px){
  .contact dl.facts{grid-template-columns:120px minmax(0,1fr)}
}

/* ---- the form: a new contact, and a contact being edited (.contact-form) ---- */
.contact-form .head{padding-bottom:0}
/* the words at the right of "Cancel" may take two lines on a narrow phone; they never push the page sideways */
.contact-form .crumb .unsaved{display:block;flex:0 1 auto;text-align:right}
/* what is already in Contacts, and what was carried in from "new contact" */
.contact-form .match,.contact-form .carried{padding-top:var(--s4)}
.contact-form .match p+p{margin-top:var(--s1)}
.contact-form .match .sugg{margin-top:var(--s2);border-top:1px solid var(--rule)}
/* a line that holds one word to tap: 44 points tall, so the word's area never reaches the field above or below */
.contact-form .tapline{padding:11px 0}
.contact-form .match .tapline{margin-top:0}
.contact-form .phone-country{padding:13px 0}
/* the list of countries starts far enough under that line for its first words' areas to clear it */
.contact-form .phone-country+.choice{padding-top:var(--s3)}
.contact-form .phone-warn{padding-bottom:var(--s2)}
.contact-form .more-word{padding-top:var(--s5)}
/* what the line said to log: ruled rows, the words that act at the right; a piece that needs an answer has a row of its own */
.contact-form .interest .ask{padding:var(--s3) 0;border-bottom:1px solid var(--rule)}
/* what went wrong: at the end of the form, just above the black bar, in Medium (red is kept for the one warning
   before something that cannot be undone) */
.contact-form .problem{font-weight:500;padding-top:var(--s5)}

/* ---- the name of a page is given the keyboard's place when a screen is come to, so that a screen reader starts
   there. It is not something to tap, and it gets no outline: ortuzar.css says so for a pointer (h1:focus), and this
   says so when the last thing used was the keyboard, where the shared rule for [tabindex] would draw a box round it. */
.contacts h1:focus-visible,.contact h1:focus-visible,.contact-form h1:focus-visible{outline:0}
@media(max-width:340px){
  .contact .held td.num{white-space:normal}
  .contact .held td.num .small{white-space:normal}
}
/* the one sentence under the actions when "Talk to" changed nothing (a list is in progress for someone else) */
.contact .talk-says{padding:var(--s2) 0 var(--s3)}

/* ---- deleting or merging a person (screens/contact_remove.js; lane 2, December 2026): the two words at the foot of
   a person's page, the two screens they open, and the sentence on the Contacts list after a delete (with "Undo") */
.contact .contact-remove{display:flex;flex-wrap:wrap;gap:22px var(--s6);padding-top:var(--s7)}
.contact .contact-remove .tap{position:relative;z-index:1;padding:11px;margin:-11px}
.contact-removing .head{padding-bottom:var(--s3)}
/* (the sentences of the two screens: not the crumb above them, and not the line under the name field) */
.contact-removing > p:not(.crumb),.contact-removing .formcol > p,.contact-removing [data-merge-what] > p{max-width:34em;padding-bottom:var(--s3)}
.contact-removing .contact-choice{gap:22px var(--s6);padding-top:var(--s4)}
.contact-removing .contact-choice .tap,.contact-removing .contact-choice button.link.tap{padding:11px;margin:-11px}
.contact-removing .problem{font-weight:500}
.contacts .contact-said{padding:var(--s2) 0 var(--s3);font-weight:500}
