/* The Emails sub-tab of a firm's page (public/staff-pairing-emails.js):
   the choice of email and of who to preview it for, then the chosen
   email's panel, laid out as Sign-ups' Emails view is (.su-email-pick,
   .ae-templates, .attendance-email-actions, .ae-preview-box in
   styles.css). Only the staff site's own tokens and components: this file
   lays them out. */

.pe-intro { margin-bottom: 16px; }
.pe-panel .pe-pick { margin-bottom: 6px; }
.pe-email { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.pe-email-title { margin: 0 0 8px; }
.pe-email .hint { line-height: 1.45; }
.pe-email .field { margin-top: 12px; }
.pe-email .field small { display: block; margin-top: 6px; line-height: 1.45; }
.pe-email .field small code, .pe-placeholders code { color: var(--ink); }
.pe-email input, .pe-email textarea { width: 100%; }
.pe-email textarea { line-height: 1.5; resize: vertical; font-size: 0.95rem; }
.pe-email input[readonly], .pe-email textarea[readonly] { background: var(--blue-wash); color: var(--muted); }
.pe-readonly { color: var(--muted); }
.pe-placeholders { margin: 10px 0 0; }
.pe-placeholders summary { cursor: pointer; font-weight: 700; color: var(--blue); font-size: 0.9rem; }
.pe-placeholders ul { margin: 6px 0 0; padding-left: 20px; line-height: 1.6; color: var(--muted); font-size: 0.9rem; }
.pe-actions { margin-top: 14px; }
.pe-said.error { color: var(--danger); }
.pe-standing { margin: 8px 0 0; color: var(--muted); font-size: 0.85rem; }
.pe-not-configured { margin: 0 0 8px; color: var(--danger); }

/* Sending: who to, the count, Send and Schedule send, then the row the
   latter opens; and the firm's scheduled sends under the panel. */
.pe-send { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.pe-send .contract-sub { margin: 0 0 6px; }
.pe-send .hint { line-height: 1.45; }
.pe-send-pick { margin-top: 8px; }
.pe-send-pick .pe-expires { flex: 0 0 auto; }
.pe-send-pick .pe-expires input { width: auto; }
.pe-skip { margin: 8px 0 4px; }
.pe-count { margin: 6px 0 0; }
.pe-send-actions { margin-top: 10px; }
.pe-schedule { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px 12px; margin: 12px 0 0; background: var(--blue-wash); }
.pe-schedule .field { margin: 0 0 6px; }
.pe-schedule input { width: auto; }
.pe-schedule .hint { margin: 0 0 10px; }
.pe-send-said { margin: 10px 0 0; }
.pe-send-said.error { color: var(--danger); }
.pe-scheduled { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.pe-jobs { list-style: none; margin: 0; padding: 0; }
.pe-job { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); }
.pe-job:last-child { border-bottom: 0; }
.pe-job-when { color: var(--muted); font-size: 0.88rem; }
.pe-job-failed .pe-job-when { color: var(--danger); }
.pe-job-cancelled, .pe-job-sent { color: var(--muted); }
.pe-job .btn { margin-left: auto; }

@media (max-width: 760px) {
  .pe-email textarea, .pe-email input, .pe-schedule input { font-size: 16px; }
}

/* Attachments: the boxes under the panel, and the library at the foot. */
.pe-attachments { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.pe-attachments .contract-sub { margin: 0 0 6px; }
.pe-attachment-list { margin: 8px 0 0; }
.pe-attachment { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 4px 0; }
.pe-attachment .pm-check { display: flex; align-items: flex-start; gap: 10px; margin: 0; }
.pe-attachment small { color: var(--muted); }
.pe-attachment-link { font-size: 0.88rem; }
.pe-attachment-actions { margin-top: 10px; }
.pe-attachments-said.error, .pe-upload-said.error { color: var(--danger); }
.pe-library { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.pe-files { list-style: none; margin: 0; padding: 0; }
.pe-file { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); }
.pe-file:last-child { border-bottom: 0; }
.pe-file small, .pe-file-standard { color: var(--muted); font-size: 0.88rem; }
.pe-file .btn { margin-left: auto; }
.pe-file .btn + .btn { margin-left: 0; }
.pe-upload { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin-top: 12px; }
.pe-upload .field { margin: 0; }
.pe-upload input[type="file"] { width: auto; }
