/* mcpservices.css -- Agents > MCP services…: Connected, This studio's own MCP and the side panel + Add (mcpservices.js).
 * Tokens from core.css; the card is the dialog's own (.dlgcard), only wider. */

.mcs-card { width: 760px; max-width: calc(100vw - 16px); max-height: calc(100vh - 32px); overflow: auto; }
.mcs-with-side .mcs-card { width: 1080px; }
.mcs-head { display: flex; align-items: center; gap: 12px; margin: 0 0 4px; }
.mcs-title { margin: 0; flex: 1; font-size: calc(var(--ui-fs) * 18 / 13); font-weight: 600; color: var(--text-strong); }
.mcs-x { background: none; border: 0; color: var(--text-dim); font-size: 22px; line-height: 1; padding: 2px 6px; border-radius: var(--radius-sm); cursor: pointer; }
.mcs-x:hover { background: var(--hover); color: var(--text); }
.mcs-x:focus-visible { outline: 1px solid var(--focus); outline-offset: 1px; }
.mcs-body { display: flex; gap: 20px; align-items: flex-start; }
.mcs-maincol { flex: 1 1 0; min-width: 0; }
.mcs-group { margin: 14px 0 6px; font-size: calc(var(--ui-fs) * 11 / 13); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); }
.mcs-lead, .mcs-none { margin: 0 0 10px; color: var(--text-dim); line-height: 1.5; }
.mcs-note { margin: 0 0 8px; padding: 6px 10px; border-radius: var(--radius-sm); color: var(--attn); border: 1px solid var(--attn); }

.mcs-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; }
.mcs-row { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 4px 14px; align-items: start; padding: 12px 14px; border-top: 1px solid var(--rule); }
.mcs-row:first-child { border-top: 0; }
.mcs-row:hover { background: var(--hover); }
.mcs-dot { width: 12px; height: 12px; margin-top: 4px; border-radius: 50%; box-sizing: border-box; border: 2px solid var(--text-muted); }
.mcs-dot.on { background: var(--ok); border-color: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
.mcs-dot.off { border-color: var(--text-dim); }
.mcs-dot.bad { background: var(--attn); border-color: var(--attn); }
.mcs-dot.unknown { border-style: dashed; }
.mcs-name { font-weight: 600; color: var(--text-strong); }
.mcs-url { color: var(--text-dim); font-size: calc(var(--ui-fs) * 12 / 13); overflow-wrap: anywhere; }
.mcs-kind { color: var(--text-dim); font-size: calc(var(--ui-fs) * 12 / 13); }
.mcs-facts { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 4px; font-size: calc(var(--ui-fs) * 12 / 13); color: var(--text-dim); }
.mcs-state.on { color: var(--ok); }
.mcs-state.bad { color: var(--attn); }
.mcs-err { margin-top: 4px; font-size: calc(var(--ui-fs) * 12 / 13); color: var(--attn); overflow-wrap: anywhere; }
.mcs-acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; max-width: 16em; }
.mcs-btn { white-space: nowrap; }
.mcs-btn:disabled { opacity: .5; cursor: default; }
.mcs-btn.danger { color: var(--attn); border-color: var(--attn); }

.mcs-own { list-style: none; margin: 0; padding: 0; border: 1px solid var(--rule); border-radius: 6px; }
.mcs-own-row { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 8px 14px; border-top: 1px solid var(--rule); }
.mcs-own-row:first-child { border-top: 0; }
.mcs-own-url { color: var(--text); overflow-wrap: anywhere; }
.mcs-copy { flex: none; }
.mcs-own-about { color: var(--text-dim); font-size: calc(var(--ui-fs) * 12 / 13); }

.mcs-side { flex: 0 0 320px; min-width: 0; border-left: 1px solid var(--rule); padding-left: 20px; }
.mcs-side[hidden], .mcs-note[hidden], .mcs-result[hidden], .mcs-field[hidden] { display: none; }
.mcs-side-head { display: flex; align-items: center; justify-content: space-between; }
.mcs-side-title { margin: 0; font-size: calc(var(--ui-fs) * 15 / 13); font-weight: 600; color: var(--text-strong); }
.mcs-tabs { display: flex; gap: 4px; margin: 10px 0; border-bottom: 1px solid var(--rule); }
.mcs-tab { background: none; border: 0; border-bottom: 2px solid transparent; padding: 4px 10px; color: var(--text-dim); font: inherit; cursor: pointer; }
.mcs-tab.on { color: var(--text-strong); border-bottom-color: var(--focus); }
.mcs-tab:disabled { opacity: .5; cursor: default; }
.mcs-field { margin: 0 0 10px; }
.mcs-label { display: block; margin-bottom: 3px; font-size: calc(var(--ui-fs) * 12 / 13); color: var(--text-dim); }
.mcs-in { width: 100%; box-sizing: border-box; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: 5px 8px; }
.mcs-in:focus-visible { outline: 1px solid var(--focus); outline-offset: 1px; }
.mcs-hint { margin-top: 2px; font-size: calc(var(--ui-fs) * 11 / 13); color: var(--text-dim); }
.mcs-result { margin: 4px 0 8px; padding: 6px 10px; border-radius: var(--radius-sm); border: 1px solid var(--rule); overflow-wrap: anywhere; }
.mcs-result.good { color: var(--ok); border-color: var(--ok); }
.mcs-result.bad { color: var(--attn); border-color: var(--attn); }

/* a phone: the side panel goes under the list, the buttons under the name */
@media (max-width: 760px) {
  .mcs-with-side .mcs-card, .mcs-card { width: calc(100vw - 16px); }
  .mcs-body { flex-direction: column; gap: 12px; }
  .mcs-side { flex: none; width: 100%; border-left: 0; border-top: 1px solid var(--rule); padding: 12px 0 0; }
  .mcs-row { grid-template-columns: 14px minmax(0, 1fr); }
  .mcs-acts { grid-column: 2; justify-content: flex-start; max-width: none; }
}
