
.rich-text-input {
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: break-word;
}

.rich-text-input .facet {
  color: var(--text-link-color);
}

.rich-text-input-placeholder {
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  color: var(--text-color-muted);
  font-size: 16px;
  font-family: inherit;
  resize: none;
  outline: none;
}

.rich-text-input-placeholder.hidden {
  display: none;
}

.rich-text-input-container {
  position: relative;
}

.image-picker-button {
  padding: 6px;
}

@media (hover: hover) {
  .image-picker-button:not(:disabled):hover {
    background-color: var(--background-color-secondary);
  }
}

.image-picker-button .icon {
  width: 24px;
  height: 24px;
  color: var(--highlight-color);
}

.word-count {
  display: flex;
  align-items: center;
  gap: 8px;
}

.word-count-text {
  font-size: 13px;
  color: var(--text-color-muted);
  /* fixed width (fits "-999") so the layout doesn't shift while typing */
  min-width: 4ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.word-count-indicator {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--highlight-color);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.word-count-indicator-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--highlight-color);
}

.word-count.overflow .word-count-indicator {
  border-color: var(--error-color);
}

.word-count.overflow .word-count-indicator-bar {
  background-color: var(--error-color);
}

.word-count.overflow .word-count-text {
  color: var(--error-color);
}

.fab {
  display: flex;
  position: fixed;
  bottom: calc(70px + var(--safe-area-inset-bottom));
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: var(--circular-button-border-radius);
  background-color: var(--primary-button-color);
  color: var(--primary-button-text-color);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-color-light);
  z-index: var(--fab-z-index);
  align-items: center;
  justify-content: center;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

@media (hover: hover) {
  .fab:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-color-hover);
  }
}

.fab:active {
  transform: scale(0.95);
}

.floating-compose-button .icon {
  width: 24px;
  height: 24px;
}

@media (min-width: 800px) {
  .floating-compose-button {
    right: 50px;
  }

  .floating-compose-button .icon {
    width: 30px;
    height: 30px;
  }
}

@media (min-width: 1200px) {
  .floating-compose-button {
    display: none;
  }
}

.mention-typeahead-host,
.mention-typeahead-host:popover-open {
  position: fixed;
  inset: unset;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  overflow: visible;
}

.mention-typeahead {
  position: fixed;
  background: var(--context-menu-background-color);
  border: 1px solid var(--generic-border-color);
  border-radius: var(--typeahead-border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-color-light);
  margin-top: 8px;
  max-height: 320px;
  overflow-y: auto;
  min-width: 240px;
  max-width: min(320px, calc(100vw - 24px));
  z-index: var(--mention-typeahead-z-index);
}

.mention-typeahead.mention-typeahead-above {
  margin-top: 0;
  margin-bottom: 8px;
}

.mention-typeahead-empty {
  display: flex;
  align-items: center;
  /* Match the height of a suggestion row: its avatar plus the row padding
     (border-box, so the padding counts into min-height) */
  min-height: calc(var(--avatar-size-post) + 20px);
  padding: 10px 18px;
  color: var(--text-color-muted);
  font-size: 14px;
}

.profile-hover-card-anim {
  animation: fade-in 300ms both;
  will-change: transform, opacity;
  background: var(--context-menu-background-color);
  border: 1px solid var(--generic-border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-color-light);
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .profile-hover-card-anim {
    animation: none;
  }
}

.profile-hover-card {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--text-color);
}

.profile-hover-card-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: 16px;
}

.profile-hover-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.profile-hover-card-avatar .avatar-image,
.profile-hover-card-avatar .avatar-image-frame {
  width: 64px;
  height: 64px;
}

.profile-hover-card-button-slot {
  display: flex;
  align-items: center;
}

.profile-hover-card-name-link {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-hover-card-name {
  font-weight: 700;
  font-size: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

.profile-hover-card-handle-row {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-color-muted);
  font-size: 14px;
}

.profile-hover-card-handle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-hover-card-stats {
  display: flex;
  gap: 12px;
  font-size: 14px;
  color: var(--text-color-muted);
}

.profile-hover-card-stats .profile-stat {
  color: inherit;
  text-decoration: none;
}

.profile-hover-card-stats .profile-stat strong {
  color: var(--text-color);
  font-weight: 700;
}

.profile-hover-card-bio {
  display: -webkit-box;
  -webkit-line-clamp: 8;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.4;
}

