/* Voice memos, laid out as iMessage lays out audio messages (web/opal-memo.js). */

.memo-btn { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: var(--ink); color: #ffffff;
  display: flex; align-items: center; justify-content: center; cursor: pointer; }
.memo-btn svg { width: 20px; height: 20px; }
.memo-btn[hidden], .send[hidden] { display: none; }

/* While she records, the recorder takes the whole box. */
.composer-box.recording > :not(.memo-panel) { display: none; }
.memo-panel { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.memo-panel[hidden] { display: none; }
.memo-panel button { flex: none; border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.memo-cancel, .memo-delete { width: 40px; height: 40px; border-radius: 50%; background: #f0f0f0; color: var(--soft); }
.memo-cancel svg, .memo-delete svg { width: 18px; height: 18px; }
.memo-stop { width: 40px; height: 40px; border-radius: 50%; background: #fdecec; color: #d93a32; }
.memo-stop svg { width: 18px; height: 18px; }
.memo-send { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #ffffff; }
.memo-send svg { width: 19px; height: 19px; }
.memo-send:disabled { background: #f0f0f0; color: #a9a9a9; }
.memo-live, .memo-review { flex: 1; min-width: 0; height: 44px; display: flex; align-items: center; gap: 10px;
  padding: 0 14px; border-radius: 22px; background: var(--subtle); }
.memo-live { background: #fff4f3; }
.memo-dot { width: 9px; height: 9px; flex: none; border-radius: 50%; background: #d93a32; animation: memo-pulse 1.1s ease-in-out infinite; }
@keyframes memo-pulse { 50% { opacity: .35; } }
.memo-time { flex: none; font-size: 13px; font-weight: 500; color: var(--soft); font-variant-numeric: tabular-nums; }
.memo-live .memo-time { color: #d93a32; }

/* The waveform: bars from the loudness she recorded, filled as it plays. */
.memo-wave { flex: 1; min-width: 0; height: 26px; display: flex; align-items: center; gap: 2px; overflow: hidden; }
.memo-wave i { flex: 1; min-width: 2px; max-width: 4px; border-radius: 2px; background: #bdbdbd; }
.memo-live .memo-wave i { background: #e8857f; }
.memo-wave i.played { background: var(--ink); }

/* Her memo in the thread. */
.msg-you.memo { align-items: flex-end; }
.memo-bubble { display: flex; align-items: center; gap: 10px; width: min(300px, 70vw); padding: 10px 14px 10px 10px;
  background: var(--subtle); border-radius: 20px 20px 6px 20px; }
.memo-bubble .memo-play { width: 36px; height: 36px; flex: none; border: 0; border-radius: 50%; background: var(--ink);
  color: #ffffff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.memo-bubble .memo-play svg { width: 16px; height: 16px; }
.memo-bubble .memo-play:disabled { background: #d7d7d7; cursor: default; }
.memo-foot { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; color: var(--muted); }
.memo-foot.quiet { font-weight: 400; }
.memo-link { border: 0; padding: 0; background: none; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }
.msg-you.memo .memo-words { margin: 0; max-width: min(300px, 70vw); padding: 0 4px; background: none; font-size: 13px;
  line-height: 1.45; color: var(--soft); text-align: right; }

/* Her edit of a document Opal wrote. */
.doc-edit { width: 100%; box-sizing: border-box; min-height: 180px; padding: 12px 14px; border: 1px solid #d7d7d7;
  border-radius: 12px; font: inherit; font-size: 15px; line-height: 1.5; color: var(--text); resize: vertical; }
.doc-edit:focus { outline: none; border-color: var(--ink); }

@media (max-width: 760px) {
  .memo-btn { width: 40px; height: 40px; }
  .memo-bubble { width: min(260px, 72vw); }
}
