/* Compose-only layout: native controls and upload states retain their semantics. */
html body.ev-workspace.action-compose #ev-compose-attachment-slot:empty { display: none; }
html body.ev-workspace.action-compose #compose-content > form { padding: 0; min-width: 0; }
html body.ev-workspace.action-compose #compose-attachments { border-style: solid; }
html body.ev-workspace.action-compose .ev-attachment-heading {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 8px; min-width: 0;
}
html body.ev-workspace.action-compose .ev-attachment-heading .ev-section-label {
  display: flex; align-items: center; gap: 6px; margin: 0;
  font-size: 13px; line-height: 22px; text-transform: none; letter-spacing: normal;
}
html body.ev-workspace.action-compose .ev-attachment-heading .attach {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; margin: 0; padding: 9px 10px; font-size: 12px; white-space: normal;
}
html body.ev-workspace.action-compose .ev-attachment-heading .attach::before {
  margin: 0; line-height: 20px; flex-shrink: 0;
}
html body.ev-workspace.action-compose .ev-attachment-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px;
  background: var(--ev-soft); color: var(--ev-brand); font-size: 11px; font-weight: 700;
  line-height: 20px; font-family: inherit;
}
html body.ev-workspace.action-compose .ev-attachment-hint { margin-top: 6px; }
html body.ev-workspace.action-compose #attachment-list { margin: 8px 0 0; }
html body.ev-workspace.action-compose #attachment-list:empty { display: none; }
html body.ev-workspace.action-compose #attachment-list li {
  flex: 1 1 180px; width: 100%; min-width: 0; position: relative;
  align-items: center; padding: 8px; gap: 4px; white-space: normal;
}
html body.ev-workspace.action-compose #attachment-list li::before { flex: 0 0 16px; }
html body.ev-workspace.action-compose #attachment-list li a.filename {
  flex: 1 1 0; min-width: 0; flex-direction: column; justify-content: center;
  padding: 0; line-height: 20px; order: 1;
}
html body.ev-workspace.action-compose #attachment-list li .attachment-name,
html body.ev-workspace.action-compose #attachment-list li a.filename {
  max-width: 100%; overflow-wrap: anywhere; word-break: break-word;
}
html body.ev-workspace.action-compose #attachment-list li .attachment-name {
  white-space: normal; overflow: visible; text-overflow: clip;
}
html body.ev-workspace.action-compose #attachment-list li .attachment-size { padding: 0; white-space: nowrap; font-size: 11px; }
html body.ev-workspace.action-compose #attachment-list li a.delete,
html body.ev-workspace.action-compose #attachment-list li a.cancelupload,
html body.ev-workspace.action-compose #attachment-list li a.dropdown {
  position: static; flex: 0 0 44px; min-width: 44px; min-height: 44px;
  line-height: 24px; padding: 10px; margin: 0; order: 3;
}
html body.ev-workspace.action-compose #attachment-list li a.dropdown { order: 2; }
html body.ev-workspace.action-compose .ev-compose-recipient-actions {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin: -2px 0 7px;
}
html body.ev-workspace.action-compose .ev-compose-recipient-actions button,
html body.ev-workspace.action-compose .ev-compose-retry {
  min-height: 44px; padding: 9px 12px; border: 1px solid var(--ev-border); border-radius: 8px;
  background: var(--ev-raised); color: var(--ev-brand); font: inherit; font-size: 12px;
  font-weight: 600; cursor: pointer;
}
html body.ev-workspace.action-compose .ev-compose-recipient-actions[hidden],
html body.ev-workspace.action-compose .ev-compose-recipient-actions button[hidden],
html body.ev-workspace.action-compose .ev-compose-feedback[hidden],
html body.ev-workspace.action-compose .ev-compose-retry[hidden] { display: none; }
html body.ev-workspace.action-compose #compose-headers .recipient-input {
  min-height: 44px; padding-top: 5px; padding-bottom: 5px; min-width: 0;
}
html body.ev-workspace.action-compose #compose-headers .recipient-input li.input { min-width: 60px; }
html body.ev-workspace.action-compose #compose-headers .recipient-input input { min-height: 32px; max-width: 100%; }
html body.ev-workspace.action-compose #compose-headers .input-group-text {
  min-height: 44px; min-width: 44px; justify-content: center;
}
html body.ev-workspace.action-compose .ev-compose-feedback {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px; order: 5; flex: 0 0 100%;
  padding: 7px 10px; border-radius: 8px; border: 1px solid var(--ev-border);
  background: var(--ev-raised); color: var(--ev-muted); font-size: 12px; line-height: 20px;
  min-width: 0;
}
html body.ev-workspace.action-compose .ev-compose-feedback-text { flex: 1 1 180px; overflow-wrap: anywhere; }
html body.ev-workspace.action-compose .ev-compose-feedback[data-state="confirmation"] {
  background: var(--ev-soft); color: var(--ev-text); border-color: var(--ev-brand);
}
html body.ev-workspace.action-compose .ev-compose-feedback[data-state="error"],
html body.ev-workspace.action-compose .ev-compose-feedback[data-state="warning"] {
  border-color: #b97618; color: var(--ev-text);
}
html body.ev-workspace.action-compose .ev-compose-retry { flex: 0 0 auto; background: var(--ev-surface); }
html body.ev-workspace.action-compose .ev-compose-recipient-actions button:focus-visible,
html body.ev-workspace.action-compose .ev-compose-retry:focus-visible {
  outline: 2px solid var(--ev-brand); outline-offset: 2px;
}
@media (max-width: 1024px) {
  html body.ev-workspace.action-compose #layout {
    height: var(--ev-compose-visible-height, 100dvh) !important;
  }
  html body.ev-workspace.action-compose #ev-compose-attachment-slot { flex: 0 0 auto; }
  html body.ev-workspace.action-compose #ev-compose-attachment-slot #compose-attachments {
    margin: 0 0 12px; padding: 8px 10px; border-radius: 10px; background: var(--ev-raised);
  }
  html body.ev-workspace.action-compose #ev-compose-attachment-slot .ev-attachment-hint { display: none; }
  html body.ev-workspace.action-compose #ev-compose-attachment-slot #attachment-list { gap: 6px; }
  html body.ev-workspace.action-compose #ev-compose-attachment-slot #attachment-list li { flex-basis: 230px; }
  html body.ev-workspace.action-compose #compose-headers { min-width: 0; }
  html body.ev-workspace.action-compose #compose-subject { min-height: 44px; }
}
@media (max-width: 767px) {
  html body.ev-workspace.action-compose #compose-content { padding: 10px; scroll-padding-block: 16px; }
  html body.ev-workspace.action-compose #compose-headers .recipient-input input { font-size: 16px; }
  html body.ev-workspace.action-compose #compose-headers .col-form-label { font-size: 12px; }
  html body.ev-workspace.action-compose #composebody { padding: 16px; min-height: 280px; line-height: 1.7; }
  html body.ev-workspace.action-compose #layout-content.ev-composer > .header {
    padding-top: max(6px, env(safe-area-inset-top));
  }
  html body.ev-workspace.action-compose .ev-compose-feedback { padding: 6px 8px; }
  html body.ev-workspace.action-compose .ev-compose-recipient-actions { margin-bottom: 4px; }
  html body.ev-workspace.action-compose #ev-mobile-nav { display: none; }
}
