/* Settings tabs and forms. */

/* --------------------------------------------------------------- settings */
.settings-card {
  max-width: 760px;
  padding: 24px;
  border-radius: 24px;
  background: var(--card);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 12px;
}

.form-grid .field {
  margin: 0;
}

.form-grid input,
.form-grid select {
  height: 43px;
  padding: 0 14px;
}

/* Room for the chevron on the right. */
.form-grid select {
  padding-right: 44px;
}

.form-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--card2);
}

.toggle-row b {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.toggle-row span {
  font-size: 12px;
  color: var(--muted);
}

.switch {
  position: relative;
  width: 42px;
  height: 24px;
  flex: none;
}

.switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

/* The track is the whole of the control's visible boundary, so it needs the
   3:1 of WCAG 1.4.11: --line was 1.2:1 against the grey row behind it. */
.switch i {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--line-strong);
  transition: background .15s;
}

.switch i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform .15s;
}

.switch input:checked + i {
  background: var(--green-fill);
}

.switch input:checked + i::after {
  transform: translateX(18px);
}

.block {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.block > h4 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
}

@media (max-width:900px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* MCP block: copyable one-liners and a config snippet, plus the one-time
   reveal of a new token. */
.snippet {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--card2);
  border: 1px solid var(--line);
}

.snippet code,
.snippet pre {
  flex: 1;
  min-width: 0;
  margin: 0;
  font: 12.5px/1.5 var(--font-mono);
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--text);
}

.snippet .btn {
  flex: none;
}

.token-new {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--green-bg);
}

.token-new small {
  color: var(--green-ink);
  font-size: 12px;
}

/* Two-factor setup: the QR on the left, the manual key beside it. */
.qr-setup {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
}

.qr-code {
  flex: none;
  padding: 6px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  line-height: 0;
}
