/* "Pilcrow in Teams" — the panel, and the one-time nudge.
 *
 * Built on the shared administrative dialog (.admin-settings-dialog), with
 * colour only from the theme's tokens: the same rules draw it light and dark.
 */

.teams-connect-dialog { width: min(640px, calc(100vw - 32px)); }
.teams-connect-dialog .admin-settings-head h2 { display: flex; align-items: center; gap: 10px; }

/* The mark: a chat bubble in the accent, so the panel and the nudge read as one thing. */
.tc-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: var(--r-md);
  background: var(--accent-tint);
  color: var(--accent);
}
.tc-mark svg { width: 17px; height: 17px; }

.tc-teams { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.tc-teams .chip.on { background: var(--accent-tint); border-color: var(--accent); color: var(--accent); }

/* ---- the state, and its one next step ---- */

.tc-hero {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--bg);
}
.tc-hero h3 { margin: 10px 0 6px; font-size: 18px; line-height: 1.3; letter-spacing: -0.01em; }
.tc-hero > .tc-pill + h3 { margin-top: 12px; }
.tc-hero h3:first-child { margin-top: 0; }
.tc-hero p { margin: 0; color: var(--text-mid); font-size: 14px; line-height: 1.55; }
.tc-hero .tc-note { margin-top: 12px; }

.tc-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 10px 3px 8px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-strong);
  background: var(--card);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-mid);
}
.tc-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--idle-dot); }
.tc-pill-ok { border-color: var(--ok-border); background: var(--ok-bg); color: var(--ok); }
.tc-pill-ok .tc-dot { background: var(--sync-dot); }
.tc-pill-ready .tc-dot { background: var(--accent); }
.tc-pill-paused .tc-dot { background: var(--warn-dot); }
.tc-pill-attention { border-color: var(--attn-border); background: var(--attn-bg); color: var(--attn-text); }
.tc-pill-attention .tc-dot { background: var(--attn-chip); }
.tc-pill-waiting { border-color: var(--snap-border); background: var(--snap-bg); color: var(--snap-text); }
.tc-pill-waiting .tc-dot { background: var(--snap-dot); animation: tc-pulse 1.4s ease-in-out infinite; }
@keyframes tc-pulse { 50% { opacity: 0.25; } }

.tc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.tc-actions .ghost-btn, .tc-actions .primary, .tc-primary { min-height: 34px; }
.tc-actions svg { flex: none; width: 14px; height: 14px; }

/* A link that is the primary thing to do: dressed as the primary button. */
.tc-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--r-md);
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: filter 0.12s ease;
}
.tc-primary:hover { filter: brightness(1.08); }
.tc-primary:focus-visible, .teams-connect-dialog a.ghost-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.teams-connect-dialog a.ghost-btn { text-decoration: none; }
.teams-connect-dialog [aria-busy='true'] { opacity: 0.6; pointer-events: none; }

.tc-note { margin: 0; color: var(--text-soft); font-size: 12.5px; line-height: 1.55; }
.tc-warn {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--attn-border);
  border-radius: var(--r-md);
  background: var(--attn-bg);
  color: var(--attn-text);
  font-size: 13px;
  line-height: 1.55;
}
.tc-flash {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px 14px;
  border: 1px solid var(--ok-border);
  border-radius: var(--r-md);
  background: var(--ok-bg);
  color: var(--ok);
  font-size: 13.5px;
  font-weight: 600;
}
.tc-flash svg { flex: none; width: 15px; height: 15px; }

/* ---- what arrives, and what you can type ---- */

.tc-sec { margin-top: 22px; }
.tc-sec h4 {
  margin: 0 0 8px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.tc-sec h4:not(:first-child) { margin-top: 18px; }
.tc-list { list-style: none; margin: 0 0 12px; padding: 0; border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.tc-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 9px 14px;
  font-size: 13.5px;
  line-height: 1.45;
  background: var(--card);
}
.tc-list li + li { border-top: 1px solid var(--border-soft); }
.tc-can { flex: none; max-width: 52%; text-align: right; color: var(--text-soft); font-size: 12.5px; }
.tc-commands code {
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-body);
  overflow-wrap: anywhere;
}

/* ---- setting it up ---- */

.tc-steps { list-style: none; margin: 0 0 12px; padding: 0; }
.tc-step { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid var(--border-soft); }
.tc-step:first-child { border-top: 0; padding-top: 4px; }
.tc-step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--card);
  font-size: 12.5px;
  font-weight: 650;
  color: var(--text-mid);
}
.tc-step-n svg { width: 13px; height: 13px; }
.tc-step-done .tc-step-n { border-color: var(--ok-border); background: var(--ok-bg); color: var(--ok); }
.tc-step-body { flex: 1; min-width: 0; }
.tc-step-body h5 { margin: 3px 0 6px; font-size: 14px; font-weight: 650; }
.tc-step-body p { margin: 0; color: var(--text-mid); font-size: 13.5px; line-height: 1.55; }
.tc-step-body a { color: var(--accent); }

.tc-copy { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.tc-copy code {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface-sunken);
  font-family: var(--font-mono);
  font-size: 12px;
  overflow-wrap: anywhere;
  user-select: all;
}
.tc-form { margin-top: 2px; }
.tc-form label { margin-top: 12px !important; }
.tc-form input { font-family: var(--font-mono); font-size: 13px; }
.tc-inline { display: flex; gap: 8px; align-items: center; }
.tc-inline input { flex: 1; min-width: 0; }
.tc-result { min-height: 1.2em; margin: 8px 0 0 !important; font-size: 12.5px !important; color: var(--text-soft) !important; }
.tc-result-bad { color: var(--danger) !important; }

/* ---- the nudge ---- */

.tc-nudge {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  display: flex;
  gap: 12px;
  width: min(380px, calc(100vw - 32px));
  padding: 16px 40px 16px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--card);
  box-shadow: var(--e4);
  color: var(--text);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.tc-nudge.show { opacity: 1; transform: none; }
.tc-nudge b { display: block; font-size: 14px; }
.tc-nudge p { margin: 4px 0 0; color: var(--text-mid); font-size: 13px; line-height: 1.5; }
.tc-nudge .tc-actions { margin-top: 12px; }
.tc-nudge-close { position: absolute; top: 8px; right: 8px; }
.tc-nudge-close svg { width: 13px; height: 13px; }

/* Beside "Manage notification connections" on the team screen. */
.team-notify-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* The line in "Your data". */
.acct-teams-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.acct-teams-row .acct-note { flex: 1; min-width: 200px; margin: 0; }

@media (max-width: 560px) {
  .tc-hero { padding: 16px; }
  .tc-hero h3 { font-size: 17px; }
  .tc-list li { flex-direction: column; gap: 2px; }
  .tc-can { max-width: none; text-align: left; }
  .tc-step { gap: 10px; }
  .tc-copy { flex-direction: column; align-items: stretch; }
  .tc-actions .ghost-btn, .tc-actions .primary, .tc-primary { min-height: 40px; }
  .tc-nudge { right: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .tc-pill-waiting .tc-dot { animation: none; }
  .tc-nudge { transition: none; transform: none; }
}
