/* Page chrome (navbar, body, footer, container) is provided by Bootstrap and
   driven by data-bs-theme. The rules below style page-specific components.
   All colors use Bootstrap theme tokens (var(--bs-*)) so they follow the
   active light/dark theme. */

/* Signature blue card header (mirrors the prototype). */
.tr-card-header {
  background: var(--bs-primary);
  color: #fff;
  border-bottom: none;
}

.chat-picker { display: flex; flex-direction: column; gap: 0.5rem; }
.picker-actions { display: flex; align-items: center; gap: 0.5rem; }
.picker-status { color: var(--bs-secondary-color); font-size: 0.8rem; }

.chat-results {
  border: 1px solid var(--bs-border-color);
  border-radius: 6px;
  background: var(--bs-body-bg);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.chat-list { display: flex; flex-direction: column; max-height: 220px; overflow-y: auto; }
.chat-item {
  text-align: left;
  padding: 0.45rem 0.6rem;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--bs-body-color);
  cursor: pointer;
  font-size: 0.9rem;
}
.chat-item:hover { background: var(--bs-tertiary-bg); }
.chat-empty { color: var(--bs-secondary-color); font-size: 0.85rem; margin: 0.25rem 0.6rem; }

/* Chip inputs (forwarding form): close button sized to sit inside a badge. */
.tr-chip-x { font-size: 0.55rem; margin-left: 0.15rem; }

/* Telegram auth stepper: numbered nodes joined by a connector line, theme-aware
   via Bootstrap tokens. */
.tr-stepper { counter-reset: tr-step; position: relative; }
.tr-step {
  flex: 1;
  text-align: center;
  position: relative;
  color: var(--bs-secondary-color);
}
.tr-step::before {
  content: "";
  position: absolute;
  top: 1rem;
  left: -50%;
  width: 100%;
  height: 2px;
  background: var(--bs-border-color);
  z-index: 0;
}
.tr-step:first-child::before { display: none; }
.tr-step-num {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--bs-tertiary-bg);
  border: 2px solid var(--bs-border-color);
  font-weight: 600;
}
.tr-step-label { display: block; margin-top: 0.35rem; font-size: 0.85rem; }
.tr-step-active { color: var(--bs-primary); }
.tr-step-active .tr-step-num { background: var(--bs-primary); border-color: var(--bs-primary); color: #fff; }
.tr-step-done { color: var(--bs-success); }
.tr-step-done .tr-step-num,
.tr-step-done::before { background: var(--bs-success); border-color: var(--bs-success); color: #fff; }
