/* Shared attachment browser: give both voice and music a visible surface. */
#qchatChatInfoModal {
  --qchat-gallery-player-bg: #f3f6fa;
  --qchat-gallery-player-border: #d8e1eb;
  --qchat-gallery-player-active: #e8f1ff;
  --qchat-gallery-player-muted: #596879;
}
body.dark-theme #qchatChatInfoModal {
  --qchat-gallery-player-bg: #1d2735;
  --qchat-gallery-player-border: #3a4759;
  --qchat-gallery-player-active: #263a54;
  --qchat-gallery-player-muted: #b0bdce;
}
@media (prefers-color-scheme: dark) {
  body.auto-theme #qchatChatInfoModal {
    --qchat-gallery-player-bg: #1d2735;
    --qchat-gallery-player-border: #3a4759;
    --qchat-gallery-player-active: #263a54;
    --qchat-gallery-player-muted: #b0bdce;
  }
}
html body #qchatChatInfoModal .qchat-gallery-audio :is(.qchat-audio-mini-player, .qchat-audio-classic-card) {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  background: var(--qchat-gallery-player-bg) !important;
  border: 1px solid var(--qchat-gallery-player-border) !important;
  border-radius: 10px;
  padding: 10px !important;
}
html body #qchatChatInfoModal .qchat-gallery-audio .playing {
  background: var(--qchat-gallery-player-active) !important;
}
#qchatChatInfoModal .qchat-gallery-audio .song-autor {
  color: var(--qchat-gallery-player-muted) !important;
}

/* The sentence is one inline flow; global profile-link styles must not turn
   individual words into flex boxes with different baselines. */
#qcgNotificationSection .qcg-notification-row { align-items: center; }
#qcgNotificationSection .qcg-notice-detail {
  display: block;
  line-height: 1.5;
  text-align: start;
}
#qcgNotificationSection .qcg-notice-detail > :is(a, span:not(.qcg-notice-group-avatar):not(.badge)) {
  display: inline;
  font-size: inherit;
  line-height: inherit;
  vertical-align: baseline;
}
#qcgNotificationSection .qcg-notice-detail > .qcg-notice-group-avatar {
  vertical-align: -.25em;
}
#qcgNotificationSection .qcg-notice-detail > .badge { vertical-align: baseline; }

#qcgProfileDialog .qcg-profile-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}
#qcgPanel #qcgMediaOpen { white-space: nowrap; }

/* A single line is centered inside a 40px border-box; wrapped text and the
   existing autosizer keep the same symmetric padding. */
html body #qcgPanel #qcgMessageText.qchat-message-textarea,
html body .profile-blog-comment-form textarea.profile-blog-comment-input {
  box-sizing: border-box !important;
  min-height: 40px !important;
  line-height: 1.5 !important;
  padding-block: calc((40px - 1.5em - 2px) / 2) !important;
}
@media (max-width: 767.98px) {
  #qcgPanel .qcg-main-head :is(.qcg-media-label, .qcg-manage-label, .qcg-edit-label) {
    display: none !important;
  }
  /* iPhone focuses controls below 16px by zooming the page. Preserve zoom
     gestures and larger accessibility font settings. */
  html body #appSection #messagingTab #userSearchInput,
  html body #appSection #qcgPanel #qcgSearch,
  html body #qcgDialog #qcgCreateSearch,
  html body #qcgManageDialog #qcgMemberFilter {
    font-size: max(16px, 1rem) !important;
  }
}
