/* Comment mentions stay scoped to the public Playbook Browser. */
.pb-mention {
  color: var(--accent, #74b8ff);
  background: rgba(116, 184, 255, 0.12);
  border-radius: 3px;
  padding: 0 2px;
  overflow-wrap: anywhere;
}
.pb-mention-picker {
  border: 1px solid var(--border, #666);
  border-radius: 6px;
  padding: 4px;
  max-width: 100%;
}
.pb-mention-picker [role='listbox'] {
  max-height: 220px;
  overflow-y: auto;
}
.pb-mention-picker [role='option'] {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 4px;
  color: inherit;
  background: transparent;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.pb-mention-picker [aria-selected='true'] {
  background: rgba(116, 184, 255, 0.18);
  outline: 2px solid var(--accent, #74b8ff);
  outline-offset: -2px;
}
.pb-mention-picker .pb-muted {
  margin: 8px;
}
.pb-comment:focus {
  outline: 2px solid var(--accent, #74b8ff);
  outline-offset: 3px;
}

/* The native dialog keeps focus in the picker on desktop and in the phone sheet. */
.pb-connection-picker {
  position: static;
  margin: 12px 0;
  color: var(--text, #e6edf3);
  background: var(--surface, #11131b);
  border: 1px solid var(--border, #23262f);
  border-radius: 12px;
  padding: 0;
  width: 100%;
  max-width: none;
  max-height: none;
  overflow: hidden;
}
.pb-connection-picker::backdrop {
  background: rgba(0, 0, 0, 0.65);
}
.pb-picker-form {
  display: flex;
  flex-direction: column;
  max-height: none;
}
.pb-picker-form > h3 {
  margin: 0;
  padding: 16px;
  border-bottom: 1px solid var(--border, #23262f);
}
.pb-picker-body {
  padding: 16px;
  overflow-y: auto;
  min-height: 0;
}
.pb-picker-body .pb-label {
  margin: 12px 0 8px;
}
.pb-picker-types {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.pb-picker-types button {
  min-height: 44px;
  white-space: normal;
}
.pb-picker-types [aria-pressed='true'],
.pb-picker-body [data-pb-picker-concept][aria-pressed='true'] {
  border-color: var(--primary, #ffb02e);
  color: var(--primary, #ffb02e);
  background: rgba(255, 176, 46, 0.1);
}
.pb-picker-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.pb-picker-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  color: inherit;
  background: var(--page, #0a0c10);
  border: 2px solid var(--border, #23262f);
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.pb-picker-card[aria-pressed='true'] {
  border-color: var(--primary, #ffb02e);
}
.pb-picker-card strong,
.pb-picker-card small {
  padding: 4px 8px;
}
.pb-picker-card small {
  padding-bottom: 8px;
  color: var(--text-muted, #8b949e);
}
.pb-picker-art {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.pb-picker-art svg {
  width: 100%;
  height: 100%;
}
.pb-picker-footer {
  flex-shrink: 0;
  padding: 12px 16px;
  border-top: 1px solid var(--border, #23262f);
}
.pb-picker-footer p {
  margin: 0 0 10px;
  overflow-wrap: anywhere;
}
.pb-picker-footer button {
  min-height: 44px;
}
.pb-picker-footer [type='submit'] {
  min-height: 48px;
}
.pb-picker-card:focus-visible {
  outline: 2px solid var(--primary, #ffb02e);
  outline-offset: -4px;
}
@media (max-width: 640px) {
  .pb-connection-picker {
    position: fixed;
    inset: auto 0 0;
    margin: 0;
    width: 100%;
    max-height: 92dvh;
    border-radius: 18px 18px 0 0;
  }
  .pb-picker-form {
    max-height: 92dvh;
  }
  .pb-picker-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pb-picker-types {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pb-picker-footer {
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
  .pb-picker-footer [type='submit'] {
    display: block;
    width: 100%;
    margin-top: 8px;
  }
  .pb-picker-body [data-pb-picker-concept] {
    min-height: 44px;
  }
}
