
#community-plugins-view .error-state,
#installed-plugins-view .error-state {
  padding: 32px 20px;
}

.plugin-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px;
  border-bottom: var(--hair) solid var(--post-border-color);
}

.plugin-list-item-name {
  font-weight: 600;
}

.plugin-local-badge {
  font-size: 12px;
  font-weight: 400;
  background: var(--secondary-button-color);
  padding: 3px 8px;
  border-radius: var(--tag-border-radius);
  display: inline-block;
  min-width: fit-content;
  margin-left: 5px;
  vertical-align: middle;
  margin-bottom: 3px;
}

.plugin-list-item-description {
  font-size: 14px;
  opacity: 0.8;
  margin-top: 2px;
}

.plugin-list-item-version,
.plugin-list-item-author {
  font-size: 12px;
  opacity: 0.6;
  margin-top: 4px;
}

a.plugin-list-item-info {
  color: inherit;
  text-decoration: none;
  width: 100%;
}

.plugin-list-item-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.plugin-list-item.uninstalling {
  opacity: 0.5;
}

.plugin-installed-badge {
  font-size: 12px;
  font-weight: 400;
  background: light-dark(
    color-mix(in srgb, var(--highlight-color) 12%, var(--white)),
    color-mix(in srgb, var(--highlight-color) 16%, var(--mid-gray))
  );
  color: var(--highlight-color);
  padding: 3px 8px;
  border-radius: var(--tag-border-radius);
  display: inline-block;
  min-width: fit-content;
  margin-left: 5px;
  vertical-align: middle;
  margin-bottom: 3px;
}

/* Community plugin rows are whole-row navigation links */
#community-plugins-view .plugin-list-item {
  padding: 0;
}

.plugin-list-item-link {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  gap: 24px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
}

.plugin-list-item-link .plugin-list-item-info {
  flex: 1;
  min-width: 0;
}

.plugin-list-item-arrow {
  display: flex;
  align-items: center;
}

.plugin-list-item-arrow .icon {
  width: 20px;
  height: 20px;
}

.plugin-list-item-arrow .icon path {
  stroke: var(--text-color-muted);
}

@media (hover: hover) {
  .plugin-list-item-link:hover {
    background: var(--post-hover-color);
  }
}

.plugin-listing-header {
  padding: 20px 16px;
}

.plugin-listing-name {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
}

.plugin-listing-name .plugin-local-badge {
  font-size: 14px;
}

.plugin-listing-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
  color: var(--text-color-secondary);
}

.plugin-listing-meta a {
  color: var(--primary-button-color);
  text-decoration: none;
  word-break: break-all;
}

@media (hover: hover) {
  .plugin-listing-meta a:hover {
    text-decoration: underline;
  }
}

.plugin-listing-description {
  margin: 16px 0 0;
  font-size: 16px;
  line-height: 1.5;
}

.plugin-listing-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.plugin-listing-readme {
  border-top: var(--hair) solid var(--post-border-color);
  padding: 16px;
}

#community-plugin-listing-view rendered-markdown {
  display: block;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-color);
  word-break: break-word;
}

#community-plugin-listing-view rendered-markdown h1,
#community-plugin-listing-view rendered-markdown h2,
#community-plugin-listing-view rendered-markdown h3,
#community-plugin-listing-view rendered-markdown h4 {
  line-height: 1.25;
  margin: 24px 0 12px;
}

#community-plugin-listing-view rendered-markdown h1 {
  font-size: 24px;
}

#community-plugin-listing-view rendered-markdown h2 {
  font-size: 20px;
}

#community-plugin-listing-view rendered-markdown h3 {
  font-size: 17px;
}

#community-plugin-listing-view
  rendered-markdown
  :is(h1, h2, h3, h4):first-child {
  margin-top: 0;
}

#community-plugin-listing-view rendered-markdown p,
#community-plugin-listing-view rendered-markdown ul,
#community-plugin-listing-view rendered-markdown ol {
  margin: 12px 0;
}

rendered-markdown ul,
rendered-markdown ol {
  padding-left: 24px;
}

rendered-markdown ul {
  list-style: disc;
}

rendered-markdown ol {
  list-style: decimal;
}

rendered-markdown li {
  margin: 4px 0;
}

rendered-markdown li > ul,
rendered-markdown li > ol {
  margin: 4px 0;
}

rendered-markdown ul:has(> li > input[type="checkbox"]) {
  list-style: none;
  padding-left: 0;
}

#community-plugin-listing-view rendered-markdown a {
  color: var(--primary-button-color);
}

#community-plugin-listing-view rendered-markdown img {
  max-width: 100%;
  height: auto;
}

#community-plugin-listing-view rendered-markdown code {
  font-family: var(--mono-font, monospace);
  font-size: 0.9em;
  background: var(--secondary-button-color);
  padding: 2px 5px;
  border-radius: var(--tag-border-radius);
}

#community-plugin-listing-view rendered-markdown pre {
  background: var(--secondary-button-color);
  padding: 12px;
  border-radius: var(--callout-border-radius);
  overflow-x: auto;
}

#community-plugin-listing-view rendered-markdown pre code {
  background: none;
  padding: 0;
}

#community-plugin-listing-view rendered-markdown blockquote {
  margin: 12px 0;
  padding-left: 12px;
  border-left: 3px solid var(--post-border-color);
  color: var(--text-color-secondary);
}

.plugin-content h1,
.plugin-content h2,
.plugin-content h3,
.plugin-content h4 {
  color: var(--text-color);
}

.plugin-system-settings {
  display: block;
  margin-top: 16px;
}

.plugin-system-settings-bar {
  padding: 8px 16px;
  background-color: var(--background-color-secondary);
  border-top: 1px solid var(--generic-border-color);
  border-bottom: 1px solid var(--generic-border-color);
  color: var(--text-color-muted);
}

.plugin-system-settings-body {
  padding: 16px;
}

.plugin-network-access-title {
  font-size: 15px;
  font-weight: 600;
}

.plugin-network-access-description {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-color-muted);
}

.plugin-network-access-list {
  margin-top: 12px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plugin-network-access-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.plugin-network-access-item code {
  font-family: var(--monospace-font, monospace);
  font-size: 13px;
  word-break: break-all;
}

.plugin-content {
  --plugin-prose-inset: 0px;
}

.plugin-content.plugin-content-page {
  --plugin-prose-inset: 16px;
}

.plugin-content :is(h1, h2, h3, h4) {
  padding: 16px var(--plugin-prose-inset);
}

.plugin-content :is(p, pre) {
  padding-inline: var(--plugin-prose-inset);
}

.plugin-content :is(ul, ol) {
  padding-inline: calc(16px + var(--plugin-prose-inset))
    var(--plugin-prose-inset);
}

.plugin-content h1:first-child,
.plugin-content h2:first-child,
.plugin-content h3:first-child,
.plugin-content h4:first-child {
  margin-top: 0;
}

.plugin-content h3 {
  font-size: 16px;
  font-weight: 600;
}

.plugin-content h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-color-secondary);
}

.plugin-content p,
.plugin-content ul,
.plugin-content ol {
  font-size: 14px;
  color: var(--text-color-secondary);
  margin: 8px 0;
}

.plugin-content li {
  margin: 4px 0;
}

.plugin-content pre {
  overflow-x: auto;
}

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

.setting-item-disabled .setting-item-name,
.setting-item-disabled .setting-item-desc {
  color: var(--text-color-muted);
}

.setting-item:last-child {
  border-bottom: none;
}

.setting-item-info {
  flex: 1 1 200px;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

h2.setting-item-name {
  font-size: inherit;
  margin: 0;
}

.setting-item-name {
  font-weight: 600;
  color: var(--text-color);
}

.setting-item-desc {
  font-size: 14px;
  color: var(--text-color-secondary);
  margin-top: 4px;
}

.setting-item-desc a {
  color: var(--text-link-color);
}

.plugin-content .setting-item-name,
.plugin-content .setting-item-desc {
  padding: 0;
}

.plugin-content .setting-item-desc {
  margin: 4px 0 0;
}

.setting-item-control {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.setting-item-dropdown,
.setting-item-text-input,
.setting-item-textarea,
.plugin-content textarea,
.plugin-content
  :is(
    input:not([type]),
    input[type="text"],
    input[type="search"],
    input[type="email"],
    input[type="url"],
    input[type="tel"],
    input[type="password"],
    input[type="number"]
  ) {
  font-size: 16px;
  font-family: inherit;
  padding: 10px 12px;
  border-radius: var(--text-input-border-radius);
  border: var(--hair) solid var(--post-border-color);
  background: var(--text-input-background-color);
  color: var(--text-color);
}

.setting-item-text-input:focus,
.setting-item-textarea:focus,
.plugin-content textarea:focus,
.plugin-content
  :is(
    input:not([type]),
    input[type="text"],
    input[type="search"],
    input[type="email"],
    input[type="url"],
    input[type="tel"],
    input[type="password"],
    input[type="number"]
  ):focus {
  outline: 2px solid var(--highlight-color);
  outline-offset: -1px;
}

.setting-item-textarea,
.plugin-content textarea {
  resize: vertical;
}

.installed-plugins-header {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.installed-plugins-header h2 {
  font-size: 16px;
}

.installed-plugins-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.plugin-check-updates-button {
  min-height: 37px;
}

.external-link-warning-href {
  display: block;
  padding: 12px;
  margin-bottom: 16px;
  border: var(--hair) solid var(--post-border-color);
  border-radius: 8px;
  background-color: light-dark(var(--lightest-gray), var(--gray));
  color: var(--text-color);
  font-size: 16px;
  text-decoration: none;
  word-break: break-all;
  overflow-wrap: anywhere;
}

.external-link-warning-host {
  font-weight: 600;
  color: var(--text-color);
}

.external-link-warning-path {
  color: var(--text-color-secondary, var(--text-color));
  opacity: 0.75;
}

.bottom-sheet.text-modal {
  color: var(--text-color);
}

.bottom-sheet.text-modal .modal-dialog-content {
  padding-top: 32px;
  padding-right: 24px;
  padding-bottom: 16px;
  padding-left: 24px;
}

@media (min-width: 800px) {
  .bottom-sheet.text-modal {
    width: 90%;
    max-width: 410px;
  }
  .bottom-sheet.text-modal.compact {
    max-width: 350px;
  }
  .bottom-sheet.text-modal .modal-dialog-content {
    padding-top: 24px;
    padding-right: 24px;
    padding-bottom: 16px;
    padding-left: 24px;
  }
}

.bottom-sheet.profile-list-modal .profile-list-modal-body {
  max-height: 60vh;
  overflow-y: auto;
  margin: 0 -24px;
}

.bottom-sheet.welcome-modal {
  width: 90%;
  max-width: 410px;
  padding-bottom: 0;
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  max-height: 80vh;
  border: var(--hair) solid var(--post-border-color);
  border-radius: 22px;
  box-shadow: none;
  animation: none;
  transform: translate(-50%, -50%);
}

.bottom-sheet.welcome-modal::before {
  display: none;
}

.bottom-sheet.welcome-modal .modal-dialog-content {
  padding-top: 24px;
}

.sidebar-action-items {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

@media (min-width: 800px) and (max-width: 1199.98px) {
  .logged-out-sidebar .sidebar-footer,
  .logged-out-sidebar .sidebar-action-items,
  .logged-out-sidebar .sidebar-title {
    display: none;
  }

  .footer-nav.logged-out-footer {
    display: flex !important;
  }
}

.subscribe-list-button {
  margin-right: 12px;
}

.plugin-preview-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--footer-height) + var(--safe-area-inset-bottom));
  z-index: calc(var(--footer-z-index) + 1);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid
    color-mix(in srgb, var(--highlight-color) 35%, transparent);
  background: var(--highlight-color-tint);
}

@media (min-width: 1200px) {
  .plugin-preview-banner {
    right: 24px;
    left: auto;
    bottom: 24px;
    max-width: min(360px, calc(100vw - 48px));
    padding: 12px 14px;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "icon body"
      ".    button";
    align-items: center;
    gap: 8px 12px;
    border: 1px solid
      color-mix(in srgb, var(--highlight-color) 35%, transparent);
    border-radius: var(--card-border-radius);
    box-shadow: 0 4px 16px rgb(0 0 0 / 15%);
  }

  .plugin-preview-banner-icon {
    grid-area: icon;
  }

  .plugin-preview-banner-body {
    grid-area: body;
  }

  .plugin-preview-banner-exit {
    grid-area: button;
    justify-self: end;
  }
}

.plugin-preview-banner-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  height: 32px;
  width: 32px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--highlight-color) 20%, transparent);
  color: var(--highlight-color);
}

.plugin-preview-banner-icon .icon {
  width: 18px;
  height: 18px;
}

.plugin-preview-banner-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.plugin-preview-banner-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-color);
  letter-spacing: 0.01em;
}

.plugin-preview-banner-subtitle {
  font-size: 13px;
  color: var(--text-color-muted);
  line-height: 1.4;
}

.plugin-preview-banner-link {
  color: var(--highlight-color);
  font-weight: 500;
  text-decoration: none;
}

.plugin-preview-banner-exit {
  flex: 0 0 auto;
  padding: 8px 14px;
  border: 1px solid color-mix(in srgb, var(--highlight-color) 35%, transparent);
  border-radius: var(--pill-button-border-radius);
  background: transparent;
  color: var(--highlight-color);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

@media (hover: hover) {
  .plugin-preview-banner-exit:hover {
    background: color-mix(in srgb, var(--highlight-color) 12%, transparent);
  }
}

@media (hover: hover) {
  .plugin-preview-banner-link:hover {
    text-decoration: underline;
  }
}
