/* journal.css: the styles of screens/journal.js, screens/journal_talking.js and core/talking.js. OWNER: the journal 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: they are used here, not restyled.
   Every selector begins with one of this builder's own names (.talking-…, .journal…). There is ONE exception, marked
   below: the frame's wrapper of the list at the foot is not shown while the list has nothing to say. */

/* ============================== "TALKING TO" ============================== */

/* ---- a row of words that take taps: 44 points each, and each word's area reaches half way to the next ---- */
.talking-acts{display:flex;flex:none;gap:22px}
.talking-acts .tap,.talking-acts button.link.tap{padding:11px;margin:-11px}

/* ---- the line at the top of the Works screen ---- */
/* someone is chosen: "Talking to <name>" at the left, "Stop" at the right */
.talking-bar .talking-who{display:flex;justify-content:space-between;align-items:baseline;gap:var(--s5)}
.talking-bar .talking-name{min-width:0}
/* the name is a link among words: its tap area is 44 points tall and no wider than the name */
.talking-bar .talking-name .tap{padding-left:0;padding-right:0;margin-left:0;margin-right:0}
.talking-bar .talking-who>.tap:last-child{flex:none;white-space:nowrap;padding-right:16px;margin-right:-16px}
.talking-bar .talking-ending{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:22px var(--s5);padding-top:22px}
/* nobody is chosen: the label and the name field on one line, the people it could be beneath */
.talking-bar.ask{margin:-11px 0}
.talking-bar .field{display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:var(--s3);align-items:baseline;padding-top:0}
.talking-bar .field>label{font-size:17px;line-height:23px;margin:0}
.talking-bar .field .hint,.talking-bar .field .sugg{grid-column:1 / -1}
.talking-bar .talking-trouble{padding:var(--s3) 0 13px}
/* a list for nobody: the word "Stop" beside the name field, as it stands beside a person's name */
.talking-bar .talking-askrow{display:flex;align-items:baseline;justify-content:space-between;gap:var(--s5)}
.talking-bar .talking-askrow>.field{flex:1 1 auto;min-width:0}
/* the word sits on the line of "Talking to"; its tap area is moved up three points, clear of the row beneath */
.talking-bar .talking-askrow>.tap{flex:none;white-space:nowrap;padding:14px 16px 8px 6px;margin:-14px -16px -8px -6px}

/* ---- the one word beside a work: "Add". The whole line under the caption takes the tap: 44 points tall and as wide
   as the picture, so a thumb finds it, and it shares no ground with the work above it. ---- */
.talking-add.link{display:block;width:100%;min-height:44px;margin:-11px 0;padding:11px 0;text-align:left;line-height:22px}
/* beside a document it is one more word in the row of words, grey until it is added; the room around it is the room
   the frame gives every word of that row (ortuzar.css), so that no two words of a row share any ground */
.talking-add.link.tap{width:auto;min-height:0;line-height:inherit}
.talking-add.link.tap[aria-pressed="true"]{color:var(--ink)}

/* ---- the list at the foot of the screen: one line and one black bar, so that it never hides the works ---- */
/* THE EXCEPTION: the frame draws a ruled, padded wrapper around the list. While the list has nothing to say (someone
   was chosen and nothing is added yet, or a form has the foot of the screen) the wrapper is not shown either. */
.talking-foot .talking-said{padding:3px 0 var(--s2)}
.talking-foot .talking-said.stopped{font-weight:500}
.talking-foot .talking-said .tap{margin-left:var(--s2)}
.talking-foot .talking-line{display:flex;justify-content:space-between;align-items:baseline;gap:var(--s4);padding:3px 0 11px}
/* who and how many: the count is always whole; a name too long for the line is cut with three dots */
.talking-foot .talking-for{display:flex;align-items:baseline;gap:6px;min-width:0;white-space:nowrap}
.talking-foot .talking-for>*{flex:none}
.talking-foot .talking-for>.tap,.talking-foot .talking-for>.md{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis}
.talking-foot .talking-done.primary{margin:0}
/* on a work's page the three actions lie across the foot of the phone, a few points over the list's own foot */
.talking-foot.onwork .talking-line{padding-bottom:6px}
.talking-foot .talking-acts .talking-doneword{font-weight:500}
.talking-foot .talking-done,.talking-foot .talking-doneword{position:relative}
.talking-foot [aria-busy=true]>.bar-words{visibility:hidden}
.talking-foot .talking-done>.bar-busy{position:absolute;left:0;right:0;top:0;bottom:0;display:flex;align-items:center;justify-content:center}
.talking-foot .talking-doneword>.bar-busy{position:absolute;right:11px;top:11px;white-space:nowrap}
.talking-foot .talking-for .tap{padding:11px 0;margin:-11px 0;min-width:0}
@media(min-width:900px){
  .talking-bar .talking-who{justify-content:flex-start;gap:var(--s6)}
  .talking-foot{display:flex;flex-wrap:wrap;align-items:center;gap:0 var(--s6)}
  .talking-foot .talking-said{flex:1 0 100%}
  .talking-foot .talking-line{flex:1 1 auto;padding-bottom:3px}
  .talking-foot .talking-done.primary{flex:none;width:auto;padding:11px 28px 12px}
}

/* ============================== THE JOURNAL ============================== */

/* ---- the one line ---- */
.journal .journal-line{max-width:640px}
.journal .journal-line .field{padding-top:0}
.journal .journal-line input{border-bottom-color:var(--ink)}
.journal .journal-readrow{display:flex;flex-wrap:wrap;align-items:baseline;gap:0 var(--s4);padding:13px 0 0}
.journal .journal-lines{padding-top:var(--s5)}
.journal .journal-lines .line{align-items:baseline}
.journal .journal-lines .line .tap{margin-left:var(--s3)}
.journal .journal-flash{padding-bottom:var(--s4);font-weight:500}
/* a want the saved line also read as: the sentence, and under it its two words, each with room for a thumb */
.journal .journal-wantoffer{font-weight:400}
.journal .journal-wantwords{display:flex;gap:var(--s6);padding-top:var(--s3)}

/* ---- the entries ---- */
.journal .entry{cursor:pointer}
.journal .entry .what p+p{margin-top:2px}
/* A person's name and a work's title each take a tap as ONE WHOLE RECTANGLE. A link in a sentence that runs over two
   lines is two pieces with other words beside each, and a thumb on it can land on its neighbour; so each of these is
   a box of its own (it wraps inside itself), and each work stands on a line of its own under the words that lead in.
   On a phone each is a tap area 44 points tall. The name borrows its 44 points from the room the entry already has
   above it and from the top of the plain line under it, so it adds no height; the first work borrows ten points from
   the foot of the plain line that leads in, so it stands right under those words. Beside a short name or title the
   entry is still the entry: a tap there opens it. No rule, no box, no colour is added. */
.journal .entry .who a,.journal .items a{display:inline-block}
@media(max-width:899px){
  .journal .entry .who a{position:relative;z-index:1;padding:12px 0 9px;margin:-12px 0 -9px}
  .journal .items li{padding:10px 0 11px}
  .journal .items li:first-child{padding-top:0}
  .journal .items a{position:relative;z-index:1;padding:10px 0 11px;margin:-10px 0 -11px}
}
.journal .journal-earlier{display:flex;flex-wrap:wrap;gap:0 var(--s4);padding:26px 0 var(--s2)}
@media(min-width:900px){
  .journal .entry{display:grid;grid-template-columns:280px minmax(0,1fr) 110px;column-gap:var(--s6)}
  .journal .entry .meta{text-align:right;margin:0}
  .journal .day,.journal .journal-lines,.journal .words{max-width:1000px}
}

/* ---- rows of a list with words to tap at the right: the pieces of a card, the things on the list ---- */
.journal ul.ruled{border-top:1px solid var(--rule)}
.journal ul.ruled .row{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:22px var(--s5)}
.journal ul.ruled .row .k{flex:1 1 180px;min-width:0}
.journal ul.ruled .row .k .sub{display:block}
.journal ul.ruled .row .v{display:flex;flex-wrap:wrap;gap:22px}
.journal ul.ruled .row .v .tap,.journal ul.ruled .row .v button.link.tap{padding:11px;margin:-11px}

/* ---- the card: what the line was read as ---- */
.journal .journal-linewas{padding-top:var(--s2)}
.journal .journal-linewas span{display:block}
.journal .journal-intro{padding-top:var(--s2)}
.journal .journal-from,.journal .field>.t-small{padding-top:var(--s1)}
.journal .journal-value{display:flex;flex-wrap:wrap;align-items:baseline;gap:0 var(--s4);padding:9px 0 4px}
.journal .journal-date{padding-top:var(--s2)}
.journal .journal-wants{padding-top:var(--s5)}
.journal .journal-said{padding-top:var(--s4)}
.journal .journal-said.stopped{font-weight:500}
.journal .journal-after{display:flex;flex-wrap:wrap;align-items:baseline;gap:22px var(--s4);padding-top:26px}
.journal .journal-hint{padding-top:var(--s4)}
.journal .journal-workline{margin-top:var(--s1)}

/* ---- one entry ---- */
.journal .journal-entrytext{max-width:34em;padding-bottom:var(--s2)}
.journal .journal-entrytext p+p{margin-top:2px}
.journal .journal-delete{padding-top:var(--s6)}
.journal .journal-acts{display:flex;gap:22px;padding-top:22px}
.journal .journal-acts .tap,.journal .journal-acts button.link.tap{padding:11px;margin:-11px}

/* ---- "Interest" on a work's page: each line is a link to the person, at least 44 points tall ---- */
.journal-interest .lines{margin-top:-9px}
.journal-interest .lines li{padding:0}
.journal-interest .lines li>a,.journal-interest .lines li>span{display:block;padding:11px 0;min-height:44px}

/* ---- "Review": the list in full ---- */
.journal .journal-listfields{padding-top:0}
.journal .talk-says{padding:var(--s2) 0 var(--s3)}
