/* ============================================================
 *  email-ai.css: the bits the email-a-politician pages
 *  (/email-your-mp, /greens-paternity-policy) add to the standard
 *  action page look in shared/action-page.css: the story box, the email
 *  itself and its send buttons. Load after action-page.css.
 * ============================================================ */

/* The email step is wider than the other steps so the letter reads well. */
.solo.wide { max-width: 720px; }

/* Story box: their words, in a different voice to the page. Grows to fit. */
textarea { width: 100%; font: 400 16px/1.5 "Figtree", Arial, sans-serif; color: var(--ink); background: #fff; border: 1.5px solid #8A8F86; border-radius: calc(var(--r) * .83); padding: 10px 12px; resize: vertical; }
textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(20,20,20,.08); }
textarea.story { min-height: 120px; overflow: hidden; resize: none; font-family: Georgia, "Times New Roman", serif; font-style: italic; }
.tick { display: flex; gap: 10px; align-items: center; font-size: 15px; cursor: pointer; }
.tick input { width: 20px; height: 20px; accent-color: var(--ink); margin: 0; flex: none; }

/* The email: subject line + body in one bordered block. On phones it runs
   edge to edge of the page column (no boxes inside boxes). */
.mail { border: 1.5px solid #8A8F86; border-radius: var(--r); background: #fff; overflow: hidden; }
/* The subject is a one-line box that wraps onto more lines for a long
   subject, so the end is never cut off (email-ai.js sizes it). */
.mail .subj { display: flex; align-items: flex-start; gap: 0; border-bottom: 1.5px solid #8A8F86; font-weight: 400; }
.mail .subj span { font-size: 12px; line-height: 22px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--mute); padding: 12px 0 0 12px; flex: none; }
.mail .subj textarea { flex: 1 1 auto; width: auto; min-width: 0; min-height: 0; height: 46px; padding: 12px; border: 0; border-radius: 0; font: 700 16px/22px "Figtree", Arial, sans-serif; font-style: normal; resize: none; overflow: hidden; box-shadow: none; display: block; }
.mail .subj textarea:focus { background: #FFFBEA; box-shadow: none; }
.mail textarea { border: 0; border-radius: 0; min-height: 360px; display: block; }
.mail textarea:focus { box-shadow: none; background: #FFFEF7; }

/* "Writing your email" bar: eases toward 92%, completes when it lands. */
.writing-bar { height: 10px; background: var(--track); border-radius: 99px; overflow: hidden; }
.writing-bar i { display: block; height: 100%; width: 0; background: var(--y); border-radius: 99px; transition: width .35s ease-out; }

/* The send links are real email links: greyed out until the email exists. */
.cta[aria-disabled=true], .alt-sends a[aria-disabled=true] { opacity: .5; pointer-events: none; }
a.cta { cursor: pointer; }
.alt-sends { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; justify-content: center; margin: 0; font-size: 14.5px; }
.alt-sends span { color: var(--mute); }
.alt-sends a, .alt-sends button { background: none; border: 0; padding: 4px 0; font: 700 14.5px/1 "Figtree", Arial, sans-serif; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.alt-sends button:disabled { opacity: .5; cursor: default; }
.solo > .hint { text-align: center; }
.send-help { display: grid; gap: 10px; background: var(--warn); border-radius: var(--r); padding: 12px 14px; }
.send-help p { margin: 0; font-size: 15px; }
.send-help .hint { text-align: left; }

@media (max-width: 759px) {
  /* Phones: the email takes the full width of the page column, so the
     letter isn't squeezed into a box inside a box. */
  .mail { border-left: 0; border-right: 0; border-radius: 0; margin: 0 -16px; }
  .mail textarea { min-height: 300px; padding: 12px 16px; }
  .mail .subj span { padding-left: 16px; }
  .mail .subj textarea { min-height: 0; padding: 12px 16px 12px 12px; }
}
@media (min-width: 760px) {
  /* On the yellow desktop page, the greyed "open again" button stays grey. */
  .cta.second { background: var(--grey-btn); color: var(--ink); }
}

/* Personal-link visitors: their story card above their details. */
[data-role=link-story] p.body { margin: 0; font-size: 16px; }
