.chat-media-album { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:2px; width:260px; max-width:100%; overflow:hidden; border-radius:8px; }
.chat-media-single { grid-template-columns:minmax(0,1fr); }
.chat-media-album > :last-child:nth-child(odd):not(:first-child) { grid-column:1 / -1; aspect-ratio:2 / 1; }
.chat-media-album button { position:relative; display:block; width:100%; min-width:0; height:auto; aspect-ratio:1; border:0; padding:0; overflow:hidden; background:#25272a; color:white; cursor:pointer; }
.chat-media-single .chat-video-tile { aspect-ratio:3/4; }
.message-image .chat-media-album img { display:block; width:100%; height:100%; max-width:none; max-height:none; object-fit:cover; border-radius:0; margin:0; }
.message-image .chat-media-album img[hidden] { display:none; }
.chat-video-play { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; pointer-events:none; }
.chat-video-play i { display:flex; align-items:center; justify-content:center; font-size:23px; width:44px; height:44px; border-radius:50%; background:rgba(0,0,0,.55); }
.chat-video-duration { position:absolute; right:6px; bottom:6px; padding:2px 5px; border-radius:4px; background:rgba(0,0,0,.7); color:white; font-size:12px; line-height:16px; }
.chat-gallery-video { position:relative; width:100%; height:100%; box-sizing:border-box; padding:calc(var(--f7-navbar-height,44px) + env(safe-area-inset-top,0px)) 0 calc(var(--f7-toolbar-height,48px) + env(safe-area-inset-bottom,0px)); }
.chat-gallery-video video { display:block; width:100%; height:100%; object-fit:contain; }
.chat-gallery-feedback { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); display:flex; flex-direction:column; align-items:center; gap:10px; width:max-content; max-width:85%; text-align:center; }
.chat-gallery-status { padding:6px 10px; background:rgba(255,255,255,.95); color:#222; border-radius:4px; font-size:14px; }
.chat-gallery-retry { padding:10px 14px; background:#fff; color:#1674e8; border:1px solid #ccc; border-radius:6px; cursor:pointer; }
.chat-gallery-status[hidden], .chat-gallery-retry[hidden] { display:none; }
.reply-video-caption { display:flex; align-items:center; gap:6px; min-width:0; }
.reply-video-caption i { flex:none; font-size:16px; }
.reply-video-caption span { min-width:0; overflow:hidden; text-overflow:ellipsis; }
