/* EV v367 — shared recording controls for Village, private/support and escrow chats. */
.ev-record-bar,.hvc-record,.evdm-record{
  align-items:center!important;justify-content:space-between!important;gap:12px!important;
  padding:10px 12px!important;border:1px solid rgba(239,68,68,.24)!important;
  border-radius:18px!important;background:linear-gradient(135deg,rgba(254,242,242,.98),rgba(255,255,255,.98))!important;
  color:#991b1b!important;box-shadow:0 8px 24px rgba(15,23,42,.08)!important;
}
.ev-record-buttons,.hvc-record>span:last-child,.evdm-record>span:last-child{
  display:flex!important;align-items:center!important;gap:8px!important;flex:0 0 auto!important;
}
.ev-voice-action,.ev-record-cancel,.ev-record-send,.hvc-cancel,.hvc-stop,
#chatCancelRecord,#chatStopRecord,#escrowCancelRecord,#escrowStopRecord{
  min-width:76px!important;height:38px!important;padding:0 14px!important;margin:0!important;
  border-radius:12px!important;border:1px solid rgba(148,163,184,.35)!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;
  font-size:12px!important;line-height:1!important;font-weight:950!important;cursor:pointer!important;
  transition:transform .12s ease,filter .12s ease,box-shadow .12s ease!important;
  box-shadow:0 6px 16px rgba(15,23,42,.08)!important;
}
.ev-voice-action:hover,.ev-record-cancel:hover,.ev-record-send:hover,.hvc-cancel:hover,.hvc-stop:hover,
#chatCancelRecord:hover,#chatStopRecord:hover,#escrowCancelRecord:hover,#escrowStopRecord:hover{transform:translateY(-1px)!important;filter:brightness(1.02)!important;}
.ev-voice-cancel,.ev-record-cancel,.hvc-cancel,#chatCancelRecord,#escrowCancelRecord{
  background:#fff!important;color:#334155!important;border-color:#cbd5e1!important;
}
.ev-voice-send,.ev-record-send,.hvc-stop,#chatStopRecord,#escrowStopRecord{
  background:#dc2626!important;color:#fff!important;border-color:#dc2626!important;box-shadow:0 8px 20px rgba(220,38,38,.24)!important;
}
html.dark .ev-record-bar,html.dark .hvc-record,html.dark .evdm-record{
  background:linear-gradient(135deg,rgba(69,10,10,.86),rgba(15,23,42,.96))!important;
  border-color:rgba(248,113,113,.35)!important;color:#fecaca!important;
}
html.dark .ev-voice-cancel,html.dark .ev-record-cancel,html.dark .hvc-cancel,
html.dark #chatCancelRecord,html.dark #escrowCancelRecord{
  background:#0f172a!important;color:#e2e8f0!important;border-color:#475569!important;
}
@media(max-width:520px){
  .ev-record-bar,.hvc-record,.evdm-record{gap:8px!important;padding:9px!important;font-size:11px!important;}
  .ev-voice-action,.ev-record-cancel,.ev-record-send,.hvc-cancel,.hvc-stop,
  #chatCancelRecord,#chatStopRecord,#escrowCancelRecord,#escrowStopRecord{min-width:68px!important;height:36px!important;padding:0 11px!important;}
}

/* While recording, the recording bar becomes the whole composer. The normal
   textarea, attachment, microphone and ordinary Send button stay hidden until
   the voice note is sent or cancelled. */
.ev-voice-recording-composer > :not(.ev-record-bar):not(.hvc-record):not(.evdm-record){
  display:none!important;
}
.ev-voice-recording-composer > .ev-record-bar.show,
.ev-voice-recording-composer > .hvc-record.show,
.ev-voice-recording-composer > .evdm-record.show{
  display:flex!important;
  width:100%!important;
  margin:0!important;
}


/* EV v373: enforce recording-only composer in every Village and Escrow layout.
   :has() is the immediate CSS path; the shared JS class remains the fallback. */
.ev-composer:has(> .ev-record-bar.show) > :not(.ev-record-bar),
.hvc-compose:has(> .hvc-record.show) > :not(.hvc-record),
.evdm-compose-inner:has(> .evdm-record.show) > :not(.evdm-record),
.chat-composer-inner:has(> .evdm-record.show) > :not(.evdm-record){display:none!important}
.ev-composer:has(> .ev-record-bar.show) > .ev-record-bar.show,
.hvc-compose:has(> .hvc-record.show) > .hvc-record.show,
.evdm-compose-inner:has(> .evdm-record.show) > .evdm-record.show,
.chat-composer-inner:has(> .evdm-record.show) > .evdm-record.show{display:flex!important;width:100%!important;margin:0!important}
body.ev-voice-recording-active .ev-composer.ev-voice-recording-composer,
body.ev-voice-recording-active .hvc-compose.ev-voice-recording-composer,
body.ev-voice-recording-active .evdm-compose-inner.ev-voice-recording-composer{min-height:58px!important}
