
.avatar-image-frame.labeler-avatar {
  border-radius: var(--labeler-avatar-border-radius);
}

.avatar-image {
  width: 100%;
  height: 100%;
  display: block;
}

.avatar-image--blurred {
  filter: blur(5px);
  transform: translateZ(0);
  will-change: filter;
}

.avatar-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
}

.avatar-placeholder {
  width: var(--avatar-size-post);
  height: var(--avatar-size-post);
  border-radius: var(--avatar-border-radius);
  border: var(--hair) solid var(--post-border-color);
  background-color: var(--skeleton-color);
}

header {
  z-index: var(--header-z-index);
  background-color: var(--background-color);
  border-bottom: var(--hair) solid var(--header-border-color);
  position: sticky;
  top: 0;
  margin: 0 auto;
  left: 0;
  right: 0;
}

#chat-detail-view .header-row {
  height: var(--chat-detail-header-height);
}

#chat-detail-view .header-row .avatar-group {
  width: var(--avatar-size-post);
  height: var(--avatar-size-post);
}

.header > .header-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 8px;
}

.header > .header-bottom-row {
  display: flex;
}

.header > .header-bottom-row .bottom-item {
  flex: 1;
  min-width: 0;
}

.header .header-title-link {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.header .header-title-container {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-left: 8px;
  flex: 1;
  min-width: 0;
}

.header .header-avatar {
  margin-left: 8px;
}

.header .header-title {
  display: flex;
  align-items: center;
  min-width: 0;
  font-size: 18px;
  font-weight: 600;
}

.header .header-title-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header .header-title-muted-icon {
  display: inline-flex;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  color: var(--text-color-muted);
}

.header .header-title-muted-icon svg {
  width: 100%;
  height: 100%;
}

.header .header-subtitle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: var(--text-color-muted);
  font-weight: 400;
}

.header .header-spacer {
  flex: 1;
}

.header > .header-row:has(.header-title-container) .header-spacer {
  flex: 0;
}

.header .loading-spinner {
  margin-right: 8px;
}

.header > .header-row.has-bottom-row {
  padding-bottom: 0;
}

@media (min-width: 800px) {
  #home-view .header > .header-row {
    display: none;
  }
}

tab-bar {
  display: flex;
  height: 46px;
}

tab-bar .tab-bar-button {
  border: none;
  position: relative;
  background: none;
  cursor: pointer;
  color: var(--icon-button-color);
  font-weight: 600;
  font-size: 15px;
  padding-right: 16px;
  padding-left: 16px;
  white-space: nowrap;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

tab-bar .tab-bar-button.active {
  color: var(--text-color);
}

tab-bar .tab-bar-button .tab-bar-button-label {
  display: inline-block;
  min-width: 3em;
  border-bottom: 3px solid transparent;
  padding-bottom: 12px;
}

tab-bar .tab-bar-button.active .tab-bar-button-label {
  border-bottom-color: var(--tab-bar-button-active-color);
}

@media (hover: hover) {
  tab-bar .tab-bar-button:hover {
    background-color: var(--post-hover-color);
  }
}

tab-bar:not([full-width]) {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.profile-card {
  margin-bottom: 8px;
}

.profile-tab-bar,
.list-detail-tab-bar {
  position: sticky;
  top: 0;
  background: var(--background-color);
  z-index: var(--header-z-index);
  border-bottom: var(--hair) solid var(--post-border-color);
}

.feed-container {
  min-height: calc(100dvh - 45px);
}

.scroll-lock-pinned {
  position: fixed;
}

.sidebar::backdrop {
  background: var(--overlay-color);
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.sidebar {
  display: flex;
  justify-content: flex-end;
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-max-width);
  max-width: 80%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  color: inherit;
  background: var(--background-color);
  border: none;
  border-right: var(--hair) solid var(--post-border-color);
  z-index: var(--sidebar-z-index);
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  overflow-y: auto;
}

@media (max-width: 799px) {
  .sidebar > .sidebar-content {
    width: var(--sidebar-max-width);
    max-width: 100%;
    flex: 0 0 auto;
  }
}

@media (min-width: 800px) {
  .sidebar {
    position: sticky;
    top: 0;
    height: 100dvh;
    max-width: var(--sidebar-max-width);
    transform: none;
    border-right: none;
    overflow-y: auto;
    z-index: 1;
    transition: none;
    width: fit-content;
  }

  .sidebar-content {
    padding-right: 0 !important;
  }

  .sidebar .sidebar-profile {
    padding-bottom: 0 !important;
  }

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

  .sidebar-divider {
    display: none;
  }

  .sidebar-profile-info {
    display: none;
  }

  .sidebar-profile-stats {
    display: none !important;
  }

  .sidebar-nav-item {
    justify-content: flex-end;
  }

  .sidebar-nav-label {
    display: none;
  }
}

@media (min-width: 1200px) {
  .sidebar-nav-item {
    justify-content: flex-start;
    padding-right: 2em !important;
  }

  .sidebar-nav-label {
    display: block;
  }
}

.sidebar[open] {
  transform: translateX(0);
}

.sidebar[open]::backdrop {
  opacity: 1;
}

.sidebar[open][data-closing] {
  pointer-events: none;
  transform: translateX(-100%);
  transition: transform 0.2s cubic-bezier(0.32, 0.72, 0, 1);
}

.sidebar[open][data-closing]::backdrop {
  opacity: 0;
  transition: opacity 0.2s cubic-bezier(0.32, 0.72, 0, 1);
}

@media (prefers-reduced-motion: reduce) {
  .sidebar {
    transition: none;
  }
}

.sidebar-profile {
  padding: 20px 20px 16px 20px;
}

.sidebar-profile-avatar {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 12px;
}

@media (min-width: 800px) {
  .sidebar-profile-avatar {
    justify-content: center;
  }
}

@media (min-width: 1200px) {
  .sidebar-profile-avatar {
    justify-content: flex-start;
  }
}

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

.sidebar-profile-avatar .avatar-image-frame {
  border-radius: var(--avatar-border-radius);
  border: var(--hair) solid var(--post-border-color);
}

.sidebar-profile-info {
  margin-bottom: 12px;
}

.sidebar-profile-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 2px;
}

.sidebar-profile-handle {
  font-size: 15px;
  color: var(--text-color-muted);
}

.sidebar-profile-stats {
  font-size: 14px;
  color: var(--text-color-muted);
}

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

.sidebar-profile-stats a {
  margin-bottom: 2px;
  display: inline-block;
}

.sidebar-profile-separator {
  color: var(--text-color-muted);
  text-align: center;
  padding-left: 2px;
  padding-right: 2px;
}

.sidebar-divider {
  height: var(--hair);
  background: var(--post-border-color);
  margin: 0;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 4px 0;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 3px 14px;
  margin: 3px 6px;
  color: var(--text-color);
  text-decoration: none;
  transition: background-color 0.2s;
  cursor: pointer;
  font-size: 20px;
  border-radius: var(--sidebar-nav-item-border-radius);
}

@media (hover: hover) {
  .sidebar-nav-item:hover:not(.disabled) {
    background: var(--post-hover-color);
  }
}

.sidebar-nav-item.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.sidebar-nav-icon {
  position: relative;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-nav-icon .icon {
  width: 25px;
  height: 25px;
}

.sidebar-nav-icon .icon path {
  stroke: var(--text-color);
}

app-icon {
  display: inline-flex;
  width: 1em;
  height: 1em;
  color: inherit;
}

app-icon svg {
  width: 100%;
  height: 100%;
}

plugin-blob-image {
  display: inline-block;
  vertical-align: middle;
}

plugin-blob-image img {
  display: block;
  max-width: 100%;
  max-height: 128px;
  font-size: inherit;
  color: transparent;
}

plugin-blob-image .blob-image-fallback {
  color: var(--text-color-muted);
}

.sidebar-nav-icon app-icon,
.sidebar-nav-icon > .plugin-icon {
  width: 25px;
  height: 25px;
  color: var(--text-color);
}

.sidebar-nav-icon .status-badge {
  top: 0;
  left: 12px;
}

.sidebar-nav-label {
  flex: 1;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.sidebar-compose-button {
  display: none;
  margin-top: 18px;
  margin-left: 10px;
  width: fit-content;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: 600;
}

.sidebar-compose-button .icon {
  width: 20px;
  height: 20px;
}

.sidebar-compose-button span {
  margin-right: 6px;
}

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

button.sidebar-plugin-nav-item {
  background: transparent;
  border: none;
  text-align: left;
}

.sidebar-spacer {
  flex: 1;
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px 20px;
}

.sidebar-footer .sidebar-text-link {
  display: block;
  margin-bottom: 8px;
}

.sidebar-content {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  height: 100%;
  padding: 0 20px 0 20px;
}

.sidebar-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

@media (min-width: 800px) {
  .logged-out-sidebar .sidebar-header {
    align-items: center;
  }

  .logged-out-sidebar .sidebar-nav-item {
    justify-content: center;
  }
}

.sidebar-text-link {
  font-size: 14px;
  color: var(--text-link-color);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.logged-out-sidebar .sidebar-title {
  font-weight: 600;
  width: 100%;
  padding-top: 10px;
  padding-left: 20px;
  padding-bottom: 6px;
}

@media (min-width: 800px) {
  .logged-out-sidebar .sidebar-title {
    padding-left: 0;
    text-align: center;
  }

  .logged-out-sidebar .sidebar-title h1 {
    margin: 0;
  }
}

.logged-out-sidebar .sidebar-header {
  gap: 10px;
}

.logged-out-sidebar p {
  font-size: 14px;
  color: var(--text-color-muted);
  padding-bottom: 5px;
  min-width: 100px;
}

.logged-out-sidebar .login-button,
.logged-out-sidebar .sidebar-about-link {
  width: fit-content;
  margin-left: 16px;
  margin-top: 8px;
  padding: 10px 20px;
  white-space: nowrap;
}

@media (min-width: 800px) {
  .logged-out-sidebar .login-button,
  .logged-out-sidebar .sidebar-about-link {
    margin-left: auto;
    margin-right: auto;
  }
}

.footer-nav {
  position: fixed;
  bottom: 0;
  height: calc(var(--footer-height) + var(--safe-area-inset-bottom));
  padding-bottom: var(--safe-area-inset-bottom);
  width: 100%;
  background: var(--background-color);
  z-index: var(--footer-z-index);
  border-top: var(--hair) solid var(--post-border-color);
}

@media (min-width: 800px) {
  .footer-nav {
    display: none !important;
  }
}

.footer-nav nav {
  display: flex;
  align-items: center;
  height: 100%;
}

.footer-nav-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  cursor: pointer;
  position: relative;
}

.footer-nav-item .avatar {
  height: 24px;
  width: 24px;
}

/* Long-press to open the account switcher: stop iOS link previews / text
   selection from hijacking the hold gesture */
.sidebar-profile-avatar.long-press-enabled,
.footer-nav-item.long-press-enabled {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.footer-nav.logged-out-footer {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding-right: 20px;
  padding-left: 20px;
}

.footer-nav-item .status-badge {
  top: 10px;
  left: calc(50% - 1px);
}

.footer-nav-item .avatar-image-frame {
  width: var(--avatar-size-footer-nav);
  height: var(--avatar-size-footer-nav);
}

.footer-nav-item .avatar-placeholder {
  width: var(--avatar-size-footer-nav);
  height: var(--avatar-size-footer-nav);
}

.footer-nav-item[disabled] {
  pointer-events: none;
  cursor: default;
  opacity: 0.5;
}

.footer-nav-item.active {
  cursor: default;
}

.footer-nav-item .icon {
  width: 24px;
  height: 24px;
}

.footer-nav-item .icon path {
  stroke: var(--text-color);
}

.status-badge {
  position: absolute;
  background: var(--highlight-color);
  color: var(--white);
  border-radius: var(--context-menu-border-radius);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1px 4px;
  min-width: 20px;
  border: 1px solid var(--background-color);
}

.feed {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.feed > div {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.feed-item {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* workaround for iOS Safari subpixel rounding */
.feed-item::after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  background-color: var(--post-border-color);
  transform: scaleY(0.5);
  transform-origin: bottom;
}

