/* "חיבורי AI (MCP)" page (2026-10-15). Hebrew, right-to-left, phone first; built on style.css's
   cards, buttons, segmented control and theme variables. */
.ai-page { direction: rtl; text-align: right; max-width: 760px; }
.ai-banner {
  background: rgba(255, 69, 58, 0.12); color: var(--text); border: 1px solid rgba(255, 69, 58, 0.35);
  border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; font-size: 14px;
}
.ai-note { font-size: 13px; color: var(--text-dim); margin-top: 8px; line-height: 1.55; }
.ai-note code, .ai-steps code { font-size: 12px; }
.ai-empty { font-size: 13px; color: var(--text-dim); padding: 6px 0; }

.ai-endpoint { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.ai-endpoint code {
  flex: 1; min-width: 0; padding: 10px 12px; border-radius: 12px; background: var(--bg-input); border: 1px solid var(--border);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; overflow-wrap: anywhere; user-select: all;
  text-align: left;
}
.ai-steps { margin: 12px 0 0; padding-inline-start: 20px; font-size: 14px; line-height: 1.6; }
.ai-status { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.ai-pill { display: inline-block; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--bg-input); }
.ai-pill.on { background: rgba(48, 209, 88, 0.16); color: var(--green); }
.ai-pill.off { background: rgba(255, 69, 58, 0.14); color: var(--red); }

/* Client / token rows */
.ai-list { margin-top: 6px; }
.ai-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 2px; border-bottom: 1px solid var(--border); }
.ai-row:last-child { border-bottom: none; }
.ai-row-main { flex: 1; min-width: 0; }
.ai-row-name { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.ai-row-meta { font-size: 12px; color: var(--text-dim); margin-top: 2px; line-height: 1.5; }
.ai-row-meta [dir="ltr"] { unicode-bidi: isolate; }
.ai-row .btn { flex-shrink: 0; }
.ai-row.dead .ai-row-name { color: var(--text-dim); text-decoration: line-through; }
.ai-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; margin-inline-start: 6px; vertical-align: 1px; }
.ai-tag.on { background: rgba(48, 209, 88, 0.16); color: var(--green); }
.ai-tag.off { background: var(--bg-input); color: var(--text-dim); }

/* Static token form + the one-time display */
.ai-token-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-top: 10px; }
.ai-token-form .form-group { margin: 0; flex: 1 1 160px; }
.ai-token-form .btn { min-height: 46px; }
.ai-token-scope { flex: 1 1 100%; display: flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }
.ai-token-scope input { width: 20px; height: 20px; margin: 0; flex-shrink: 0; accent-color: var(--primary); }
.ai-token-scope code { font-size: 12px; color: var(--text-dim); }
.ai-tag.write { background: rgba(255, 159, 10, 0.16); color: var(--primary); }
.ai-new-token {
  margin-top: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--primary);
  background: rgba(255, 159, 10, 0.08);
}
.ai-new-token-title { font-size: 14px; font-weight: 700; }
.ai-new-token .btn { margin-top: 8px; }

/* Audit */
.ai-audit-group { margin-top: 6px; }
.ai-audit-q {
  width: 100%; margin-top: 8px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg-input); color: var(--text); font: inherit; font-size: 14px;
}
.ai-audit { margin-top: 8px; }
.ai-log { padding: 8px 2px; border-bottom: 1px solid var(--border); font-size: 13px; }
.ai-log:last-child { border-bottom: none; }
.ai-log-top { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.ai-log-ok { font-weight: 700; }
.ai-log-ok.yes { color: var(--green); }
.ai-log-ok.no { color: var(--red); }
.ai-log-what { font-weight: 600; }
.ai-log-who { color: var(--text-dim); overflow-wrap: anywhere; }
.ai-log-time { color: var(--text-dim); margin-inline-start: auto; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ai-log-args, .ai-log-detail {
  margin-top: 3px; color: var(--text-dim); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px;
  overflow-wrap: anywhere; direction: ltr; text-align: left;
}
.ai-log-detail { font-family: inherit; font-size: 12px; direction: inherit; text-align: inherit; }

.ai-danger { border: 1px solid rgba(255, 69, 58, 0.35); }
.ai-danger .btn { margin-top: 10px; }
