/* Yappy iMessage v23 — expose the familiar message controls without disturbing the stable composer. */

/* The composer is the positioning context for the waveform/send control. */
html[data-social-app="imessage"] .imessage-v19 .composer{
  position:absolute!important;
}

/* Clock + sticker live side-by-side inside the iMessage field.
   They reuse the same controls/handlers as WhatsApp, so sender/time/status settings persist normally. */
html[data-social-app="imessage"] .imessage-v19 #cv-clock,
html[data-social-app="imessage"] .imessage-v19 #cv-sticker{
  display:grid!important;
  place-items:center!important;
  flex:0 0 31px!important;
  width:31px!important;
  min-width:31px!important;
  height:36px!important;
  margin:4px 0!important;
  padding:0!important;
  border:0!important;
  border-radius:18px!important;
  background:transparent!important;
  color:var(--im-sub)!important;
  opacity:1!important;
  visibility:visible!important;
}

html[data-social-app="imessage"] .imessage-v19 #cv-clock svg{
  width:19px!important;
  height:19px!important;
}

html[data-social-app="imessage"] .imessage-v19 #cv-sticker svg{
  width:22px!important;
  height:22px!important;
}

html[data-social-app="imessage"] .imessage-v19 #cv-clock:active,
html[data-social-app="imessage"] .imessage-v19 #cv-sticker:active{
  background:rgba(118,118,128,.12)!important;
}

/* Reserve one final slot for the waveform/send icon at the right edge of the field. */
html[data-social-app="imessage"] .imessage-v19 .composer-field-wrap{
  position:relative!important;
  gap:0!important;
  padding-right:43px!important;
}

/* Keep waveform/send fixed at the far-right of the input, after clock + sticker. */
html[data-social-app="imessage"] .imessage-v19 .voice-main{
  position:absolute!important;
  right:16px!important;
  bottom:calc(11px + env(safe-area-inset-bottom,0px))!important;
  margin:0!important;
  z-index:42!important;
}

html[data-social-app="imessage"] .imessage-v19 .voice-main.send-main{
  right:19px!important;
  bottom:calc(16px + env(safe-area-inset-bottom,0px))!important;
  margin:0!important;
}

/* On narrower phones keep all three controls compact but tappable. */
@media(max-width:390px){
  html[data-social-app="imessage"] .imessage-v19 #cv-clock,
  html[data-social-app="imessage"] .imessage-v19 #cv-sticker{
    width:29px!important;
    min-width:29px!important;
    flex-basis:29px!important;
  }
  html[data-social-app="imessage"] .imessage-v19 .voice-main{
    right:14px!important;
  }
  html[data-social-app="imessage"] .imessage-v19 .voice-main.send-main{
    right:17px!important;
  }
}
