/* ASM Course Planner v0.7.11 manual email UI */
html.asm-email-open, html.asm-email-open body { overflow: hidden !important; }
.asm-email-modal[hidden] { display: none !important; }
.asm-email-modal { position: fixed; inset: 0; z-index: 100000; font-family: inherit; color: #23364c; }
.asm-email-backdrop { position: absolute; inset: 0; background: rgba(10, 24, 42, .66); backdrop-filter: blur(3px); }
.asm-email-dialog { position: absolute; inset: 3vh 2vw; margin: auto; width: min(1240px, 96vw); max-height: 94vh; display: flex; flex-direction: column; background: #fff; border-radius: 14px; box-shadow: 0 28px 80px rgba(0,0,0,.34); overflow: hidden; }
.asm-email-dialog-header { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; padding: 22px 28px 18px; border-bottom: 1px solid #dbe3ed; background: linear-gradient(135deg,#f8fbff,#eef4fc); }
.asm-email-dialog-header h2 { margin: 3px 0 4px; color: #173b66; font-size: 24px; }
.asm-email-eyebrow { color: #4d76bc; font-weight: 800; letter-spacing: .09em; font-size: 11px; }
.asm-email-from-line { margin: 0; font-size: 13px; color: #53657a; }
.asm-email-close { width: 38px; height: 38px; border: 1px solid #cbd6e3; border-radius: 9px; background: #fff; color: #53657a; font-size: 25px; line-height: 1; cursor: pointer; }
.asm-email-status { padding: 10px 28px; font-size: 13px; border-bottom: 1px solid #dbe3ed; background: #edf5ff; color: #244d78; }
.asm-email-status[data-type="error"] { background: #fff0f0; color: #9b2424; }
.asm-email-status[data-type="success"] { background: #eef9f1; color: #176634; }
.asm-email-dialog-body { display: grid; grid-template-columns: minmax(360px, .9fr) minmax(440px, 1.1fr); min-height: 0; overflow: hidden; flex: 1; }
.asm-email-compose, .asm-email-preview-pane { overflow: auto; padding: 22px 28px 28px; }
.asm-email-compose { border-right: 1px solid #dbe3ed; }
.asm-email-compose label { display: block; margin-bottom: 14px; color: #344b64; font-size: 12px; font-weight: 700; }
.asm-email-compose input[type="text"], .asm-email-compose textarea { display: block; width: 100%; box-sizing: border-box; margin-top: 6px; border: 1px solid #b9c7d7; border-radius: 8px; background: #fff; color: #172b43; font: inherit; font-size: 14px; padding: 10px 12px; }
.asm-email-compose textarea { resize: vertical; min-height: 210px; line-height: 1.5; }
.asm-email-compose input:focus, .asm-email-compose textarea:focus { outline: 3px solid rgba(77,118,188,.18); border-color: #4d76bc; }
.asm-email-extra-recipients { margin: -5px 0 13px; padding: 8px 10px; border: 1px solid #dbe3ed; border-radius: 8px; }
.asm-email-extra-recipients summary { color: #48627f; cursor: pointer; font-size: 12px; font-weight: 700; }
.asm-email-extra-recipients label { margin-top: 10px; }
.asm-email-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.asm-email-section-heading h3, .asm-email-history-panel h3 { margin: 0 0 10px; color: #173b66; font-size: 14px; }
.asm-email-section-heading span { color: #6b7d91; font-size: 12px; }
.asm-email-attachments { margin-top: 18px; padding-top: 16px; border-top: 1px solid #dbe3ed; }
.asm-email-attachment-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; margin: 6px 0; padding: 8px 10px; border: 1px solid #dbe3ed; border-radius: 7px; background: #f9fbfd; color: #2a4058; font-size: 12px; font-weight: 600; }
.asm-email-attachment-item small { color: #718196; font-weight: 400; }
.asm-email-attachment-item button { border: 0; background: none; color: #a42b2b; cursor: pointer; font-size: 11px; }
.asm-email-file-picker { display: inline-block !important; margin: 8px 0 !important; padding: 9px 12px; border: 1px dashed #4d76bc; border-radius: 7px; color: #2e5f98 !important; cursor: pointer; background: #f3f8fe; }
.asm-email-file-picker input { display: none; }
.asm-email-hint { margin: 8px 0 0; color: #697c91; font-size: 11px; line-height: 1.4; }
#asm-email-preview-frame { width: 100%; min-height: 590px; border: 1px solid #cbd6e3; border-radius: 8px; background: #f3f6fa; }
#asm-email-refresh { border: 1px solid #b9c7d7; border-radius: 6px; background: #fff; color: #315b8d; padding: 6px 9px; cursor: pointer; font-size: 11px; }
.asm-email-history-panel { margin-top: 18px; border-top: 1px solid #dbe3ed; padding-top: 16px; }
.asm-email-history-item { display: grid; gap: 2px; padding: 9px 10px; margin: 6px 0; border-left: 4px solid #4d76bc; background: #f7f9fc; font-size: 11px; }
.asm-email-history-item[data-status="failed"] { border-left-color: #c23a3a; }
.asm-email-history-item strong { color: #253e59; }
.asm-email-history-item span, .asm-email-history-item small { color: #66798e; }
.asm-email-dialog-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 15px 28px; border-top: 1px solid #dbe3ed; background: #f7f9fc; }
.asm-email-dialog-footer button { border: 0; border-radius: 8px; padding: 10px 18px; background: #2e68aa; color: #fff; font-weight: 700; cursor: pointer; }
.asm-email-dialog-footer button:disabled { opacity: .6; cursor: wait; }
.asm-email-dialog-footer .asm-email-secondary { margin-right: 8px; background: #e7edf4; color: #3d536b; }
.asm-email-manual-note { max-width: 660px; color: #64778c; font-size: 11px; }
.asm-email-send-trigger { position: relative; }
.asm-email-send-trigger::after { content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%; background: #4d76bc; vertical-align: middle; }
.asm-email-sent::after { background: #2f8a4d; }
.asm-hidden-individual-group-comment { display: none !important; }
.asm-trainer-group-comment { margin: 8px 6px 10px; }
.asm-trainer-group-comment label { display: block; color: #233d5a; font-size: 11px; font-weight: 700; }
.asm-trainer-group-comment textarea { box-sizing: border-box; width: 100%; min-height: 72px; margin-top: 5px; padding: 8px 10px; resize: vertical; border: 1px solid #c5bda9; border-radius: 8px; background: #fff; color: #24364b; font: inherit; font-size: 12px; }
.asm-trainer-group-comment small { display: block; margin-top: 4px; color: #748397; font-size: 9px; font-weight: 400; }
@media (max-width: 900px) {
  .asm-email-dialog { inset: 1vh 1vw; width: 98vw; max-height: 98vh; }
  .asm-email-dialog-body { display: block; overflow: auto; }
  .asm-email-compose, .asm-email-preview-pane { overflow: visible; padding: 18px; }
  .asm-email-compose { border-right: 0; border-bottom: 1px solid #dbe3ed; }
  .asm-email-dialog-footer { align-items: flex-start; flex-direction: column; }
  #asm-email-preview-frame { min-height: 500px; }
}
@media (prefers-color-scheme: dark) {
  .asm-email-dialog { background: #17212c; color: #e7edf5; }
  .asm-email-dialog-header, .asm-email-dialog-footer { background: #1d2b39; border-color: #344657; }
  .asm-email-dialog-header h2, .asm-email-section-heading h3, .asm-email-history-panel h3 { color: #e8f2ff; }
  .asm-email-compose { border-color: #344657; }
  .asm-email-compose label { color: #c8d4e1; }
  .asm-email-compose input[type="text"], .asm-email-compose textarea, .asm-email-close { background: #111a24; color: #e7edf5; border-color: #45596d; }
  .asm-email-attachment-item, .asm-email-history-item { background: #1d2a37; border-color: #3c5064; color: #e0e8f1; }
}
.asm-email-original-mark-control { display: none !important; }
.asm-email-checkbox-proxy { appearance: none; border: 0; border-radius: 7px; padding: 8px 13px; background: #2e68aa; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
