.visually-hidden { position: fixed; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.message-media { display: block; max-width: 100%; border-radius: 7px; background: #d9dee1; }
img.message-media { max-height: 380px; object-fit: contain; }
video.message-media { width: min(440px, 100%); max-height: 420px; }
audio.message-media { width: min(360px, 100%); min-width: 250px; background: transparent; }
.message-media-link { display: inline-flex; align-items: center; gap: 7px; padding: 9px 11px; border-radius: 7px; background: #f0f2f5; }
.message .message-media + .message-body, .message .message-media-link + .message-body { margin-top: 7px; }
.media-upload-preview { display: grid; min-height: 170px; place-items: center; overflow: hidden; border-radius: 11px; background: #111b21; }
.media-upload-preview img, .media-upload-preview video { display: block; width: 100%; max-height: 330px; object-fit: contain; }
.media-upload-preview audio { width: calc(100% - 30px); }
.media-file-summary { padding: 25px; color: #fff; text-align: center; overflow-wrap: anywhere; }
.voice-button svg { width: 22px; height: 22px; }
.voice-content { padding: 24px; }
.voice-recorder { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 12px; min-height: 74px; margin: 18px 0; padding: 16px; border-radius: 12px; background: #f0f2f5; color: #26343c; }
.voice-recorder time { min-width: 48px; font-variant-numeric: tabular-nums; font-weight: 700; color: #53616a; }
.voice-pulse { width: 14px; height: 14px; border-radius: 50%; background: #8696a0; }
.voice-pulse.recording { background: #d93636; animation: voice-pulse 1.2s ease-out infinite; }
.voice-preview { display: grid; min-height: 54px; place-items: center; }
.voice-preview audio { width: 100%; }
.danger-button { border: 0; border-radius: 9px; padding: 11px 17px; background: #d93636; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.danger-button:disabled { opacity: .45; cursor: default; }
.message-location { display: grid; min-width: 250px; gap: 7px; padding: 12px; border-radius: 9px; background: #eef5f3; }
.message-location-heading { display: flex; align-items: center; gap: 9px; color: #173f39; }
.message-location-heading span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: #d9fdd3; font-size: 1.05rem; }
.message-location-heading strong { font-size: .9rem; }
.message-location-address, .message-location-coordinates { color: #5d6c74; font-size: .76rem; line-height: 1.35; }
.message-location a { justify-self: start; margin-top: 1px; padding: 7px 10px; border-radius: 7px; color: #087a65; background: #fff; font-size: .78rem; text-decoration: none; }
.shared-contact-list { display: grid; min-width: 270px; gap: 8px; }
.shared-contact-card { overflow: hidden; border-radius: 10px; background: #f7faf9; border: 1px solid #d8e2df; }
.shared-contact-identity { display: flex; align-items: center; gap: 11px; padding: 12px 13px; }
.shared-contact-avatar { display: grid; flex: 0 0 42px; width: 42px; height: 42px; place-items: center; border-radius: 50%; color: #fff; background: #78909c; font-size: .82rem; font-weight: 700; }
.shared-contact-identity div { display: grid; min-width: 0; gap: 2px; }
.shared-contact-identity strong,.shared-contact-identity small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shared-contact-identity small { color: #667781; }
.shared-contact-action { width: 100%; border: 0; border-top: 1px solid #d8e2df; padding: 10px; color: #008069; background: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.shared-contact-action:disabled { color: #8696a0; cursor: default; }
.location-content { display: grid; gap: 15px; padding: 24px; }
.location-preview { display: grid; grid-template-columns: 48px 1fr; gap: 4px 12px; align-items: center; min-height: 94px; padding: 14px; border-radius: 12px; background: #f0f2f5; }
.location-preview .location-pin { grid-row: 1 / 3; display: grid; width: 48px; height: 48px; place-items: center; border-radius: 50%; background: #d9fdd3; font-size: 1.35rem; }
.location-preview small { color: #667781; overflow-wrap: anywhere; }
@keyframes voice-pulse { 0% { box-shadow: 0 0 0 0 rgba(217,54,54,.45); } 70% { box-shadow: 0 0 0 9px rgba(217,54,54,0); } 100% { box-shadow: 0 0 0 0 rgba(217,54,54,0); } }
@media (max-width: 760px) {
  audio.message-media { min-width: 220px; }
  .media-upload-preview { min-height: 130px; }
  .voice-content { padding: 18px; }
  .voice-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .voice-actions .primary-button { grid-column: 1 / -1; }
  .composer #locationButton { display: none; }
  .location-content { padding: 18px; }
  .location-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .location-actions .primary-button { grid-column: 1 / -1; }
  .message-location { min-width: 220px; }
  .shared-contact-list { min-width: 220px; }
}
