/* ============================================================
   chm-style-api.css
   CHM (HTML Help / classic MSDN reference) treatment for the
   Programming-API documentation pages of products in the
   ".NET Components" group.
   Loaded conditionally by DocPageModel pages.
   ============================================================ */

.chm-api-content {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-size: 13px;
    line-height: 1.55;
    color: #1f1f1f;
    /* Faint paper-like background so it visually reads as reference, not a blog post. */
    background-color: #fbfbfb;
    border: 1px solid #e3e5e8;
    border-radius: 3px;
    padding: 1.2em 1.5em 1.5em 1.5em;
    margin: 0.5em 0 1.5em 0;
}

.chm-api-content > p:first-of-type {
    margin-top: 0;
}

/* ---------- Intro / body paragraphs ---------- */
.chm-api-content p {
    margin: 0.5em 0 0.85em 0;
}

/* ---------- Member heading (Method / Property / Event)  ---------- */
.chm-api-content h4 {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-size: 17px;
    font-weight: bold;
    color: #003366;
    margin: 2.2em 0 0.5em 0;
    padding-bottom: 0.35em;
    border-bottom: 1px solid #b8b8b8;
    line-height: 1.3;
}

.chm-api-content > h4:first-of-type,
.chm-api-content > p:first-of-type + h4 {
    margin-top: 1.4em;
}

/* ---------- Subsection heading (Syntax / Parameters / Returns / Remarks / Example / Property value / Event data) ---------- */
.chm-api-content h5 {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-size: 13.5px;
    font-weight: bold;
    color: #003366;
    margin: 1.3em 0 0.3em 0;
    text-transform: none;
    letter-spacing: 0;
}

/* Compact "h5 then paragraph" coupling (used by Returns, Property value). */
.chm-api-content h5 + p {
    margin-top: 0.15em;
}

/* ---------- Section heading inside a member block (rare) ---------- */
.chm-api-content h3 {
    font-size: 16px;
    color: #003366;
    margin-top: 2em;
    padding-bottom: 0.3em;
    border-bottom: 1px dotted #b8b8b8;
}

/* ---------- Inline code (type names, property names, parameter names) ---------- */
.chm-api-content code {
    font-family: "Consolas", "Courier New", monospace;
    font-size: 0.92em;
    background-color: #eef3f8;
    color: #143258;
    padding: 1px 5px;
    border-radius: 2px;
    white-space: nowrap;
}

/* ---------- Syntax block ---------- */
.chm-api-content pre {
    font-family: "Consolas", "Courier New", monospace;
    font-size: 12.5px;
    line-height: 1.45;
    background-color: #f5f7fa;
    border: 1px solid #d6dbe2;
    border-left: 4px solid #6d7d91;
    padding: 0.7em 1em;
    margin: 0.4em 0 1em 0;
    overflow-x: auto;
    white-space: pre-wrap;
    border-radius: 0 3px 3px 0;
}

/* Pre-formatted code that is NOT picked up by Prism (i.e. has no
   language-xxx class) keeps the legacy dark-blue look.
   Prism-highlighted blocks (<code class="language-csharp"> etc.)
   are coloured by prism-vs-light.css instead. */
.chm-api-content pre code:not([class*="language-"]) {
    background-color: transparent;
    color: #143258;
    padding: 0;
    border-radius: 0;
    font-size: 1em;
    white-space: pre-wrap;
}

/* Shared layout properties for any <code> inside <pre> - applies
   regardless of whether Prism is active, so the wrapper stays
   borderless and inherits the <pre> background. */
.chm-api-content pre code {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    font-size: 1em;
    white-space: pre-wrap;
}

/* ---------- Parameters / Event data / Returns tables ---------- */
.chm-api-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 0.3em 0 1.1em 0;
    font-size: 12.5px;
}

.chm-api-content table thead th {
    background-color: #e7eef6;
    color: #003366;
    text-align: left;
    font-weight: bold;
    border-bottom: 2px solid #6d7d91;
    padding: 6px 10px;
    vertical-align: bottom;
}

.chm-api-content table tbody td {
    border-bottom: 1px solid #e0e4ea;
    padding: 6px 10px;
    vertical-align: top;
}

.chm-api-content table tbody tr:nth-child(even) {
    background-color: #fafbfd;
}

.chm-api-content table tbody tr:hover {
    background-color: #f0f4f8;
}

/* Parameter / type name cell — slightly stronger, monospace */
.chm-api-content table tbody td:first-child,
.chm-api-content table tbody td:first-child code {
    font-family: "Consolas", "Courier New", monospace;
    font-weight: 600;
    background-color: transparent;
    padding-left: 0;
    padding-right: 0;
    color: #143258;
}

/* ---------- Bulleted lists (used by Remarks occasionally) ---------- */
.chm-api-content ul {
    margin: 0.3em 0 1em 1.2em;
    padding-left: 0.5em;
}
.chm-api-content ul li {
    margin: 0.2em 0;
}

/* ---------- Anchor links ---------- */
.chm-api-content a {
    color: #1063b8;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.chm-api-content a:hover {
    color: #0a4d8e;
}

/* ---------- Clickable type tooltips ---------- */
.chm-api-content code.chm-type-link {
    cursor: pointer;
    color: #0a5fab;
    border-bottom: 1px dotted #0a5fab;
    background-color: #f0f6fd;
}
.chm-api-content code.chm-type-link:hover {
    background-color: #e4eef9;
    color: #0a4d8e;
}

/* The pop-over panel that appears when a chm-type-link is clicked. */
.chm-type-popover {
    position: absolute;
    z-index: 9999;
    max-width: 460px;
    background-color: #ffffe1; /* classic CHM tooltip yellow */
    color: #1f1f1f;
    border: 1px solid #b8b58a;
    border-radius: 3px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    padding: 10px 14px;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-size: 12.5px;
    line-height: 1.5;
}

.chm-type-popover .chm-type-popover-title {
    display: block;
    font-weight: bold;
    color: #003366;
    font-size: 13px;
    margin-bottom: 4px;
    padding-bottom: 3px;
    border-bottom: 1px solid #d6c98a;
}

.chm-type-popover .chm-type-popover-kind {
    font-weight: normal;
    color: #555;
    font-size: 11.5px;
    margin-left: 6px;
}

.chm-type-popover .chm-type-popover-body {
    margin: 0;
}

.chm-type-popover .chm-type-popover-members {
    font-family: "Consolas", "Courier New", monospace;
    font-size: 11.5px;
    background-color: #f7f0c4;
    border: 1px solid #d6c98a;
    padding: 4px 6px;
    margin-top: 6px;
    border-radius: 2px;
    white-space: pre-wrap;
}

.chm-type-popover-close {
    position: absolute;
    top: 4px;
    right: 6px;
    cursor: pointer;
    color: #888;
    font-size: 14px;
    line-height: 1;
}
.chm-type-popover-close:hover {
    color: #333;
}

/* ============================================================
   Member-summary tables (injected by chm-member-tables.js)
   Classic CHM "Constructors / Properties / Methods / Events"
   tables at the top of each API page, with click-to-scroll links
   to the detailed <h4> sections below.
   ============================================================ */

.chm-summary-container {
    margin: 1.2em 0 1.8em 0;
}

.chm-summary-section-heading {
    background-color: #e7eef6;
    color: #003366;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-size: 14px;
    font-weight: bold;
    padding: 6px 10px;
    margin: 1.6em 0 0 0;
    border: 1px solid #c4ccd8;
    border-bottom: none;
    border-radius: 3px 3px 0 0;
    /* Tiny chevron, matches the classic CHM "expand/collapse" affordance.
       Purely decorative - the sections are always open. */
}

.chm-summary-section-heading::before {
    content: "▾";
    margin-right: 6px;
    color: #6d7d91;
    font-size: 11px;
}

.chm-summary-table {
    border-collapse: collapse;
    width: 100%;
    margin: 0;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-size: 12.5px;
    border: 1px solid #c4ccd8;
}

.chm-summary-table th {
    background-color: #f3f6fa;
    color: #003366;
    text-align: left;
    font-weight: bold;
    padding: 5px 10px;
    border-bottom: 1px solid #c4ccd8;
}

.chm-summary-table th.chm-summary-icon-col { width: 28px; padding: 5px 4px; }
.chm-summary-table th.chm-summary-name-col { width: 32%; }

.chm-summary-table td {
    border-bottom: 1px solid #e0e4ea;
    padding: 6px 10px;
    vertical-align: top;
}

.chm-summary-table tbody tr:nth-child(even) {
    background-color: #fbfcfe;
}

.chm-summary-table tbody tr:hover {
    background-color: #eef4fa;
}

.chm-summary-table td.chm-summary-icon-cell {
    width: 28px;
    padding: 6px 4px 6px 10px;
    text-align: center;
}

.chm-summary-table td.chm-summary-name-cell a {
    font-family: "Consolas", "Courier New", monospace;
    font-weight: 600;
    color: #1063b8;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.chm-summary-table td.chm-summary-name-cell a:hover {
    color: #0a4d8e;
}

.chm-summary-table td.chm-summary-desc-cell {
    color: #1f1f1f;
}

.chm-summary-top-link {
    display: inline-block;
    margin: 2px 0 0 6px;
    color: #1063b8;
    text-decoration: underline;
    font-size: 11.5px;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.chm-summary-top-link::before {
    content: "▲ ";
    color: #6d7d91;
    font-size: 10px;
}
.chm-summary-top-link:hover {
    color: #0a4d8e;
}

/* Member-kind icons - small coloured squares matching the classic
   CHM visual language. */
.chm-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 2px;
    vertical-align: middle;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 1px 0 rgba(0,0,0,0.08);
}

.chm-icon-method {
    background: linear-gradient(180deg, #d44ed4 0%, #a23ea2 100%);
    border: 1px solid #7a2d7a;
}

.chm-icon-property {
    background: linear-gradient(180deg, #5fcf5f 0%, #3aa83a 100%);
    border: 1px solid #2c842c;
}

.chm-icon-constructor {
    background: linear-gradient(180deg, #ff8c5f 0%, #d56638 100%);
    border: 1px solid #a14a26;
}

.chm-icon-event {
    background: linear-gradient(180deg, #f7c44a 0%, #d09b1e 100%);
    border: 1px solid #9a7414;
}

.chm-icon-field {
    background: linear-gradient(180deg, #6d8fc4 0%, #4e6ea0 100%);
    border: 1px solid #34527c;
}

/* Mobile / responsive */
@media (max-width: 768px) {
    .chm-api-content {
        padding: 0.8em 0.6em;
        font-size: 12.5px;
    }
    .chm-api-content table {
        font-size: 11.5px;
    }
    .chm-api-content pre {
        font-size: 11.5px;
    }
    .chm-summary-table {
        font-size: 11.5px;
    }
    .chm-summary-table th.chm-summary-name-col { width: 40%; }
}
