
.convo-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.convo-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.convo-name {
  font-weight: 600;
  font-size: 15px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.convo-time {
  flex-shrink: 0;
  font-size: 14px;
  color: var(--text-color-muted);
}

.convo-handle {
  font-size: 14px;
  color: var(--text-color-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.convo-preview {
  font-size: 14px;
  color: var(--text-color-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}

.convo-preview.unread {
  color: var(--text-color);
  font-weight: 500;
}

.convo-item.skeleton {
  pointer-events: none;
}

.convo-skeleton-avatar {
  width: var(--avatar-size-convo);
  height: var(--avatar-size-convo);
  border-radius: var(--avatar-border-radius);
}

.convo-skeleton-name {
  width: 120px;
  height: 16px;
  border-radius: var(--skeleton-border-radius);
}

.convo-skeleton-time {
  width: 40px;
  height: 14px;
  border-radius: var(--skeleton-border-radius);
}

.convo-skeleton-handle {
  width: 90px;
  height: 12px;
  border-radius: var(--skeleton-border-radius);
  margin-top: 4px;
}

.convo-skeleton-preview {
  width: 80%;
  height: 14px;
  border-radius: var(--skeleton-border-radius);
  margin-top: 6px;
}

.chat-requests-main {
  padding: 0;
}

.chat-request-item {
  display: flex;
  flex-direction: column;
  border-bottom: var(--hair) solid var(--post-border-color);
  background-color: var(--background-color);
  transition: background-color 0.2s;
}

@media (hover: hover) {
  .chat-request-item:hover {
    background-color: var(--post-hover-color);
  }
}

.chat-request-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color 0.2s;
}

@media (hover: hover) {
  .chat-request-header:hover {
    background-color: var(--post-hover-color);
  }
}

.chat-request-follow-status {
  color: var(--text-color-muted);
  font-size: 13px;
  margin-top: 6px;
}

.chat-request-actions {
  display: flex;
  gap: 12px;
  padding: 0 16px 12px 16px;
}

.chat-request-button {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: var(--sheet-border-radius);
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.chat-request-button.accept {
  background-color: var(--primary-button-color);
  color: var(--primary-button-text-color);
}

@media (hover: hover) {
  .chat-request-button.accept:hover {
    opacity: 0.9;
  }
}

.chat-request-button.reject {
  background-color: var(--text-input-background-color);
}

@media (hover: hover) {
  .chat-request-button.reject:hover {
    background-color: var(--generic-border-color);
  }
}

.chat-request-item.skeleton .chat-request-header {
  pointer-events: none;
}

.chat-request-skeleton-button {
  flex: 1;
  height: 40px;
  border-radius: var(--sheet-border-radius);
}

.chat-detail-main {
  position: relative;
  height: calc(
    100dvh - var(--chat-detail-header-height) - var(--footer-height) -
      var(--safe-area-inset-bottom)
  );
  overflow: hidden;
  /* Gets updated via JS in chat detail view */
  --input-bar-height: var(--message-input-min-height);
}

.chat-detail-main > infinite-scroll-container {
  display: block;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: var(--input-bar-height);
  box-sizing: border-box;
}

.chat-detail-main .message-list {
  padding: 16px 16px 8px;
}

@media (min-width: 800px) {
  .chat-detail-main {
    height: calc(
      100dvh - var(--chat-detail-header-height) - var(--safe-area-inset-bottom)
    );
  }
}

.chat-detail-main .loading-spinner-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

.chat-detail-empty {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 20px;
  color: var(--text-color-muted);
  font-size: 15px;
}

.chat-info-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 24px 20px;
  text-align: center;
}

.chat-info-panel .profile-follows-you {
  margin-top: 4px;
}

.chat-info-panel > .avatar .avatar-image-frame,
.chat-info-panel-avatars > .avatar .avatar-image-frame {
  width: var(--avatar-size-chat-info-panel);
  height: var(--avatar-size-chat-info-panel);
}

.chat-info-panel-avatars {
  height: var(--avatar-size-chat-info-panel);
}

.chat-info-panel-avatars .avatar-group {
  width: var(--avatar-size-chat-info-panel);
  height: var(--avatar-size-chat-info-panel);
}

.chat-info-panel-name {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-color);
}

.chat-info-panel-handle {
  font-size: 14px;
  color: var(--text-color-muted);
}

.chat-info-panel-go-to-profile-button {
  margin-top: 12px;
  color: var(--text-color);
  text-decoration: none;
}

.chat-info-panel .author-badges {
  justify-content: center;
  gap: 4px;
}

.chat-info-panel .label-badge {
  font-size: 13px;
  min-height: 23px;
  padding: 3px 8px 4px;
  background: light-dark(var(--lightest-gray), var(--gray));
}

@media (hover: hover) {
  .chat-info-panel .label-badge:hover {
    background: light-dark(var(--lighter-gray), var(--light-gray));
  }
}

.chat-info-panel .label-badge-image {
  width: 16px;
  height: 16px;
}

.group-chat-header-skeleton-avatar {
  width: var(--avatar-size-chat-info-panel);
  height: var(--avatar-size-chat-info-panel);
}

.group-chat-header-skeleton-handle-line {
  display: inline-block;
}

.group-chat-members-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  font-weight: 600;
  color: var(--text-color);
  border-bottom: var(--hair) solid var(--post-border-color);
}

.group-chat-member-count {
  font-weight: 400;
  font-size: 14px;
  color: var(--text-color-muted);
}

.group-chat-member-added-by {
  align-self: center;
  flex-shrink: 0;
  font-size: 13px;
  text-align: right;
  color: var(--text-color-muted);
}

.group-chat-admin-badge {
  align-self: center;
  padding: 3px 10px 4px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--highlight-color);
  background: color-mix(in srgb, var(--highlight-color) 12%, transparent);
}

.chat-info-panel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.chat-info-panel-action {
  gap: 6px;
}

.chat-info-panel-action app-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
}

.chat-info-panel-action app-icon svg {
  width: 100%;
  height: 100%;
}

.chat-info-panel-action-skeleton {
  width: 90px;
  height: 34px;
}

.chat-info-panel-action.muted {
  color: var(--error-color);
  background-color: color-mix(in srgb, var(--error-color) 12%, transparent);
}

@media (hover: hover) {
  .rounded-button.chat-info-panel-action.muted:not(:disabled):hover {
    background-color: color-mix(in srgb, var(--error-color) 20%, transparent);
  }
}

.convo-item.is-muted {
  opacity: 0.6;
}

.convo-item .convo-muted-icon {
  display: inline-flex;
  width: 14px;
  height: 14px;
  margin-left: 2px;
  vertical-align: -2px;
  color: var(--text-color-muted);
}

.convo-item .convo-muted-icon svg {
  width: 100%;
  height: 100%;
}

.message-day-title {
  font-size: 12px;
  color: var(--text-color-muted);
  margin-bottom: 12px;
  text-align: center;
}

.message-day-title strong {
  font-weight: 500;
  color: var(--text-color);
}

.message-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}

.message-author-name {
  font-size: 0.8rem;
  color: var(--text-color-muted);
  margin-left: calc(var(--avatar-size-message) + 8px);
  margin-bottom: 2px;
}

.system-message {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-color-muted);
  margin: 12px 0;
}

.chat-locked-notice {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-color-muted);
  padding: 16px;
}

.message-group-sent {
  align-items: flex-end;
}

.message-group-received {
  align-items: flex-start;
}

.message {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-bottom: 4px;
  position: relative;
}

.message-sent {
  flex-direction: row-reverse;
}

.message-received {
  flex-direction: row;
}

.message-avatar {
  flex-shrink: 0;
  width: var(--avatar-size-message);
  height: var(--avatar-size-message);
  align-self: flex-start;
}

.message-avatar .avatar-image-frame,
.message-avatar .avatar-placeholder {
  width: var(--avatar-size-message);
  height: var(--avatar-size-message);
}

.message-avatar-spacer {
  width: var(--avatar-size-message);
  height: var(--avatar-size-message);
  flex-shrink: 0;
  align-self: flex-start;
}

.message-bubble {
  max-width: 70%;
  min-width: 0;
  padding: 10px 14px;
  border-radius: var(--message-bubble-border-radius);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.message-sent .message-bubble {
  background-color: var(--highlight-color);
  color: var(--overlay-text-color);
  border-bottom-right-radius: 4px;
}

.message-received .message-bubble {
  background-color: var(--text-input-background-color);
  color: var(--text-color);
  border-bottom-left-radius: 4px;
}

.message-text .rich-text-emoji-only {
  --rich-text-emoji-scale: 3;
}

.message-sent .message-bubble-emoji-only,
.message-received .message-bubble-emoji-only {
  background: none;
  padding: 0;
  border-radius: 0;
  color: var(--text-color);
}

.message-bubble a {
  text-decoration: underline;
}

.message-reply-quote {
  padding: 4px 8px;
  margin-bottom: 6px;
  border-radius: 8px;
  font-size: 13px;
  opacity: 0.9;
  cursor: pointer;
}

.message-sent .message-reply-quote {
  background-color: rgba(255, 255, 255, 0.15);
}

.message-received .message-reply-quote {
  background-color: light-dark(rgba(0, 0, 0, 0.06), rgba(255, 255, 255, 0.1));
}

.message-reply-quote-sender {
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-reply-quote-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.message-reply-quote-text-muted {
  font-style: italic;
  opacity: 0.7;
}

.message-reply-caption {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-color-muted);
  margin-bottom: 2px;
  cursor: pointer;
}

.message-reply-caption-arrow {
  display: flex;
}

.message-reply-caption-arrow .icon {
  width: 13px;
  height: 13px;
}

.message-reply-caption-sent {
  justify-content: flex-end;
  padding-right: 4px;
}

.message-reply-caption-received {
  justify-content: flex-start;
  padding-left: 44px;
}

@keyframes message-highlight-flash-received {
  0% {
    background-color: transparent;
  }
  10%,
  37% {
    background-color: color-mix(
      in srgb,
      var(--highlight-color) 22%,
      transparent
    );
  }
  67% {
    background-color: transparent;
  }
}

@keyframes message-highlight-flash-sent {
  0% {
    background-color: var(--highlight-flash-base);
  }
  10%,
  37% {
    background-color: color-mix(
      in srgb,
      var(--overlay-text-color) 50%,
      var(--highlight-flash-base)
    );
  }
  67% {
    background-color: var(--highlight-flash-base);
  }
}

.message-wrapper.message-highlighted .message-received .message-bubble,
.message-wrapper.message-highlighted
  .message-received
  .message-embed
  > .quoted-post,
.message-wrapper.message-highlighted
  .message-received
  .message-embed
  > .quoted-post-link
  > .quoted-post {
  animation: message-highlight-flash-received 1500ms ease-out;
}

.message-wrapper.message-highlighted .message-sent .message-bubble {
  --highlight-flash-base: var(--highlight-color);
  animation: message-highlight-flash-sent 1500ms ease-out;
}

.message-wrapper.message-highlighted .message-sent .message-bubble-emoji-only,
.message-wrapper.message-highlighted
  .message-received
  .message-bubble-emoji-only {
  animation: none;
}

.message-wrapper.message-highlighted
  .message-sent
  .message-embed
  > .quoted-post,
.message-wrapper.message-highlighted
  .message-sent
  .message-embed
  > .quoted-post-link
  > .quoted-post {
  --highlight-flash-base: var(--highlight-color-tint);
  animation: message-highlight-flash-sent 1500ms ease-out;
}

.message-sent a {
  color: var(--off-white);
}

.message-group-time {
  font-size: 11px;
  color: var(--text-color-muted);
  padding: 0 8px;
}

.message-group-time-sent {
  text-align: right;
  padding-right: 4px;
}

.message-group-time-received {
  text-align: left;
  padding-left: 44px;
}

/* Message wrapper for reaction palette */
.message-wrapper {
  position: relative;
  width: 100%;
}

.message-embed .quoted-post {
  background: var(--text-input-background-color);
  border-radius: var(--message-bubble-border-radius);
  border: none;
  margin-top: 0;
}

.message-sent .message-embed .quoted-post {
  background: var(--highlight-color-tint);
}

.message-sent .message-embed a {
  color: inherit;
}

.chat-join-link-embed {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 240px;
  max-width: 100%;
}

.message-embed .chat-join-link-embed {
  background: var(--text-input-background-color);
  border-radius: var(--message-bubble-border-radius);
  border: none;
}

.message-sent .message-embed .chat-join-link-embed {
  background: var(--highlight-color-tint);
}

.chat-join-link-embed-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.chat-join-link-embed-avatars {
  flex-shrink: 0;
}

.chat-join-link-embed-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.chat-join-link-embed-name {
  font-weight: 700;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-join-link-embed-meta {
  font-size: 12px;
  color: var(--text-color-muted);
}

.chat-join-link-embed-owner {
  font-size: 13px;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  flex-wrap: wrap;
}

.chat-join-link-embed-owner-name {
  color: inherit;
  font-weight: 500;
  text-decoration: none;
}

.chat-join-link-embed-owner-handle {
  color: var(--text-color-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.chat-join-link-embed-unavailable {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-color-muted);
  font-size: 14px;
  padding: 4px 0;
}

.chat-join-link-embed-unavailable .icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.chat-join-link-action {
  gap: 6px;
  padding: 8px 14px;
  font-weight: 600;
  width: 100%;
}

.chat-join-link-action[disabled] {
  background: var(--secondary-button-color);
  color: var(--text-color);
}

.chat-join-link-action .icon {
  width: 18px;
  height: 18px;
}

.message-actions {
  display: flex;
  align-self: center;
  flex-shrink: 0;
}

.message-sent .message-actions {
  flex-direction: row-reverse;
}

.message-emoji-trigger,
.message-more-trigger {
  background: transparent;
  border: none;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color-muted);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.message-emoji-trigger .emoji-icon {
  width: 20px;
  height: 20px;
}

.message-more-trigger span {
  font-weight: 600;
  position: relative;
  top: -4px;
}

.message-wrapper-active .message-emoji-trigger,
.message-wrapper-active .message-more-trigger {
  opacity: 1;
  pointer-events: auto;
}

@media (hover: hover) {
  .message:hover .message-emoji-trigger,
  .message:hover .message-more-trigger {
    opacity: 1;
    pointer-events: auto;
  }
  .message-emoji-trigger:hover,
  .message-more-trigger:hover {
    color: var(--text-color);
  }
}

/* Skeleton loader for messages */
.message.skeleton {
  pointer-events: none;
}

.message-input-wrapper {
  display: flex;
  flex-direction: column;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.message-reply-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background-color: var(--background-color);
  border-top: 1px solid var(--generic-border-color);
  z-index: var(--message-input-z-index);
  font-size: 16px;
}

.message-reply-preview-accent {
  width: 3px;
  align-self: stretch;
  background-color: var(--highlight-color);
  border-radius: 2px;
}

.message-reply-preview-content {
  flex: 1;
  min-width: 0;
}

.message-reply-preview-sender {
  font-size: 13px;
  color: var(--text-color-muted);
  font-weight: 600;
}

.message-reply-preview-text {
  font-size: 15px;
  color: var(--text-color);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-reply-preview-text-muted {
  font-style: italic;
  opacity: 0.7;
}

.message-reply-preview-clear {
  background: none;
  border: none;
  color: var(--text-color-muted);
  cursor: pointer;
  padding: 4px 8px;
  display: flex;
  align-items: center;
}

.message-embed-preview {
  position: relative;
  padding: 8px 16px;
  background-color: var(--background-color);
  border-top: 1px solid var(--generic-border-color);
  z-index: var(--message-input-z-index);
}

.message-embed-preview-pending {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  border: var(--hair) solid var(--embed-border-color);
  border-radius: var(--embed-border-radius);
  color: var(--text-color-muted);
}

.quoted-post-condensed .post-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.quoted-post-media-thumbs {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.quoted-post-media-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--image-preview-border-radius);
  background-color: var(--generic-border-color);
  border: var(--hair) solid var(--post-border-color);
}

.quoted-post-media-video {
  position: relative;
}

.message-embed-preview .embed-preview-close-button {
  right: 24px;
  top: 16px;
}

.message-input-container {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background-color: var(--background-color);
  position: relative;
  min-height: var(--message-input-min-height);
  z-index: var(--message-input-z-index);
  flex: 1;
}

chat-input {
  flex: 1;
}

chat-input rich-text-input {
  flex: 1;
  min-width: 0;
}

chat-input .rich-text-input {
  padding: 12px 16px;
  border: none;
  border-radius: var(--message-input-border-radius);
  background-color: var(--text-input-background-color);
  color: var(--text-color);
  font-size: 16px;
  font-family: inherit;
  outline: none;
  /* Cap auto-grow so a long multi-line message scrolls internally instead of
     pushing the whole input bar up off the top of the (short, mobile) viewport. */
  max-height: min(250px, 50vh);
  overflow-y: auto;
  line-height: 1.4;
  scrollbar-width: thin;
}

chat-input .rich-text-input[contenteditable="false"],
chat-input[disabled] .rich-text-input-placeholder {
  opacity: 0.6;
}

chat-input .rich-text-input-placeholder {
  padding: 12px 16px;
  font-size: 16px;
  line-height: 1.4;
}

.message-input-field-wrapper {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
}

.message-input-emoji-wrapper {
  position: absolute;
  right: 6px;
  bottom: 7px;
  display: flex;
  align-items: center;
}

.message-input-field-wrapper .rich-text-input,
.message-input-field-wrapper .rich-text-input-placeholder {
  padding-right: 46px;
}

.message-input-emoji-button {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--circular-button-border-radius);
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-color-muted);
  padding: 0;
  transition:
    background-color 0.2s,
    color 0.2s;
}

@media (hover: hover) {
  .message-input-emoji-button:hover:not(:disabled) {
    background-color: var(--post-hover-color);
    color: var(--text-color);
  }
}

.message-input-emoji-button .emoji-icon {
  width: 22px;
  height: 22px;
}

.message-input-send-button {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--circular-button-border-radius);
  color: var(--primary-button-text-color);
  background-color: var(--primary-button-color);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.2s;
}

.message-input-send-button .loading-spinner {
  border-top-color: var(--primary-button-text-color);
  border-left-color: transparent;
  border-right-color: transparent;
  border-bottom-color: transparent;
}

@media (hover: hover) {
  .message-input-send-button:hover:not(:disabled) {
    opacity: 0.9;
  }
}

.message-input-send-button:active:not(:disabled) {
  opacity: 0.8;
}

.message-input-send-button .send-icon {
  color: var(--overlay-text-color);
  width: 20px;
  height: 20px;
  left: 2px;
}

.message-input-send-button .send-icon svg {
  width: 20px;
  height: 20px;
}

.reaction-palette {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--context-menu-background-color);
  border-radius: var(--reaction-palette-border-radius);
  padding: 0px 0px;
  display: flex;
  gap: 0px;
  box-shadow: var(--shadow-color-medium);
  animation: palette-appear 0.2s ease-out;
  border: var(--hair) solid var(--generic-border-color);
  z-index: var(--reaction-palette-z-index);
}

@keyframes palette-appear {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(5px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.message-group-sent .reaction-palette {
  right: -10px;
  left: auto;
}

.reaction-palette-button {
  background: transparent;
  border: none;
  color: inherit;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: var(--circular-button-border-radius);
  transition:
    background-color 0.15s,
    transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  padding: 0;
  touch-action: manipulation;
}

.reaction-palette-button-inner {
  font-size: 28px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.reaction-palette-button-more .reaction-palette-button-inner {
  position: relative;
  bottom: 8px;
}

@media (hover: hover) {
  .reaction-palette-button:hover {
    background-color: var(--secondary-button-color);
  }
}

.message-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 70%;
}

.message-sent .message-content {
  align-items: flex-end;
}

.message-received .message-content {
  align-items: flex-start;
}

.message-content .message-bubble,
.message-content .message-embed {
  max-width: 100%;
}

.message-content .message-embed + .message-bubble {
  margin-top: 4px;
}

.message-reactions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--background-color);
  border: var(--hair) solid var(--generic-border-color);
  border-radius: 999px;
  padding: 2px 8px;
  margin-top: -8px;
  position: relative;
  user-select: none;
}

.message-reactions:not(.message-reactions-static) {
  cursor: pointer;
}

.message-reactions-own {
  background-color: var(--highlight-color-tint);
  border-color: var(--highlight-color);
}

@media (hover: hover) {
  .message-reactions:not(.message-reactions-static):hover {
    background-color: var(--post-hover-color);
  }

  .message-reactions-own:not(.message-reactions-static):hover {
    background-color: var(--highlight-color-tint-hover);
  }
}

.reaction-palette-button[disabled] {
  cursor: not-allowed;
}

.reaction-palette-button.reaction-palette-button-active {
  background-color: var(--secondary-button-color);
}

@media (hover: hover) {
  .reaction-palette-button.reaction-palette-button-active:hover {
    background-color: var(--secondary-button-hover-color);
  }
}

.reaction-bubble {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 0;
  font-size: 14px;
}

.reaction-emoji {
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
}

.reaction-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-color);
  line-height: 1;
  padding: 2px 2px 2px 0;
}

.bottom-sheet.reactions-dialog {
  height: 28em;
}

@media (min-width: 800px) {
  .bottom-sheet.reactions-dialog {
    height: auto;
    max-width: 420px;
  }
}

.reactions-dialog-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 80vh;
  padding-top: 18px;
}

.reactions-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: var(--hair) solid var(--generic-border-color);
}

.reactions-dialog-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.reactions-dialog-close {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-color);
  padding: 0 8px;
}

@media (min-width: 800px) {
  .reactions-dialog-close {
    display: inline-flex;
    align-items: center;
  }
}

.reactions-tabs {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  overflow-x: auto;
  padding: 0 16px;
  border-bottom: var(--hair) solid var(--generic-border-color);
  scrollbar-width: thin;
}

.reactions-tab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--background-color);
  border: var(--hair) solid var(--generic-border-color);
  border-radius: 16px;
  padding: 4px 10px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.reactions-tab-selected {
  background-color: var(--highlight-color-tint);
  border-color: var(--highlight-color);
}

.reactions-tab-count {
  font-weight: 600;
  font-size: 12px;
}

.reactions-list {
  flex: 1 1 auto;
  min-height: 0;
  list-style: none;
  margin: 0;
  padding: 8px 0;
  overflow-y: auto;
}

.reactions-list li {
  padding: 0;
}

.reaction-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 16px;
  background: none;
  border: none;
  text-align: left;
  color: var(--text-color);
  font: inherit;
}

.reaction-row:disabled {
  opacity: 1;
}

.reaction-row-own {
  cursor: pointer;
}

@media (hover: hover) {
  .reaction-row-own:hover {
    background-color: var(--post-hover-color);
  }
}

.reaction-row-avatar {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
}

.reaction-row-avatar .avatar,
.reaction-row-avatar .avatar-image-frame,
.reaction-row-avatar .avatar-placeholder,
.reaction-row-avatar .avatar-image {
  width: 42px;
  height: 42px;
}

.reaction-row-info {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.reaction-row-name {
  font-weight: 600;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reaction-row-handle {
  font-size: 13px;
  color: var(--text-color-secondary, var(--text-color));
  opacity: 0.7;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reaction-row-emoji {
  font-size: 20px;
  flex: 0 0 auto;
}

emoji-picker-dialog emoji-picker,
.emoji-picker-dialog-host emoji-picker {
  --num-columns: 6;
  --category-emoji-size: 1.125rem;
  --input-font-size: 16px;
}

.emoji-picker-dialog-host {
  position: fixed;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  max-width: none;
  max-height: none;
  width: fit-content;
  height: fit-content;
  overflow: visible;
}

.emoji-picker-dialog-host::backdrop {
  background: transparent;
}

.chat-icon.filled circle {
  fill: var(--background-color);
}

.profile-container {
  padding: 0;
  min-height: 100dvh;
}

.profile-banner-container {
  position: relative;
  width: 100%;
  height: 150px;
  background-color: light-dark(var(--lightest-gray), var(--gray));
}

.profile-banner {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-banner--blurred {
  filter: blur(100px);
}

