/* Single sign-on card (#/app/team, owner only). Builds on the .tc-card family in
   team-config.css, so it themes through the same tokens. */

.tsso-intro { margin: 0; }
.tsso-guide-link { color: var(--primary); font-weight: 500; white-space: nowrap; }
.tsso-guide-link:hover, .tsso-guide-link:focus-visible { color: var(--primary-hover); }
.tsso-form { display: flex; flex-direction: column; gap: 12px; }
.tsso-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.tsso-field label, .tsso-copy label { font-size: 13px; color: var(--text-soft); }
.tsso-field .tc-input { width: 100%; box-sizing: border-box; }
.tsso-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.tsso-urls { display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--border); padding-top: 12px; }
.tsso-copy { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.tsso-copy-row { display: flex; gap: 8px; align-items: center; min-width: 0; }
.tsso-readonly { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; background: var(--bg-soft); text-overflow: ellipsis; }
.tsso-copy-btn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex: 0 0 auto; min-width: 92px; justify-content: center; }

.tsso-domain-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tsso-domain { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tsso-domain.is-new { animation: kpRise .3s cubic-bezier(.2, .7, .3, 1) both; }
.tsso-domain-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tsso-domain-name { font-size: 14px; font-weight: 600; color: var(--text); overflow-wrap: anywhere; margin-right: auto; }
.tsso-domain .tc-list-sub { margin: 0; }

.tsso-msg {
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-soft);
  padding: 10px 12px; font-size: 14px; color: var(--text); overflow-wrap: anywhere;
  animation: kpRise .3s cubic-bezier(.2, .7, .3, 1) both;
}
.tsso-msg-ok { background: var(--primary-soft); border-color: transparent; color: var(--primary); }
.tsso-msg-err { border-color: var(--danger); color: var(--danger); }

.tsso-test .tc-policy-row { flex-wrap: wrap; }
.tsso-test .btn[disabled], .tsso-card .btn[disabled] { opacity: .55; cursor: not-allowed; }
.tc-switch[disabled] { opacity: .5; cursor: not-allowed; }

/* Activity: newest first, one compact row each. */
.tsso-muted { margin: 0; font-size: 13px; color: var(--text-soft); }
.tsso-uncovered { animation: kpRise .3s cubic-bezier(.2, .7, .3, 1) both; }
.tsso-activity { animation: kpRise .3s cubic-bezier(.2, .7, .3, 1) both; }
.tsso-activity-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tsso-act {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 2px;
  padding: 8px 0; border-top: 1px solid var(--border); font-size: 13px; min-width: 0;
}
.tsso-act:first-child { border-top: 0; }
.tsso-act-main { color: var(--text); overflow-wrap: anywhere; }
.tsso-act-when { grid-column: 2; grid-row: 1; color: var(--text-soft); white-space: nowrap; text-align: right; }
.tsso-act-who { grid-column: 1; color: var(--text-soft); overflow-wrap: anywhere; }

@media (max-width: 480px) {
  .tsso-copy-row { flex-wrap: wrap; }
  .tsso-copy-row .tsso-readonly { flex-basis: 100%; }
  .tsso-copy-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .tsso-domain.is-new, .tsso-msg, .tsso-uncovered, .tsso-activity { animation: none; }
}
