/* WebView2 Component API documentation — styles */

:root {
    --bg: #f5f6f8;
    --bg-elevated: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-code: #f0f1f4;
    --border: #e2e4e9;
    --text: #1f2328;
    --text-muted: #6b7280;
    --accent: #2f6fed;
    --accent-soft: rgba(47, 111, 237, 0.12);
    --kind-method: #8250df;
    --kind-event: #cf5100;
    --kind-type: #1a7f37;
    --kind-facade: #0969da;
    --kind-host: #bf3989;
    --kind-property: #0a7ea4;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
    --radius: 10px;
    --mono: "Cascadia Code", "SF Mono", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --sidebar-w: 300px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0d1117;
        --bg-elevated: #161b22;
        --bg-sidebar: #0d1117;
        --bg-code: #161b22;
        --border: #21262d;
        --text: #e6edf3;
        --text-muted: #8b949e;
        --accent: #4d8bff;
        --accent-soft: rgba(77, 139, 255, 0.15);
        --kind-method: #d2a8ff;
        --kind-event: #ffa657;
        --kind-type: #7ee787;
        --kind-facade: #79c0ff;
        --kind-host: #ff9bce;
        --kind-property: #56d4dd;
        --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
    }
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

code {
    font-family: var(--mono);
    font-size: 0.86em;
    background: var(--bg-code);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 0.1em 0.4em;
}

pre {
    background: var(--bg-code);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    overflow-x: auto;
    line-height: 1.55;
}

pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.85em;
}

/* Layout */

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 18px;
    height: 60px;
    padding: 0 22px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    backdrop-filter: saturate(180%) blur(8px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 650;
    color: var(--text);
    white-space: nowrap;
}

.brand:hover {
    text-decoration: none;
}

.brand .logo {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent), #7c3aed);
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: -0.5px;
}

.brand .tag {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2px 9px;
    letter-spacing: 0.3px;
}

.topbar .search {
    flex: 1;
    max-width: 460px;
    position: relative;
}

.topbar .search input {
    width: 100%;
    height: 38px;
    padding: 0 14px 0 38px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    font-family: var(--sans);
    outline: none;
}

.topbar .search input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.topbar .search .icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.topbar .links {
    display: flex;
    gap: 16px;
    margin-left: auto;
    font-size: 14px;
    white-space: nowrap;
}

.search-results {
    position: absolute;
    top: 46px;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
    max-height: 60vh;
    overflow-y: auto;
    display: none;
    padding: 6px;
}

.search-results.open {
    display: block;
}

.search-results .sr-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 7px;
    cursor: pointer;
}

.search-results .sr-item:hover,
.search-results .sr-item.active {
    background: var(--accent-soft);
}

.search-results .sr-name {
    font-family: var(--mono);
    font-size: 13px;
}

.search-results .sr-cat {
    margin-left: auto;
    font-size: 11px;
    color: var(--text-muted);
}

.search-empty {
    padding: 14px;
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
}

.shell {
    display: grid;
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
    max-width: 1440px;
    margin: 0 auto;
}

.sidebar {
    position: sticky;
    top: 60px;
    align-self: start;
    height: calc(100vh - 60px);
    overflow-y: auto;
    padding: 22px 12px 60px 22px;
    border-right: 1px solid var(--border);
}

.sidebar .group {
    margin-bottom: 20px;
}

.sidebar .group-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--text-muted);
    font-weight: 700;
    padding: 4px 10px;
    margin-bottom: 4px;
}

.sidebar a.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border-radius: 7px;
    color: var(--text);
    font-size: 13.5px;
}

.sidebar a.nav-link:hover {
    background: var(--accent-soft);
    text-decoration: none;
}

.sidebar a.nav-link.active {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

.sidebar a.nav-link .count {
    margin-left: auto;
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-code);
    border-radius: 20px;
    padding: 1px 8px;
}

.content {
    padding: 34px 44px 120px;
    min-width: 0;
}

/* Kind dots */

.dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex: 0 0 auto;
    display: inline-block;
}

.dot.method { background: var(--kind-method); }
.dot.event { background: var(--kind-event); }
.dot.type { background: var(--kind-type); }
.dot.facade { background: var(--kind-facade); }
.dot.host { background: var(--kind-host); }
.dot.property { background: var(--kind-property); }

.kind-badge {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 2px 9px;
    border-radius: 20px;
}

.kind-badge.method { color: var(--kind-method); background: color-mix(in srgb, var(--kind-method) 14%, transparent); }
.kind-badge.event { color: var(--kind-event); background: color-mix(in srgb, var(--kind-event) 14%, transparent); }
.kind-badge.type { color: var(--kind-type); background: color-mix(in srgb, var(--kind-type) 14%, transparent); }
.kind-badge.facade { color: var(--kind-facade); background: color-mix(in srgb, var(--kind-facade) 14%, transparent); }
.kind-badge.host { color: var(--kind-host); background: color-mix(in srgb, var(--kind-host) 14%, transparent); }
.kind-badge.property { color: var(--kind-property); background: color-mix(in srgb, var(--kind-property) 14%, transparent); }

/* Hero / landing */

.hero {
    margin-bottom: 32px;
}

.hero h1 {
    font-size: 34px;
    margin: 0 0 10px;
    letter-spacing: -0.6px;
}

.hero p.lead {
    font-size: 17px;
    color: var(--text-muted);
    margin: 0 0 22px;
    max-width: 760px;
}

.stats {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 8px;
}

.stat {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    min-width: 130px;
    box-shadow: var(--shadow);
}

.stat .num {
    font-size: 26px;
    font-weight: 750;
    letter-spacing: -0.5px;
}

.stat .lbl {
    font-size: 12.5px;
    color: var(--text-muted);
}

.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.cat-card {
    display: block;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow);
    color: var(--text);
    transition: border-color 0.12s, transform 0.12s;
}

.cat-card:hover {
    text-decoration: none;
    border-color: var(--accent);
    transform: translateY(-2px);
}

.cat-card h3 {
    margin: 0 0 6px;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cat-card p {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

.cat-card .meta {
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Category list view */

.page-head {
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.page-head .crumbs {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.page-head h1 {
    font-size: 27px;
    margin: 0 0 8px;
    letter-spacing: -0.4px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-head p {
    margin: 0;
    color: var(--text-muted);
    max-width: 760px;
}

.member {
    scroll-margin-top: 76px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 22px;
    margin-bottom: 18px;
    box-shadow: var(--shadow);
}

.member .sig {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 6px;
}

.member .sig h3 {
    margin: 0;
    font-family: var(--mono);
    font-size: 16px;
    font-weight: 650;
}

.member .sig .anchor {
    opacity: 0;
    color: var(--text-muted);
    font-size: 14px;
    transition: opacity 0.12s;
}

.member:hover .sig .anchor {
    opacity: 1;
}

.member .desc {
    color: var(--text);
    margin: 8px 0 0;
}

.member .desc.muted {
    color: var(--text-muted);
}

.signature-line {
    font-family: var(--mono);
    font-size: 13.5px;
    background: var(--bg-code);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    margin: 12px 0;
    overflow-x: auto;
    white-space: pre;
}

.sig-kw { color: var(--kind-event); }
.sig-fn { color: var(--kind-facade); font-weight: 600; }
.sig-type { color: var(--kind-type); }
.sig-param { color: var(--text); }
.sig-punct { color: var(--text-muted); }

table.params {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0 4px;
    font-size: 13.5px;
}

table.params th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
    padding: 6px 10px;
    border-bottom: 1px solid var(--border);
}

table.params td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

table.params td.pname {
    font-family: var(--mono);
    font-size: 13px;
    white-space: nowrap;
}

table.params td.ptype {
    font-family: var(--mono);
    font-size: 12.5px;
    color: var(--kind-type);
    white-space: nowrap;
}

.badge-opt {
    font-size: 10px;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0 6px;
    margin-left: 6px;
    vertical-align: middle;
}

.returns {
    margin-top: 12px;
    font-size: 13.5px;
}

.returns .rtype {
    font-family: var(--mono);
    color: var(--kind-type);
}

.example-block {
    margin-top: 14px;
}

.example-block .lbl {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 6px;
}

.section-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 700;
    margin: 6px 0 2px;
}

.footer {
    border-top: 1px solid var(--border);
    padding: 22px 44px;
    font-size: 12.5px;
    color: var(--text-muted);
    text-align: center;
}

.hamburger {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: 7px;
    width: 38px;
    height: 38px;
    color: var(--text);
    cursor: pointer;
}

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

    .sidebar {
        position: fixed;
        top: 60px;
        left: 0;
        width: 82%;
        max-width: 320px;
        background: var(--bg-elevated);
        z-index: 40;
        transform: translateX(-102%);
        transition: transform 0.2s ease;
        box-shadow: var(--shadow);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .hamburger {
        display: grid;
        place-items: center;
    }

    .topbar .links {
        display: none;
    }

    .content {
        padding: 24px 20px 100px;
    }

    .scrim {
        position: fixed;
        inset: 60px 0 0 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 39;
        display: none;
    }

    .scrim.open {
        display: block;
    }
}
