/* MCP uses the same fixed, bordered workspace as the other ADS pages. */
#view.fixed-view:has(>.mcp-fixed-page){height:calc(100dvh - var(--ta-topbar-height,56px))!important;min-height:0!important;overflow:hidden}
#view .mcp-fixed-page{min-height:0!important;overflow:hidden;gap:0}
#view .mcp-frame{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;height:100%;margin:0;padding:0;overflow:hidden;border:1px solid var(--ar-border,#dcdfe7);border-radius:14px;background:var(--ar-surface,var(--paper,#fff))}
.mcp-frame>.mcp-page{display:flex;flex-direction:column;flex:1 1 auto;width:100%;height:100%;max-width:none;min-width:0;min-height:0;margin:0;padding:0;box-sizing:border-box}
.mcp-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;flex:0 0 auto;padding:12px 16px;border-bottom:1px solid var(--ar-border,#dcdfe7)}
.mcp-heading h1{font-size:18px;line-height:26px;font-weight:600;margin:0}
.mcp-heading>.shopify-status{white-space:nowrap}
.mcp-workspace-scroll{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;gap:8px;padding:8px;overflow:auto;overscroll-behavior-y:contain;scrollbar-gutter:stable}
.mcp-page p{color:var(--muted,#6b7280);line-height:1.7;margin:8px 0}
.mcp-card{background:var(--ar-surface,var(--paper,#fff));border:1px solid var(--ar-border,#dcdfe7);border-radius:10px;min-width:0;box-sizing:border-box}
.mcp-connect-card{flex:0 0 auto;border:0;padding:0;background:transparent}
.mcp-agent-tabs{display:flex;flex-wrap:wrap;gap:4px;padding:4px;background:var(--ar-surface-muted,#f6f7fa);border:1px solid var(--ar-border,#dcdfe7);border-radius:8px}
.mcp-agent-tab{display:flex;align-items:center;justify-content:center;min-width:88px;min-height:32px;padding:5px 12px;border:1px solid transparent;border-radius:6px;background:transparent;color:var(--ar-secondary,#515768);font:inherit;font-size:13px;white-space:nowrap;cursor:pointer;transition:background-color .15s,color .15s}
.mcp-agent-tab[aria-selected=true]{background:var(--ar-surface,var(--paper,#fff));border-color:var(--ar-border,#dcdfe7);color:var(--ar-link,#006cdb);font-weight:600}
.mcp-agent-tab:hover:not([aria-selected=true]){background:var(--ar-hover,var(--ar-surface,#fff))}
.mcp-client-panel{padding:0;margin-top:8px;min-width:0}
.mcp-client-panel[hidden]{display:none!important}
.mcp-methods{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);background:var(--ar-surface-muted,#fafafb);border:1px solid var(--ar-border,#dcdfe7);border-radius:10px;padding:20px 0}
.mcp-method{min-width:0;padding:0 24px}
.mcp-manual-method{border-left:1px solid var(--ar-border,#dcdfe7)}
.mcp-method-label{display:block;color:var(--muted,#6b7280);font-size:12px;margin-bottom:8px}
.mcp-method-title{display:flex;align-items:center;gap:8px}
.mcp-method h2{font-size:16px;line-height:24px;margin:0;font-weight:600}
.mcp-method>p{font-size:12px;margin:20px 0 0}
.mcp-recommended{font-size:11px;line-height:18px;padding:0 5px;border-radius:4px;background:var(--ar-success-soft,#edf8f1);color:var(--ar-success,#278156)}
.mcp-agent-prompt{display:flex;align-items:center;gap:16px;margin-top:20px;padding:16px;background:var(--ar-surface,var(--paper,#fff));border:1px solid var(--ar-border,#dcdfe7);border-radius:10px}
.mcp-prompt-content{flex:1;min-width:0}
.mcp-agent-prompt .mcp-prompt-content p{font-size:14px;font-weight:600;line-height:1.8;margin:0;color:var(--ar-ink,var(--ink,#262b35));overflow-wrap:anywhere}
.mcp-copy-prompt{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:32px;padding:5px 9px;font-size:12px;line-height:18px;border-radius:6px;flex-shrink:0;cursor:pointer}
.mcp-agent-prompt>.mcp-copy-prompt{align-self:center;min-height:36px}
.mcp-copy-prompt svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.mcp-label{display:block;font-size:12px;margin:8px 0 0}
.mcp-copy-row{display:flex;align-items:center;gap:8px;margin-top:8px}
.mcp-copy-row input{min-width:0;flex:1;height:34px;font-size:13px;background:var(--ar-surface,var(--paper,#fff))}
.mcp-copy-row button{white-space:nowrap}
.mcp-method .mcp-steps{list-style:none;counter-reset:mcp-step;padding:0;margin:20px 0 0;font-size:12px;line-height:1.7}
.mcp-method .mcp-steps>li{position:relative;padding-left:28px;margin:0 0 20px;counter-increment:mcp-step}
.mcp-method .mcp-steps>li:before{content:counter(mcp-step);position:absolute;left:0;top:0;display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:var(--ar-border,#e0e3ea);color:var(--ar-secondary,#515768);font-size:11px;font-weight:600}
.mcp-method .mcp-steps>li:last-child{margin-bottom:0}
.mcp-steps strong{font-weight:600}
.mcp-steps p{margin:5px 0}
.mcp-auth-hint{font-size:12px}
.mcp-notice{background:var(--ar-surface-muted,#f6f7fa);padding:12px;border-radius:8px;color:var(--muted,#616b7b);line-height:1.7;font-size:12px;margin-top:8px}
.mcp-connections-card{flex:0 0 auto;padding:0;overflow:hidden}
.mcp-connection-count{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 4px;box-sizing:border-box;border-radius:5px;background:var(--ar-surface-muted,#f6f7fa);color:var(--muted,#6b7280);font-size:11px;margin-left:5px;font-weight:500}
.mcp-table-scroll{max-height:340px;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.mcp-connections-table{width:100%;min-width:940px;border-collapse:collapse;font-size:12px}
.mcp-connections-table th,.mcp-connections-table td{text-align:left;padding:10px 12px;border-bottom:1px solid var(--ar-border,#dcdfe7);white-space:nowrap;height:42px;box-sizing:border-box}
.mcp-connections-table thead th{position:sticky;top:0;z-index:1;background:var(--ar-surface-muted,#f6f7fa);font-weight:600}
.mcp-connections-table tbody tr:hover{background:var(--ar-surface-muted,#f6f7fa)}
.mcp-client-name{display:block;max-width:260px;overflow:hidden;text-overflow:ellipsis}
.mcp-connections-pagination{border-top:1px solid var(--ar-border,#dcdfe7);padding:8px 12px;margin:0!important;flex-wrap:wrap;min-height:44px;gap:8px}
.mcp-connections-pagination .pagination-arrow{min-width:60px;width:auto!important;padding-inline:8px}
.mcp-connections-pagination .pagination-settings{gap:12px;white-space:nowrap}
.mcp-connections-pagination .pagination-jump input{width:54px}
.mcp-empty{text-align:center;padding:24px 16px;color:var(--muted,#6b7280)}
.mcp-empty p{margin:0}
.mcp-page :is(button,a,summary,[role=tabpanel],.mcp-table-scroll):focus-visible{outline:2px solid var(--ar-link,#006cdb);outline-offset:-2px}

/* OAuth consent is a separate view in the same bounded system frame. */
.mcp-page:has(>.mcp-consent){display:block;overflow:auto;padding:16px;overscroll-behavior-y:contain}
.mcp-consent{max-width:620px;margin:16px auto;padding:24px;width:100%;box-sizing:border-box}
.mcp-consent h1{font-size:24px;line-height:1.3;margin:0 0 8px;font-weight:650}
.mcp-eyebrow{display:block;font-size:12px;color:var(--muted,#6b7280);margin-bottom:16px}
.mcp-consent-details{display:grid;grid-template-columns:80px 1fr;gap:12px 8px;margin:20px 0;padding:16px 0;border-block:1px solid var(--ar-border,#dcdfe7)}
.mcp-consent-details dt{color:var(--muted,#6b7280)}
.mcp-consent-details dd{margin:0;overflow-wrap:anywhere}
.mcp-consent-scope{margin-top:20px}
.mcp-consent-check{display:flex;align-items:flex-start;gap:12px;padding:16px;border:1px solid var(--ar-border,#dcdfe7);border-radius:10px;margin-top:16px;cursor:pointer}
.mcp-consent-check input{margin-top:3px;flex-shrink:0}
.mcp-consent-check span>span{display:block;font-size:12px;color:var(--muted,#6b7280);line-height:1.7;margin-top:8px}
.mcp-consent-footnote{font-size:12px;margin-top:16px!important}
.mcp-consent-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:24px}
.mcp-inline-error{color:#d82436!important;font-size:12px}
.mcp-inline-error:empty{display:none}
@layer apple-proportions{.mcp-page .mcp-agent-prompt .mcp-prompt-content p{font-weight:600!important}}

@media(max-width:850px){
 .mcp-heading{padding:8px 12px}
 .mcp-heading h1{font-size:18px}
 .mcp-agent-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}
 .mcp-agent-tab{min-width:0;min-height:36px;padding:5px 4px;font-size:12px}
 .mcp-methods{grid-template-columns:1fr;padding:0}
 .mcp-method{padding:16px}
 .mcp-manual-method{border-left:0;border-top:1px solid var(--ar-border,#dcdfe7)}
 .mcp-method>p{margin-top:16px}
 .mcp-agent-prompt{gap:12px;margin-top:16px;padding:14px}
 .mcp-method .mcp-steps{margin-top:16px}
 .mcp-table-scroll{max-height:280px}
 .mcp-consent{padding:16px;margin:8px auto}
 .mcp-consent h1{font-size:21px}
 .mcp-connections-pagination{justify-content:flex-start}
 .mcp-connections-pagination .pagination-settings{margin-left:0}
}
@media(prefers-reduced-motion:reduce){.mcp-agent-tab{transition:none}}

.app-shell .sidebar-foot{grid-template-columns:minmax(0,1fr) 44px!important;grid-template-rows:auto 1px 52px!important}
.sidebar-foot>div{grid-column:1/-1}
.sidebar-foot::before{grid-column:1/-1;grid-row:2}
.sidebar-foot>.sidebar-toggle{grid-column:2;grid-row:3;margin:0!important;align-self:center;justify-self:center}
.sidebar-foot>.mcp-sidebar-entry{grid-column:1;grid-row:3;order:2;display:flex;align-items:center;gap:8px;min-width:0;margin:6px 0 6px 10px;padding:8px;border:0;border-radius:8px;background:transparent;color:var(--ar-secondary,#515768);cursor:pointer;font:inherit;white-space:nowrap}
.mcp-sidebar-entry svg{width:18px;height:18px;flex:0 0 auto;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.sidebar-foot>.mcp-sidebar-entry:hover,.sidebar-foot>.mcp-sidebar-entry[aria-current=page]{background:var(--ar-surface-muted,#eaf3ff);color:var(--ar-link,#006cdb)}
.mcp-sidebar-entry:focus-visible{outline:2px solid var(--ar-link,#006cdb);outline-offset:-2px}
.app-shell.sidebar-collapsed .sidebar-foot{grid-template-columns:1fr!important;grid-template-rows:auto 1px 44px 44px!important}
.app-shell.sidebar-collapsed .sidebar-foot>.mcp-sidebar-entry{grid-column:1;grid-row:3;justify-self:center;margin:0;padding:10px}
.app-shell.sidebar-collapsed .mcp-sidebar-entry span{display:none}
.app-shell.sidebar-collapsed .sidebar-foot>.sidebar-toggle{grid-column:1;grid-row:4}
.app-shell.sidebar-collapsed .sidebar-foot>div{grid-column:1}


@media(max-width:760px){.app-shell .sidebar-foot{display:grid!important}}

/* Keep the outer frame still; only guide content and table rows can scroll. */
.mcp-workspace-scroll{overflow:hidden;scrollbar-gutter:auto}
.mcp-connect-card{display:flex;flex-direction:column;flex:0 1 auto;min-height:0;max-height:calc(100% - 48px)}
.mcp-agent-tabs{flex:0 0 auto}
.mcp-client-panel{min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.mcp-connections-card{display:flex;flex-direction:column;flex:0 0 auto;min-height:0}
#mcp-connections-content{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;overflow:hidden}
#mcp-connections-content[hidden]{display:none!important}
.mcp-table-scroll{flex:1 1 auto;min-height:0;max-height:none}
.mcp-empty{flex:1 1 auto;display:grid;place-items:center;min-height:0}
.mcp-frame .mcp-page>.mcp-card:not(.mcp-consent){margin:16px;padding:16px}
.mcp-frame .mcp-page>.mcp-card>h2{font-size:16px;line-height:24px;margin:0 0 8px}

/* Connection history stays visible with one compact title and status toolbar. */
.mcp-connections-card{flex:1 1 0;min-height:0}
.mcp-connections-header{display:flex;align-items:center;justify-content:flex-start;gap:8px;flex:0 0 auto;padding:2px 10px;border-bottom:1px solid var(--ar-border,#dcdfe7);background:var(--ar-surface,var(--paper,#fff))}
.mcp-connections-title{display:flex;align-items:center;gap:8px;min-width:0}
.mcp-connections-title h2{font-size:13px;line-height:24px;font-weight:600;margin:0}
.mcp-connections-title .mcp-connection-count{margin:0}
.mcp-connections-header [data-mcp-refresh]{margin-left:auto;height:26px;min-height:26px;padding:2px 8px;font-size:12px;line-height:20px}
.mcp-connect-card{flex:0 0 auto;max-height:none}
.mcp-client-panel{flex:0 0 auto;overflow:hidden;scrollbar-gutter:auto;border:1px solid var(--ar-border,#dcdfe7);border-radius:12px;background:var(--ar-surface-muted,#fafafb)}
.mcp-methods{padding:16px 0;border:0;border-radius:inherit;background:transparent}
.mcp-method-label{margin-bottom:6px}
.mcp-method>p{margin-top:16px}
.mcp-agent-prompt{margin-top:16px}
.mcp-method .mcp-steps{margin-top:16px}
.mcp-method .mcp-steps>li{margin-bottom:12px}
.mcp-method .mcp-steps>li:last-child{margin-bottom:0}
.mcp-sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.mcp-connections-pagination{flex:0 0 auto;padding-top:6px;padding-bottom:6px;min-height:40px}
@media(max-width:850px){.mcp-connect-card{flex:0 1 auto;max-height:45%}.mcp-client-panel{flex:0 1 auto;min-height:0;overflow:auto}.mcp-methods{padding:0}.mcp-method{padding:14px 16px}}
@media(min-width:851px) and (max-height:800px){.mcp-connect-card{flex:0 1 auto;max-height:60%}.mcp-client-panel{flex:0 1 auto;min-height:0;overflow:auto}}

.mcp-connections-header [data-mcp-refresh]{--ar-control:26px;--ar-control-padding:2px 8px;--ads-control-height:26px}

/* Shared external copy controls use the system control size in every client. */
.mcp-copy-row{--ar-control:36px;--ads-control-height:36px;align-items:stretch}
.mcp-copy-row input{box-sizing:border-box;--ar-control-padding:0 12px;height:36px;min-height:36px;line-height:20px}
.mcp-copy-row .mcp-copy-prompt{height:36px;min-height:36px;--ar-control-padding:0 12px;align-self:center}
.mcp-command-row input{font-family:var(--ads-font-mono);font-size:12px}
.mcp-connect-card{flex:0 1 auto;min-height:0;max-height:calc(100% - 160px)}
.mcp-client-panel{flex:0 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain}
.mcp-connections-title{color:var(--ar-ink,var(--ink,#262b35));white-space:nowrap}
.mcp-connection-filters{display:flex;align-items:center;gap:2px;margin-left:0;padding:1px;background:var(--ar-surface-muted,#f6f7fa);border-radius:6px}
.mcp-connection-filter{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:2px 6px;min-height:24px;border:1px solid transparent;border-radius:4px;background:transparent;color:var(--ar-secondary,#515768);font:inherit;font-size:12px;white-space:nowrap;cursor:pointer}
.mcp-connection-filter[aria-selected=true]{background:var(--ar-surface,var(--paper,#fff));border-color:var(--ar-border,#dcdfe7);color:var(--ar-link,#006cdb);font-weight:600}
.mcp-connection-filter:hover:not([aria-selected=true]){background:var(--ar-hover,var(--ar-surface,#fff))}
.mcp-filter-count{font-size:11px;font-variant-numeric:tabular-nums;opacity:.8}
.mcp-connections-header{min-height:32px;box-sizing:border-box}
@media(min-width:851px) and (max-height:800px){.mcp-connect-card{max-height:60%}}

/* Choose the actual Claude client; each tutorial keeps its complete steps. */
.mcp-manual-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.mcp-guide-tabs{display:inline-flex;align-items:center;gap:2px;padding:2px;border:1px solid var(--ar-border,#dcdfe7);border-radius:7px;background:var(--ar-surface,var(--paper,#fff))}
.mcp-guide-tab{border:1px solid transparent;border-radius:5px;padding:3px 8px;min-height:28px;line-height:20px;background:transparent;color:var(--ar-secondary,#515768);font:inherit;font-size:12px;cursor:pointer;white-space:nowrap}
.mcp-guide-tab[aria-selected=true]{border-color:var(--ar-border,#dcdfe7);background:var(--ar-surface-muted,#f6f7fa);color:var(--ar-link,#006cdb);font-weight:600}
.mcp-guide-tab:hover:not([aria-selected=true]){background:var(--ar-hover,var(--ar-surface-muted,#f6f7fa))}
.mcp-guide-panel[hidden]{display:none!important}
.mcp-method .mcp-guide-panel .mcp-steps{font-size:13px;line-height:1.65}
.mcp-setup-fields{display:flex;align-items:center;flex-wrap:wrap;gap:8px 24px;margin-top:6px;color:var(--muted,#6b7280);font-size:12px}
.mcp-setup-fields b{font-weight:600;color:var(--ar-ink,var(--ink,#262b35));margin-left:4px}
@media(max-width:850px){.mcp-connect-card{max-height:50%}.mcp-connections-header{flex-wrap:wrap;gap:4px 8px;padding:4px 8px}.mcp-connection-filters{order:3;flex:1 0 100%;margin:0;justify-content:center}.mcp-connections-header [data-mcp-refresh]{margin-left:auto}.mcp-manual-heading{align-items:flex-start}.mcp-guide-tabs{max-width:100%}}
@media(pointer:coarse){.mcp-guide-tab,.mcp-connection-filter{min-height:36px}.mcp-connections-header [data-mcp-refresh]{--ar-control:36px;--ads-control-height:36px}}

@layer apple-proportions{
 #view .mcp-page .mcp-connection-filters{--mcp-status-radius:8px;height:28px!important;min-height:28px!important;padding:1px!important;gap:2px!important;border-radius:var(--mcp-status-radius)!important}
 #view .mcp-page .mcp-connection-filters .mcp-connection-filter{height:24px!important;min-height:24px!important;padding:0 6px!important;border-radius:calc(var(--mcp-status-radius) - 2px)!important}
 @media(pointer:coarse){#view .mcp-page .mcp-connection-filters{height:40px!important;min-height:40px!important}#view .mcp-page .mcp-connection-filters .mcp-connection-filter{height:36px!important;min-height:36px!important}}
}
