/* Locked messages. Uses the site type scale and the same large tap targets. */
.e2ee-lock {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 0 auto 1rem;
  max-width: 40rem;
  padding: 0.9rem 1rem;
  background: #fff;
  border: 2px solid #d9c8a4;
  border-radius: 12px;
  font-size: 1.05rem;
  line-height: 1.4;
  text-align: left;
}
.e2ee-lock-icon { flex: 0 0 auto; margin-top: 0.1rem; }
.e2ee-state {
  margin: 0.2rem 0 0;
  font-size: 0.95rem;
  color: var(--muted, #5c5346);
}
.e2ee-backup {
  margin: 1.5rem auto 0;
  max-width: 40rem;
  text-align: left;
}
.e2ee-backup h2 { font-size: 1.4rem; margin: 0 0 0.5rem; }
.e2ee-backup label { display: block; font-weight: 700; margin: 0.75rem 0 0.35rem; }
.e2ee-backup input {
  width: 100%;
  min-height: 48px;
  font: inherit;
  padding: 0.6rem 0.8rem;
  border: 2px solid #c8b89a;
  border-radius: 10px;
  box-sizing: border-box;
}
.e2ee-backup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.8rem;
}
.e2ee-backup-actions .btn { min-height: 48px; }
.e2ee-backup-status { min-height: 1.4em; margin: 0.6rem 0 0; }
body.high-contrast .e2ee-lock,
body.simple-mode .e2ee-lock {
  background: #fff;
  color: #000;
  border: 2px solid #000;
}
body.high-contrast .e2ee-state,
body.simple-mode .e2ee-state { color: #000; }
body.high-contrast .e2ee-backup input,
body.simple-mode .e2ee-backup input {
  background: #fff;
  color: #000;
  border-color: #000;
}

/* Correct a sent note, and show whether it was stored or opened. */
.dm-more {
  flex: 0 0 48px;
  width: 48px;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--primary, #2E5E4E);
  cursor: pointer;
  font: inherit;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
}
.dm-row.mine .dm-bubble { max-width: calc(100% - 108px); }
.dm-edit-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.35rem;
}
.dm-edit-choice {
  min-height: 48px;
  min-width: 48px;
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  border: 2px solid var(--primary, #2E5E4E);
  background: #fff;
  color: var(--primary, #2E5E4E);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.dm-edit-choice.dm-edit-go { background: var(--primary, #2E5E4E); color: #fff; }
.dm-edit-note { margin: 0; flex: 1 1 12rem; }
.dm-row[data-editing="1"] { width: min(100%, 28rem); max-width: 100%; align-self: stretch; }
.dm-edit-form { width: 100%; }
.dm-edit-label { display: block; font-weight: 700; margin-bottom: 0.35rem; }
.dm-edit-input {
  display: block;
  width: 100%;
  min-height: 48px;
  box-sizing: border-box;
  font: inherit;
  padding: 0.6rem 0.75rem;
  border: 2px solid var(--primary, #2E5E4E);
  border-radius: 8px;
  background: #fff;
  color: var(--text, #2B2B2B);
}
.dm-edit-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.dm-edit-actions .btn { min-height: 48px; }
.dm-edit-error { color: #8a1c0c; margin: 0.4rem 0 0; }
.dm-edit-error[hidden] { display: none !important; }
.dm-time { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.dm-edited { font-weight: 700; }
.dm-receipt {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
}
.dm-receipt-marks {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.12em;
  line-height: 1;
}
.dm-receipt-delivered { color: #2E5E4E; }
.dm-receipt-read { color: #0b57d0; }
body.high-contrast .dm-more,
body.simple-mode .dm-more,
body.high-contrast .dm-edit-choice,
body.simple-mode .dm-edit-choice,
body.high-contrast .dm-edit-input,
body.simple-mode .dm-edit-input {
  background: #fff;
  color: #000;
  border-color: #000;
}
body.high-contrast .dm-edit-choice.dm-edit-go,
body.simple-mode .dm-edit-choice.dm-edit-go { background: #000; color: #fff; }
body.high-contrast .dm-receipt-delivered,
body.simple-mode .dm-receipt-delivered,
body.high-contrast .dm-edited,
body.simple-mode .dm-edited { color: #000; }
body.high-contrast .dm-receipt-read,
body.simple-mode .dm-receipt-read { color: #003399; }
