.mechtarik-compose-actions { display:flex; gap:4px; }
.mechtarik-voice {
  display:grid;
  place-items:center;
  width:44px;
  height:44px;
  border:0;
  border-radius:8px;
  cursor:pointer;
}
.mechtarik-voice {
  color:var(--mr-ink);
  background:transparent;
  touch-action:none;
  user-select:none;
  -webkit-touch-callout:none;
}
.mechtarik-voice:hover { background:var(--mr-paper); }
.mechtarik-voice[data-recording] { color:#8c362b; background:#f7e9e3; }
.mechtarik-voice:not([data-recording]) .mechtarik-voice-stop,
.mechtarik-voice[data-recording] .mechtarik-voice-mic { display:none; }
.mechtarik-voice:disabled { opacity:.55; cursor:default; }
.mechtarik-voice-status { margin:4px 0 0; color:var(--mr-muted); font-size:.875rem; line-height:1.25rem; }
.mechtarik-voice-status:empty { margin:0; }

body:has(.mechtarik-page) { --contact-dock-space:0px; }
body:has(.mechtarik-page) .contact-dock { display:none; }

@media (max-width: 700px), (pointer: coarse) and (hover: none) {
  body:has(.mechtarik-page) { padding-block-end:var(--mechtarik-compose-height, 112px); }
  .mechtarik-page { padding-block-end:0; }
  .mechtarik-page .mechtarik-chat {
    height:var(--mechtarik-chat-height, calc(100dvh - 80px));
    grid-template-rows:auto minmax(0, 1fr) var(--mechtarik-compose-height, 112px);
  }
  .mechtarik-page .mechtarik-compose {
    position:fixed;
    z-index:90;
    inset-inline:0;
    bottom:var(--mechtarik-viewport-inset, 0px);
    padding-block:8px max(8px, env(safe-area-inset-bottom));
    padding-inline:max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right));
    border-top:1px solid var(--mr-line);
    background:var(--mr-paper);
  }
  .mechtarik-page .mechtarik-compose textarea { resize:none; }
}


.mechtarik-input { position:relative; min-width:0; }
.mechtarik-input textarea { display:block; }
.mechtarik-input textarea[data-voice-progress]::placeholder { color:var(--mr-muted); opacity:1; }
.mechtarik-input:has(.mechtarik-input-hint:not([hidden])) { padding-block-end:18px; }
.mechtarik-input:has(.mechtarik-input-hint:not([hidden])) textarea {
  max-height:calc(var(--mechtarik-input-height, 3em) - 18px);
  padding-block-end:0;
  resize:none;
}
.mechtarik-input-hint {
  position:absolute;
  inset-inline:8px;
  bottom:2px;
  color:var(--mr-muted);
  font-size:.75rem;
  line-height:1rem;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  pointer-events:none;
}
