/* Delivery: email button, inline email dialog, delivery log. Uses tokens from app.css. */
.delivery-svg {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* Full width even when placed inside a .btn-row. */
.email-box { flex: 1 1 100%; min-width: 0; }
.email-off-note { margin: 6px 0 0; color: var(--muted); font-size: 0.875rem; text-align: center; }

/* Inline dialog */
.email-dialog { margin: 4px 0 12px; border-color: var(--brand); }
.email-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -4px -8px 8px 0; }
.email-dialog-head h2 { margin: 0; }
.email-close { min-width: 44px; padding: 0; color: var(--muted); }

.email-recipients { border: 0; margin: 0 0 14px; padding: 0; min-width: 0; }
.email-recipients legend { padding: 0; }
.email-recipient {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 12px; margin-bottom: 8px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.email-recipient input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--brand); }
.email-recipient:has(input:checked) { border-color: var(--brand); background: #f3f7fb; }
.email-recipient-text { display: flex; flex-direction: column; min-width: 0; }
.email-recipient-name { font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.email-recipient-addr { color: var(--muted); font-size: 0.9rem; overflow-wrap: anywhere; }
.email-none { margin: 0; padding: 12px; border: 1px dashed var(--border); border-radius: var(--radius-sm); color: var(--muted); font-size: 0.9rem; }
.email-hint { color: var(--muted); font-size: 0.85rem; margin: -4px 0 14px; }
.email-dialog .btn-primary .saving-indicator { font-size: inherit; color: inherit; }
.email-dialog form.htmx-request .send-label { display: none; }

/* Result card */
.email-result { margin: 4px 0 12px; }
.email-result-title { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 6px; }
.email-result-body { margin-bottom: 10px; overflow-wrap: anywhere; }
.email-result-ok { border-color: var(--ok); }
.email-result-ok .email-result-title { color: var(--ok); }
.email-result-fail { border-color: var(--danger); }
.email-result-fail .email-result-title { color: var(--danger); }

/* Delivery log */
.delivery-log { flex: 1 1 100%; min-width: 0; }
.delivery-list { list-style: none; margin: 0 0 16px; padding: 0; }
.delivery-item {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; min-height: 60px;
  border-bottom: 1px solid var(--border);
}
.delivery-item:last-child { border-bottom: 0; }
.delivery-icon {
  width: 36px; height: 36px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: #eef1f5; color: var(--brand);
}
.delivery-to { font-weight: 600; overflow-wrap: anywhere; }
.delivery-item .row-sub { white-space: normal; }
.delivery-error { margin-top: 4px; color: var(--danger); font-size: 0.85rem; overflow-wrap: anywhere; }
.delivery-item .chip { margin-top: 2px; }
