/* The gym's email account (email-outbox.js): the Send email pop-up, the From / To lines used by every
   email pop-up, the Sent emails page and the Settings card. Uses only the tokens from style.css.
   Square corners, hairlines, 16px+ text. Loaded by index.html and team.html after x-common.css. */

/* ---------- From / To lines (any email pop-up) ---------- */
.gm-head { display: grid; margin: 14px 0 4px; border-top: 1px solid var(--line); }
.gm-head > div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line); }
.gm-head dt { color: var(--muted); font: 700 12px/1.2 var(--sans); text-transform: uppercase; letter-spacing: .08em; }
.gm-head dd { margin: 0; font: 500 16px/1.4 var(--sans); overflow-wrap: anywhere; }
.gm-addr { color: var(--muted); }
.gm-missing { color: var(--error); font-weight: 600; }

/* ---------- Send email pop-up ---------- */
.gm-pop .sheet-head h2 { margin-bottom: 4px; }
.gm-pop textarea { min-height: 180px; font: 16px/1.5 var(--sans); }
/* The send button is the big one: Cancel stays narrow. */
.modal-actions.gm-actions { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.gm-actions .btn { min-height: 56px; font-size: 16px; }
.gm-note { margin-top: 10px; color: var(--muted); font-size: 15px; }
.gm-pop .modal-actions + .gm-note { margin-top: 0; padding-top: 2px; }
.gm-nomail { margin-top: 14px; }

/* ---------- Reading a sent email ---------- */
.gm-subject { margin: 18px 0 8px; font: 800 19px/1.3 var(--sans); overflow-wrap: anywhere; }
.gm-body {
  padding: 14px 16px; background: var(--surface-2); box-shadow: inset 4px 0 0 var(--line-ctl);
  font: 16px/1.55 var(--sans); white-space: pre-wrap; overflow-wrap: anywhere;
}

/* ---------- Sent emails page ---------- */
.gm-from { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: -12px 0 24px; font-size: 16px; }
.gm-group + .gm-group { margin-top: 28px; }
h2.gm-day { margin: 0 0 8px; font: 700 15px/1.2 var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.gm-row { min-height: 72px; }
.gm-row .row-main strong { font-size: 17px; }
/* The subject wraps to two lines before it is cut, so it stays readable on a phone. */
.gm-row .row-main em { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 16px; color: var(--muted); overflow-wrap: anywhere; }
.gm-meta { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; max-width: 40%; color: var(--muted); font-size: 15px; text-align: right; }
.gm-meta .num { color: var(--text); font-weight: 600; font-size: 16px; }
.gm-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.gm-empty { font-size: 16px; line-height: 1.5; }
.gm-more { width: 100%; margin-top: 20px; }
@media (min-width: 620px) { .gm-more { width: auto; } }

/* ---------- Settings card and status ---------- */
.gm-status { display: inline-flex; align-items: center; gap: 8px; font: 700 16px/1.2 var(--sans); }
.gm-status.is-on { color: var(--ok); }
.gm-status.is-off { color: var(--error); }
.gm-dot { flex: none; width: 10px; height: 10px; background: currentColor; }
.gm-settings .gm-status { margin: 10px 0 6px; }
.gm-settings .gm-line { margin-top: 6px; font-size: 16px; line-height: 1.45; overflow-wrap: anywhere; }

@media (max-width: 380px) {
  .gm-head > div { grid-template-columns: 1fr; gap: 2px; }
  .gm-meta { max-width: 34%; }
}
