/* WebMCP Bridge Admin Styles */
.webmcp-bridge-admin { max-width: 1100px; }

.webmcp-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #fff;
    padding: 32px 36px;
    border-radius: 12px;
    margin: 24px 0 20px;
}
.webmcp-logo { font-size: 28px; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 6px; }
.webmcp-tagline { opacity: 0.7; margin: 0; font-size: 14px; }

.webmcp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
@media (max-width: 900px) { .webmcp-grid { grid-template-columns: 1fr; } }

.webmcp-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 24px 28px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.webmcp-card h2 { margin-top: 0; font-size: 16px; border: none; padding: 0; }

.webmcp-dev-card { margin-bottom: 40px; }

.webmcp-table th { font-weight: 600; width: 180px; padding: 12px 0; }
.webmcp-table td { padding: 12px 0; }

/* Toggle switch */
.webmcp-toggle { position: relative; display: inline-block; width: 42px; height: 24px; }
.webmcp-toggle input { opacity: 0; width: 0; height: 0; }
.webmcp-toggle-slider {
    position: absolute; inset: 0;
    background: #ccc; border-radius: 24px; cursor: pointer;
    transition: .3s;
}
.webmcp-toggle-slider:before {
    content: ''; position: absolute;
    width: 18px; height: 18px; left: 3px; bottom: 3px;
    background: white; border-radius: 50%; transition: .3s;
}
.webmcp-toggle input:checked + .webmcp-toggle-slider { background: #2563eb; }
.webmcp-toggle input:checked + .webmcp-toggle-slider:before { transform: translateX(18px); }
.webmcp-toggle input:disabled + .webmcp-toggle-slider { opacity: 0.4; cursor: not-allowed; }

.webmcp-url-box {
    display: flex; align-items: center; gap: 10px;
    background: #f4f6f8; border: 1px solid #ddd;
    border-radius: 6px; padding: 10px 14px;
}
.webmcp-url-box code { flex: 1; font-size: 12px; word-break: break-all; background: none; }

.webmcp-tools-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; max-height: 340px; overflow-y: auto; }
.webmcp-tool-row { display: flex; align-items: baseline; gap: 8px; font-size: 13px; padding: 4px 0; border-bottom: 1px solid #f0f0f0; }
.webmcp-tool-desc { color: #666; font-size: 12px; }

.webmcp-tool-badge {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    padding: 2px 6px; border-radius: 4px; white-space: nowrap;
}
.webmcp-badge-core        { background: #dbeafe; color: #1e40af; }
.webmcp-badge-woocommerce { background: #fde8ef; color: #9b1368; }
.webmcp-badge-custom      { background: #dcfce7; color: #15803d; }

.webmcp-code {
    background: #1e1e2e; color: #cdd6f4;
    border-radius: 8px; padding: 20px;
    font-size: 12px; line-height: 1.6;
    overflow-x: auto; white-space: pre;
}

/* ---- Mescio badge in header ---- */
.webmcp-mescio-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 13px;
    margin-top: 8px;
}

/* ---- Notice: install Mescio ---- */
.webmcp-notice-mescio {
    background: #f0f6fc;
    border-left: 3px solid #2563eb;
    border-radius: 0 6px 6px 0;
    padding: 10px 14px;
    margin: 14px 0 0;
    font-size: 13px;
}
.webmcp-warn { color: #c00 !important; }

/* ---- Examples card ---- */
.webmcp-examples-card { margin-bottom: 20px; }

/* ---- Tabs ---- */
.webmcp-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0;
}
.webmcp-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    border-radius: 4px 4px 0 0;
    transition: color .2s, border-color .2s;
}
.webmcp-tab:hover  { color: #1a1a2e; }
.webmcp-tab.is-active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    background: none;
}

/* ---- Tab panels ---- */
.webmcp-tab-panel  { display: none; }
.webmcp-tab-panel.is-active { display: block; }
.webmcp-ex-desc { color: #555; margin: 0 0 12px; font-size: 13px; }

/* ---- Example grid: curl + JS side by side ---- */
.webmcp-ex-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 14px;
}
@media (max-width: 900px) { .webmcp-ex-grid { grid-template-columns: 1fr; } }

.webmcp-ex-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #9ca3af;
    margin-bottom: 6px;
}
.webmcp-copy-small {
    font-size: 11px !important;
    padding: 1px 8px !important;
    height: auto !important;
}
.webmcp-code-sm {
    font-size: 11px !important;
    padding: 12px !important;
    max-height: 140px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* ---- Live runner ---- */
.webmcp-runner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.webmcp-run-status { font-size: 12px; color: #c00; }
.webmcp-run-output {
    width: 100%;
    margin-top: 10px;
    background: #0d1117;
    color: #79c0ff;
    border-radius: 8px;
    padding: 16px;
    font-size: 12px;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre;
    max-height: 320px;
    overflow-y: auto;
}
