/* V1.8.39 — separate Tag-Team room editor, corrected Friends actions, and quote search/display. */

/* Public-profile injection adds both Profile and Message actions. Give each action its own
   desktop grid column so Message cannot wrap into the presence-dot column. */
.friends-dropdown .friend-dropdown-item {
  grid-template-columns: 12px minmax(0, 1fr) auto auto !important;
}
.friends-dropdown .friend-dropdown-item > .public-profile-open-button,
.friends-dropdown .friend-dropdown-item > .friend-dropdown-message {
  width: auto !important;
  min-width: 84px;
  min-height: 38px;
  margin: 0 !important;
  padding: 0.45rem 0.75rem !important;
  align-self: center;
  justify-self: end;
  white-space: nowrap;
}

/* The full Friends panel uses a consistent two-column row with one stable action group. */
#friendList .social-item {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center !important;
  gap: 14px;
}
#friendList .social-item-actions {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
#friendList .social-item-actions .button {
  width: auto !important;
  min-width: 96px;
  min-height: 40px;
  margin: 0 !important;
  white-space: nowrap;
}

.quote-only-search-option {
  margin-top: -0.25rem;
  padding-left: 1.6rem;
  color: var(--muted);
  font-size: 0.82rem;
}
.quote-only-search-option:has(input:disabled) {
  opacity: 0.52;
}
.card-quote-box {
  margin-top: 0.8rem;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: Georgia, serif;
  font-style: italic;
  line-height: 1.5;
  text-align: center;
}
.card-quote-box p { margin: 0; }

/* Tag-Team rooms keep their dedicated room deck and never mount the selected Normal deck. */
.tag-team-route #tagTeamOwnDeckView > .tag-team-builder-grid {
  display: grid !important;
}
.tag-team-route .tag-team-original-deck-editor {
  display: none !important;
}

@media (max-width: 620px) {
  .friends-dropdown .friend-dropdown-item {
    grid-template-columns: 10px minmax(0, 1fr) auto auto !important;
    gap: 0.4rem !important;
  }
  .friends-dropdown .friend-dropdown-item > .public-profile-open-button,
  .friends-dropdown .friend-dropdown-item > .friend-dropdown-message {
    min-width: 72px;
    padding-inline: 0.55rem !important;
    font-size: 0.74rem;
  }
  #friendList .social-item {
    grid-template-columns: 1fr;
    align-items: stretch !important;
  }
  #friendList .social-item-actions {
    width: 100%;
    justify-content: stretch;
  }
  #friendList .social-item-actions .button {
    flex: 1 1 0;
    min-width: 0;
  }
}
