/* Compact microphone and Cancel / Send recording controls, embedded in chat text fields. */
.brm-voice-input{position:relative;display:flex;flex:1 1 auto;min-width:0;align-items:stretch;box-sizing:border-box}
.brm-voice-input>input{width:100%!important;min-width:0!important;max-width:100%!important;flex:1 1 auto;padding-right:46px!important}
.brm-voice-input>.brm-voice-mic{
 position:absolute;right:4px;top:50%;transform:translateY(-50%);
 width:38px;height:38px;min-width:38px;min-height:38px;
 padding:8px!important;display:flex;align-items:center;justify-content:center;
 border:0!important;background:transparent!important;box-shadow:none!important;
 color:#e2be80;cursor:pointer;border-radius:50%;
}
.brm-voice-input>.brm-voice-mic:disabled{opacity:.38;cursor:default}
.brm-voice-input svg,.brm-voice-play svg{display:block;width:21px;height:21px;flex:none;fill:none}
.brm-voice-input.is-recording>input{font-variant-numeric:tabular-nums;cursor:default}
.brm-voice-input.is-recording>.brm-voice-mic{color:#f0c4bc}
.brm-voice-player{display:inline-flex;align-items:center;gap:10px;min-height:43px;max-width:100%;margin-top:6px;padding:4px 12px 4px 5px;border:1px solid #a5895c88;border-radius:26px;background:#282116;color:#f4ddad}
.brm-voice-play{display:flex;align-items:center;justify-content:center;width:36px;height:36px;min-height:36px;min-width:36px;border:0!important;border-radius:50%;padding:7px!important;background:#ba945d!important;box-shadow:none!important;color:#160f09;cursor:pointer}
.brm-voice-play svg{fill:currentColor!important;stroke:none!important}
.brm-voice-play-label{font:12px/1.35 var(--app-font,Georgia,serif);overflow-wrap:anywhere}
.brm-voice-player audio{display:none!important}
#castle-room-compose .brm-voice-input,#traitorCompose .brm-voice-input,#compose .brm-voice-input{flex:1 1 auto}
@media(max-width:760px){
 .brm-voice-input>.brm-voice-mic{width:36px;height:36px;min-height:36px;min-width:36px}
}

/* Playback should read as a compact line inside the message, not another big box. */
.brm-voice-player{
 display:inline-flex;align-items:center;vertical-align:middle;gap:6px;
 min-height:28px;max-width:100%;margin:0;padding:0;
 border:0;border-radius:0;background:transparent;box-shadow:none;
}
.brm-voice-play{
 box-sizing:border-box;display:grid;place-items:center;
 width:29px;height:29px;min-width:29px;min-height:29px;
 margin:0;padding:6px!important;border:0!important;
 border-radius:50%;background:#ba945d!important;box-shadow:none!important;
 color:#160f09;
}
.brm-voice-play svg{display:block;width:15px!important;height:15px!important;fill:currentColor!important}
.brm-voice-play-label{
 white-space:nowrap;margin:0;
 font:12px/1.2 var(--app-font,Georgia,serif);
}

/* Shared compact sender identity for text and voice messages in every chat. */
.brm-chat-entry{display:block;min-width:0}
.brm-chat-byline{display:flex;align-items:flex-start;gap:7px;min-width:0}
.brm-chat-avatar{
 box-sizing:border-box;display:grid;place-items:center;
 width:29px;height:29px;min-width:29px;min-height:29px;flex:0 0 29px;
 margin:0;border:1px solid #c9a56d;border-radius:50%;
 overflow:hidden;background:#362820;color:#f0d8aa;
 font:13px/1 var(--app-font,Georgia,serif);
}
.brm-chat-avatar img{display:block;width:100%;height:100%;object-fit:cover;object-position:center 20%;border-radius:50%}
.brm-chat-identity{flex:1 1 auto;min-width:0}
.brm-chat-heading{display:flex;align-items:center;flex-wrap:wrap;column-gap:6px;row-gap:2px;min-height:29px}
.brm-chat-sender{display:inline!important;font:600 12px/1.2 var(--app-font,Georgia,serif);color:#efce8e!important}
.brm-chat-timestamp{font:10px/1.2 var(--app-font,Georgia,serif);font-variant-numeric:tabular-nums;white-space:nowrap;color:#bbad96}
.brm-chat-room{margin-left:auto;font-size:10px;color:#c4ab82}
.brm-chat-text{font-size:13px;line-height:1.35;margin:0!important;overflow-wrap:anywhere;white-space:pre-wrap}
.brm-voice-player.brm-voice-icon-only{
 display:inline-flex;align-items:center;min-height:29px;margin:0;padding:0;gap:6px;
 border:0;background:none;vertical-align:middle;
}
.brm-voice-icon-only .brm-voice-play{width:29px;height:29px;min-width:29px;min-height:29px}
.brm-voice-icon-only .brm-voice-play-label{display:inline;font-variant-numeric:tabular-nums;white-space:nowrap}
.brm-chat-footer{
 display:flex;align-items:center;justify-content:flex-end;
 min-height:11px;margin-top:2px;text-align:right;
}
.brm-chat-footer .brm-chat-timestamp{display:block;font-size:10px;line-height:1.1;color:#bba990}
.brm-chat-heading .brm-voice-player{margin-left:3px}
/* Existing chat wrappers should not introduce a second block around the byline. */
#castle-rooms .castle-room-message:has(.brm-chat-entry){padding:5px 8px}
#castle-rooms .castle-room-message .brm-chat-text{padding:0;background:none;border:0;margin:0!important;font-size:13px;line-height:1.35}
.bubble .brm-chat-heading{margin:0}
.bubble .brm-chat-text{margin:0!important;display:block;padding:5px 0 0;background:none!important;border:0!important}
.bubble:has(.brm-chat-entry){padding:7px 10px;border:1px solid #7f613e;border-radius:7px;background:#262019}
.bubble.mine:has(.brm-chat-entry){background:#401921;text-align:left}
.secret-entry .brm-chat-text{margin:0;padding:0}
.castle-archive-message .brm-chat-text{margin:0!important;line-height:1.35}
@media(max-width:760px){
 .brm-chat-byline{gap:6px}
 .brm-chat-heading{column-gap:5px}
}
