/* email.css: the styles of screens/email.js and core/gmail.js. OWNER: the email 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 line at the top: the way back, and what the sheet does ---- */
.email .crumb>span{display:block;flex:0 1 auto;text-align:right}
/* The name of the screen is where the app puts the keyboard's place when a screen is come to. It is not a control,
   so it is never drawn in a frame (after typing, a browser would otherwise draw one round it). */
.email .head h1:focus-visible{outline:0}

/* ---- the sheet: one column on the phone. The form, then the email as it will read, then the black bar. ---- */
.email .email-top{padding-bottom:0}
.email .email-foot{padding-bottom:var(--s7)}

/* ---- "To": the shared name field. Nobody is added to Contacts from a name alone here, so the field's own offer of
   a new contact is left out, and its line about one too when what was typed is an address. ---- */
.email .email-to .sugg li:has(> button.pick.grey){display:none}
.email .email-to-plain .hint{display:none}
.email .email-hint{padding-top:var(--s1)}
.email .email-note{padding-top:var(--s3)}
/* an address can be long: it breaks inside the line and never widens the page */
.email .email-addresses button.link.tap{max-width:100%;overflow-wrap:anywhere;text-align:left}

/* ---- the subject: the gallery's own words, shown and not typed ---- */
.email .email-subject{padding-top:var(--s1)}

/* ---- the items, ruled like a list. Under each: its own small switch, the link that will be sent, and Remove.
   The words of that line stand 44 points apart when they wrap, and 24 apart side by side, so that no two areas
   that take a tap share any ground. ---- */
.email .email-items{border-top:1px solid var(--rule);margin-top:var(--s2)}
.email .email-items li{padding:var(--s3) 0 0;border-bottom:1px solid var(--rule)}
.email .email-ctl{display:flex;flex-wrap:wrap;align-items:baseline;gap:26px var(--s5);padding:13px 0}
.email .email-ctl button.link.tap.email-remove{margin-left:auto}

/* ---- the email as it will read: plain text in the reading face, as Gmail will show it. Nothing in it takes a tap. ---- */
.email .email-right{padding-top:var(--s5)}
.email .email-right>.label{display:block;margin-bottom:var(--s2)}
.email .email-preview .prose>*+*{margin-top:var(--s3)}
.email .email-links{list-style:disc;padding-left:var(--s5)}
.email .email-linked{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}

/* ---- above the black bar: what went wrong, in a full sentence; then whether Google is signed in to. The sentence
   can be long (it says what to do), so it stands in the page, not on the bar, and the sheet brings it into view
   when it is first said. ---- */
.email .email-say{padding-top:var(--s5)}
.email .email-say p+p{margin-top:var(--s2)}
.email .email-sign{padding-top:var(--s5)}
/* a long sentence on the bar wraps; it is kept clear of the edges of the screen */
.email .savebar .primary{padding-left:var(--gutter);padding-right:var(--gutter)}

/* ---- afterwards, and when nothing has been added ---- */
.email .email-done{padding-top:var(--s4)}
.email .email-more{padding-top:var(--s3)}
.email .email-more p+p{margin-top:var(--s2)}
.email .email-back{padding-top:var(--s6)}
.email .email-empty p+p{margin-top:var(--s3)}

/* ---- the same sheet on a Mac: the form on the left, the email as it will read beside it ---- */
@media(min-width:900px){
  .email .email-sheet{display:grid;grid-template-columns:minmax(0,440px) minmax(0,34em);column-gap:var(--s8);align-items:start;grid-template-areas:"top right" "foot right"}
  .email .email-top{grid-area:top}
  .email .email-right{grid-area:right}
  .email .email-foot{grid-area:foot;padding-bottom:0}
  .email .savebar .primary{padding-left:var(--s4);padding-right:var(--s4)}
  .email .email-done{max-width:34em}
  .email .email-more{max-width:34em}
}
