/* ============================================================================================
   ✉ EMAIL COMPOSER (#ec-sheet), SELF-CONTAINED for pages that do not load src/styles-re.css (the
   timeline, 29 Oct 2026). The same cream sheet as the homes feed: its chrome rules (.rf-*) are
   copied here SCOPED to #ec-sheet / #ec-backdrop, so loading this file changes nothing else on the
   page, and the composer rules (.ec-*) are the homes feed's own, unchanged (src/styles-re.css).
   Driven by src/re/contact.js (window.reEmail). Placement on the timeline: styles-timeline-actions.css.
   GENERATED from src/styles-re.css by hand-copy; keep the two in step when the composer changes.
   ============================================================================================ */
#ec-sheet, #ec-backdrop {
  --cream: #FAF5DE; --cream-hi: #FFFDF2; --ink: #2C2820; --muted: #968B6E;
  --line: #EAE1C0; --teal: #0E7E8C; --teal-dk: #0B6675; --teal-soft: #E2F0F1; --rf-ease: cubic-bezier(.22,1,.36,1);
}
#ec-backdrop.rf-backdrop { position: absolute; inset: 0; z-index: 40; background: rgba(8,8,10,.55); opacity: 0; transition: opacity .38s cubic-bezier(.22,1,.36,1); }
#ec-backdrop.rf-backdrop.is-open { opacity: 1; }
#ec-backdrop.rf-backdrop[hidden] { display: none; }
#ec-sheet.rf-sheet {
  position: absolute; left: 50%; bottom: 0; z-index: 41;
  transform: translateX(-50%) translateY(100%);
  width: 95%; height: 95%; background: var(--cream); color: var(--ink);
  border-radius: 22px 22px 0 0; display: flex; flex-direction: column;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  transition: transform .42s cubic-bezier(.22,1,.36,1);
  box-shadow: 0 -8px 40px -12px rgba(0,0,0,.45);
}
#ec-sheet.rf-sheet.is-open { transform: translateX(-50%) translateY(0); }
#ec-sheet.rf-sheet[hidden] { display: none; }
#ec-sheet .rf-grab { flex: 0 0 auto; padding: 10px 0 4px; display: flex; justify-content: center; }
#ec-sheet .rf-grab span { width: 38px; height: 5px; border-radius: 3px; background: var(--line); }
#ec-sheet .rf-head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 2px 20px 12px; }
#ec-sheet .rf-title-wrap { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
#ec-sheet .rf-title { font-size: 22px; font-weight: 700; margin: 0; letter-spacing: -.01em; color: var(--ink); }
#ec-sheet .rf-sub { font-size: 12px; color: var(--muted); }
#ec-sheet .rf-x { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--cream-hi); color: var(--ink); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
#ec-sheet .rf-x svg { width: 17px; height: 17px; }
#ec-sheet .rf-body { flex: 1 1 auto; overflow-y: auto; padding: 4px 20px 16px; }
#ec-sheet .rf-foot { flex: 0 0 auto; display: flex; align-items: center; gap: 14px; padding: 13px 20px calc(13px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--cream); }
#ec-sheet .rf-clear { background: none; border: 0; font-family: inherit; font-size: 14px; font-weight: 500; color: var(--muted); cursor: pointer; padding: 8px 4px; }
#ec-sheet .rf-clear:hover { color: var(--ink); }
#ec-sheet .rf-apply { flex: 1; font-family: inherit; font-size: 15px; font-weight: 600; color: var(--cream-hi); background: var(--teal); border: 0; border-radius: 14px; padding: 14px 18px; cursor: pointer; }
#ec-sheet .rf-apply:hover { background: var(--teal-dk); }
#ec-sheet .rf-apply:disabled { background: #c9bf99; cursor: default; }

.ec-sheet { position: absolute; overflow: hidden; }         /* overflow so the success overlay clips to the rounded sheet */
.ec-body { display: flex; flex-direction: column; gap: 13px; padding-top: 12px; }
.ec-note {
  font-size: 12.5px; font-weight: 600; line-height: 1.45; color: #7a5a12;
  background: #FBEFC4; border: 1px solid #E6D496; border-radius: 11px; padding: 10px 12px;
}
.ec-note b { font-weight: 800; }

/* live-typed field card */
.ec-field {
  background: var(--cream-hi); border: 1.5px solid var(--line); border-radius: 14px;
  padding: 11px 13px 12px; transition: border-color .25s var(--rf-ease), box-shadow .25s var(--rf-ease);
}
.ec-field--msg { flex: 1 1 auto; display: flex; flex-direction: column; }
.ec-field.is-active { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft), 0 6px 18px -10px rgba(14,126,140,.5); }
.ec-label { display: block; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.ec-field.is-active .ec-label { color: var(--teal-dk); }
.ec-value {
  font-family: inherit; font-size: 15px; line-height: 1.5; color: var(--ink);
  min-height: 20px; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;
}
.ec-value--msg { min-height: 150px; flex: 1 1 auto; overflow-y: auto; }
.ec-value.is-empty::before { content: attr(data-placeholder); color: #b8ac86; font-style: italic; }
/* blinking caret (only present in the field currently being typed) */
.ec-caret {
  display: inline-block; width: 2px; height: 1.05em; vertical-align: text-bottom; margin-left: 1px;
  background: var(--teal); border-radius: 1px; animation: ec-blink 1.05s steps(2, start) infinite;
}
@keyframes ec-blink { 0%,50% { opacity: 1; } 50.01%,100% { opacity: 0; } }

/* "Zin is listening…" with a 3-bar equalizer */
.ec-listening { display: inline-flex; align-items: center; gap: 6px; color: var(--teal-dk); font-weight: 600; }
.ec-listening[hidden] { display: none; }
.ec-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.ec-eq i { width: 3px; height: 4px; background: var(--teal); border-radius: 2px; animation: ec-eq 900ms ease-in-out infinite; }
.ec-eq i:nth-child(2) { animation-delay: 150ms; }
.ec-eq i:nth-child(3) { animation-delay: 300ms; }
@keyframes ec-eq { 0%,100% { height: 4px; } 50% { height: 12px; } }

/* confirm strip (armed before any send/cancel — a YES is always required) */
.ec-confirm {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 20px; background: #FBEFC4; border-top: 1px solid #E6D496;
  animation: ec-slideup .28s var(--rf-ease);
}
.ec-confirm[hidden] { display: none; }
@keyframes ec-slideup { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.ec-confirm-q { font-size: 15px; font-weight: 700; color: #6b4e0e; }
.ec-confirm-btns { display: flex; gap: 8px; }
.ec-cbtn { font-family: inherit; font-size: 14px; font-weight: 700; border-radius: 11px; padding: 9px 18px; cursor: pointer; border: 1.5px solid transparent; }
.ec-cbtn--no { background: transparent; color: var(--muted); border-color: var(--line); }
.ec-cbtn--no:hover { color: var(--ink); border-color: var(--muted); }
.ec-cbtn--yes { background: var(--teal); color: var(--cream-hi); }
.ec-cbtn--yes:hover { background: var(--teal-dk); }

/* footer CTA — Send is the .rf-apply teal button; it pulses while a send is armed */
.ec-foot .ec-send.is-armed { animation: ec-pulse 1.1s ease-in-out infinite; }
@keyframes ec-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(14,126,140,.45); } 50% { box-shadow: 0 0 0 7px rgba(14,126,140,0); } }

/* success overlay — animated green check, then auto-close */
.ec-success {
  position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 18px; background: var(--cream);
  animation: ec-fadein .3s var(--rf-ease);
}
.ec-success[hidden] { display: none; }
@keyframes ec-fadein { from { opacity: 0; } to { opacity: 1; } }
.ec-check svg { width: 92px; height: 92px; }
.ec-check-ring { fill: none; stroke: #1a9e5f; stroke-width: 3; stroke-dasharray: 151; stroke-dashoffset: 151; animation: ec-draw .5s var(--rf-ease) forwards; }
.ec-check-tick { fill: none; stroke: #1a9e5f; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: ec-draw .35s .45s var(--rf-ease) forwards; }
@keyframes ec-draw { to { stroke-dashoffset: 0; } }
.ec-success-msg { font-size: 18px; font-weight: 700; color: var(--ink); margin: 0; opacity: 0; animation: ec-fadein .3s .55s var(--rf-ease) forwards; }
