/***********************************************************************
 * API_styling.css
 * Styles for the XPLM SDK API reference pages.
 ***********************************************************************/


/* ══════════════════════════════════════════════════════════════════════
 * SEARCH RESULTS — symbol result layout
 * Badges are injected by search_results.js using .sym-badge spans;
 * the ::after CSS badge system has been removed in favour of JS-driven
 * badges that know the actual symbol type from the search index.
 * ══════════════════════════════════════════════════════════════════════ */

/* Hide the divider between results list and "See all results" link */
#mkdocs-search-results > li.divider {
    display: none !important;
}

/* "See all results" link — more prominent than regular result entries */
#mkdocs-search-results a.search-all {
    background:      #2c5282 !important;
    justify-content: center;
    margin-top:      4px;
    border-radius: 5px;
}

#mkdocs-search-results a.search-all .search-title {
    color:       #ffffff !important;
    font-family: inherit;
    font-size:   1.2rem;
    text-align:  center;
}

/* All results: column layout so title row and snippet stack vertically */
#mkdocs-search-results a.search-link,
.wm-search-page a.search-link {
    display:        flex !important;
    flex-direction: column;
    align-items:    stretch;
    background:     #ffffff;
    padding:        0.35rem 0.6rem;
    margin:         5px 0;
}


/* Title row: symbol name (monospace) with badge pushed to the right */
#mkdocs-search-results .search-title,
.wm-search-page .search-title {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    font-family:     "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size:       1.5rem;
    color:           #2c5282;
}

/* Snippet: hidden for name-only results, shown when JS adds .has-description */
#mkdocs-search-results a.search-link .search-text,
.wm-search-page a.search-link .search-text {
    display: none;
}

#mkdocs-search-results a.search-link.has-description .search-text,
.wm-search-page a.search-link.has-description .search-text,
#mkdocs-search-results a.search-link[href*="description.html"] .search-text,
.wm-search-page a.search-link[href*="description.html"] .search-text {
    display:     block;
    margin-top:  0.55rem;
    font-size:   1.2rem;
    color:       #444;
    line-height: 1.4;
}

/* Badge sits flush-right inside the title row */
#mkdocs-search-results .search-title .sym-badge,
.wm-search-page .search-title .sym-badge {
    flex-shrink: 0;
    margin-left: 0.75rem;
}


/* ══════════════════════════════════════════════════════════════════════
 * SYMBOL HEADINGS
 * h2.symbol-title: flex row so inline badge is pushed to the right edge
 * ══════════════════════════════════════════════════════════════════════ */

h2.symbol-title {
    font-family: Lato;
    color:       #006DD6;
}


/* ══════════════════════════════════════════════════════════════════════
 * SYMBOL-TYPE BADGES  (inline, right-aligned inside h2.symbol-title)
 * ══════════════════════════════════════════════════════════════════════ */

.sym-badge {
    display:        inline-block;
    font-size:      0.72em;       /* ~90% of previous 0.8em */
    font-weight:    700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding:        0.18em 0.36em;
    border-radius:  7px;
    vertical-align: middle;
    line-height:    1.4;
    margin-left:    15px;
    min-width:      5.5em;
    text-align:     center;
    border:			.1rem solid;
}

/* Deprecated override — keeps the type label but turns the badge red */
.badge-deprecated-sym { background: #fde8e8 !important; color: #b92020 !important; border-color: #f0b0b0 !important; }

.badge-fn      { background: #d9edf7; color: #236080; border-color: #a8cfe0; }
.badge-cb      { background: #dce8f7; color: #1d4d80; border-color: #9ab8d8; }
.badge-enum    { background: #fcf8e3; color: #7a5c1e; border-color: #d8c57a; }
.badge-struct  { background: #dff0d8; color: #2d6a2d; border-color: #90c490; }
.badge-typedef { background: #ede8f7; color: #5a3a8a; border-color: #b898d8; }
.badge-define  { background: #f5f5f5; color: #555555; border-color: #cccccc; }
.badge-event   { background: #fdebd0; color: #784212; border-color: #e59866; }
.badge-version     { background: #e8f0fe; color: #2855b0; border-color: #a8c0ee; }
.badge-deprecated  { background: #fde8e8; color: #b92020; border-color: #f0b0b0; }

.sym-deprecated-block {
    opacity:          0.65;
    border-left:      3px solid #e07070;
    padding-left:     0.5em;
}


/* ══════════════════════════════════════════════════════════════════════
 * VERSION / DEPRECATED MARKERS
 * ══════════════════════════════════════════════════════════════════════ */


.sym-deprecated {
    display:        inline-block;
    font-size:      1rem;
    font-weight:    600;
    padding:        0.1em 0.4em;
    border-radius:  3px;
    vertical-align: middle;
    background:     #fde8e8;
    color:          #b92020;
}


/* ══════════════════════════════════════════════════════════════════════
 * ENUMERATION TABLES  (Name | Value | Description)
 * ══════════════════════════════════════════════════════════════════════ */

.enum-table table {
    table-layout: auto;
    width:        95%;
    margin:       0px auto;
}

.enum-table > table > tbody > tr > td:nth-child(1) {
    color:       #2352B4;
    font-family: monospace;
    font-size:   1.2rem;
}

.enum-table table > thead > tr > th {
    background: #365D9B;
    color:      white;
}

.enum-table th:nth-child(1),
.enum-table td:nth-child(1) { width: 35%; }

.enum-table th:nth-child(2),
.enum-table td:nth-child(2) { width: 10%; }


/* ══════════════════════════════════════════════════════════════════════
 * BULLET TABLES  (Name | Description)
 * ══════════════════════════════════════════════════════════════════════ */

.bullet-table table {
    table-layout: fixed;
    width:        95%;
    margin:       30px auto;
}

.bullet-table > table > tbody > tr > td:nth-child(1) {
    color:       #2352B4;
    font-family: monospace;
    font-size:   1.2rem;
}

.bullet-table table > thead > tr > th {
    background: #365D9B;
    color:      white;
}

.bullet-table th:nth-child(1),
.bullet-table td:nth-child(1) { width: 30%; }


/* ══════════════════════════════════════════════════════════════════════
 * NARROW WINDOW  (nav hidden, content reflows)
 * ══════════════════════════════════════════════════════════════════════ */

@media (max-width: 950px) {
    :root {
        --content-padding-left:  50px;
        --content_padding-right: 50px;
    }
}

@media (max-width: 850px) {
    :root {
        --content-padding-left:  40px;
        --content_padding-right: 40px;
    }
    .wm-page-content {
        min-width:  0;
        width:      100%;
        max-width:  100%;
    }
    pre {
        overflow-x: auto;
        max-width:  100%;
    }
}

@media (max-width: 600px) {
    :root {
        --content-padding-left:  30px;
        --content_padding-right: 30px;
    }
    /* Override base display:none on the toc pane so the toggle button
       can still show/hide the nav at very narrow widths. Visibility is
       controlled by .wm-toc-hidden margin-left (same as wider widths). */
    .wm-toc-pane {
        display: block;
    }
}

.dropdown-menu li {
	margin: 15px 15px;
	border-bottom: 1px solid #C9C9C9;
}


#mkdocs-search-results > li.divider
	display: none !important;
}

/* Nav auto-hide at narrow widths is handled by JS (badge_copy.js)
   via .wm-toc-hidden so the toggle button always has priority. */
