/* One message keeps its identity, caption, replies, reactions and receipts. */
.chat-photo-album{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:3px;width:430px;max-width:100%;overflow:hidden;border-radius:10px;background:var(--line)}
.chat-photo-album>.chat-media-item{grid-column:span 2;aspect-ratio:1;min-width:0;min-height:0;overflow:hidden}
.chat-photo-album .chat-photo,.chat-photo-album .chat-photo-open{width:100%;height:100%;max-width:none;border-radius:0;aspect-ratio:auto}
.chat-photo-album .chat-photo img{object-fit:cover}
.chat-photo-album .chat-photo-open:focus-visible{outline:3px solid var(--accent-text);outline-offset:-3px}
.chat-photo-album .chat-photo-status{padding:8px;font-size:11px;line-height:1.4}
.chat-photo-album[data-photo-count="2"]{aspect-ratio:3/2;grid-template-rows:minmax(0,1fr)}
.chat-photo-album[data-photo-count="3"],.chat-photo-album[data-photo-count="4"]{aspect-ratio:1;grid-template-rows:repeat(2,minmax(0,1fr))}
.chat-photo-album[data-photo-count="5"]{aspect-ratio:10/11;grid-template-rows:minmax(0,3fr) minmax(0,2fr)}
.chat-photo-album:is([data-photo-count="2"],[data-photo-count="3"],[data-photo-count="4"],[data-photo-count="5"])>.chat-media-item{aspect-ratio:auto}
.chat-photo-album:is([data-photo-count="2"],[data-photo-count="3"],[data-photo-count="4"])>.chat-media-item{grid-column:span 3}
.chat-photo-album[data-photo-count="3"]>.chat-media-item:first-child{grid-row:span 2}
.chat-photo-album[data-photo-count="5"]>.chat-media-item:nth-child(-n+2){grid-column:span 3}
.bubble:has(.chat-photo-album)>.chat-media-list{margin-top:4px}
.bubble:has(.chat-photo-album)>p:not(:empty){margin-top:8px}
/* The existing per-file progress remains visible over its own thumbnail. */
.chat-photo-album>.chat-media-item{position:relative}
.chat-photo-album [data-download-progress]:not(:empty){position:absolute;inset:0;background:var(--paper);opacity:.95;overflow:auto}
.chat-photo-album [data-download-progress]:has([aria-valuenow="100"]):not(:has(button)){display:none}
.chat-photo-album .chat-transfer{height:100%;margin:0;padding:4px;box-sizing:border-box;flex-direction:column;justify-content:center;gap:4px}
.chat-photo-album .chat-transfer-ring{flex:0 0 40px;width:40px;height:40px}
.chat-photo-album .chat-transfer-copy{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.chat-photo-album .chat-transfer button{min-height:28px;padding:3px 6px;font-size:11px}
