/***********************************************************************
 * 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.
 * ══════════════════════════════════════════════════════════════════════ */

@font-face {
    font-family: "Stamp";
    src: url("/extras/StampFont.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

.stamp-font {

    font-family: "Stamp", sans-serif;
    color: red;
    font-size: 2em;
    padding-left: 40px;
}

/* 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 TITLE ROW
 * .sym-title-row wraps the h2 + badge paragraph so they sit side-by-side.
 * The conversion script emits:
 *   <div class="sym-title-row" markdown="1">
 *   ## SymbolName { .symbol-title }
 *   <span class="sym-badge ...">type</span>
 *   </div>
 * ══════════════════════════════════════════════════════════════════════ */

.sym-title-row {
    display:     flex;
    align-items: center;
    gap:         12px;
    flex-wrap:   nowrap;
    margin-bottom: 4px;
}

/* Reset heading margins so they don't break the flex alignment */
.sym-title-row h2.symbol-title {
    margin: 0;
}

/* Badge paragraph sits flush to the heading — no top gap */
.sym-title-row p {
    margin: 0;
}

h2.symbol-title {
    font-family: "Lato";
    font-weight: 700;
    color:       #343A40;
}


/* ══════════════════════════════════════════════════════════════════════
 * 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;
}

/* Badge colors — keyed to the symbol-type palette in LR_theme_default.css.
   All badges share the same light-tint background formula via color-mix. */
.badge-fn       { background: color-mix(in srgb, var(--sym-color-fn)       12%, white); color: var(--sym-color-fn);       border-color: var(--sym-color-fn);       }
.badge-cb       { background: color-mix(in srgb, var(--sym-color-cb)       12%, white); color: var(--sym-color-cb);       border-color: var(--sym-color-cb);       }
.badge-enum     { background: color-mix(in srgb, var(--sym-color-enum)     12%, white); color: var(--sym-color-enum);     border-color: var(--sym-color-enum);     }
.badge-bulkenum { background: color-mix(in srgb, var(--sym-color-bulkenum) 12%, white); color: var(--sym-color-bulkenum); border-color: var(--sym-color-bulkenum); }
.badge-struct   { background: color-mix(in srgb, var(--sym-color-struct)   12%, white); color: var(--sym-color-struct);   border-color: var(--sym-color-struct);   }
.badge-typedef  { background: color-mix(in srgb, var(--sym-color-typedef)  12%, white); color: var(--sym-color-typedef);  border-color: var(--sym-color-typedef);  }
.badge-define   { background: color-mix(in srgb, var(--sym-color-define)   12%, white); color: var(--sym-color-define);   border-color: var(--sym-color-define);   }
.badge-event    { background: color-mix(in srgb, var(--sym-color-event)    12%, white); color: var(--sym-color-event);    border-color: var(--sym-color-event);    }
.badge-version  { background: color-mix(in srgb, var(--sym-color-version)  12%, white); color: var(--sym-color-version);  border-color: var(--sym-color-version);  }
.badge-deprecated { background: color-mix(in srgb, var(--sym-color-deprecated) 12%, white); color: var(--sym-color-deprecated); border-color: var(--sym-color-deprecated); }

/* Deprecated override — keeps the type label but turns the badge red */
.badge-deprecated-sym { background: color-mix(in srgb, var(--sym-color-deprecated) 12%, white) !important; color: var(--sym-color-deprecated) !important; border-color: var(--sym-color-deprecated) !important; }

.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:       20px auto;
}

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

/* enum-table header inherits the theme gray (#B3BCBD) from the global th rule */

.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 header inherits the theme gray (#B3BCBD) from the global th rule */

.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;
    }
    /* Nav visibility at narrow widths is handled by LR_windmill-base.css
       (display:none by default, fixed overlay via .wm-nav-open). */
}

.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. */

/* ══════════════════════════════════════════════════════════════════════
 * CODE BLOCKS  (.xplm-code)
 * Default left border inherits the laminar green fallback.
 * Per-type overrides key the border color to the symbol palette.
 * The .xplm-code wrapper is position:relative so the copy button can
 * be placed in the upper-right corner with position:absolute.
 * ══════════════════════════════════════════════════════════════════════ */

.xplm-code {
    display:  block;
}

/* pre is the anchor for the copy button */
.xplm-code pre {
    position: relative;  /* anchor for copy button */
    border-left: 8px solid var(--laminar_green);
    padding: 8px 30px 8px 30px !important;
    margin: 20px 0px;
    background: #F2F4F5;
}

/* Per-type left-border colors — match the badge palette.
   Both .xplm-code pre (C/C++ fenced blocks) and .lua-code pre
   (Lua blocks) get the accent color for their symbol type.      */
.sym-function .xplm-code pre, .sym-function .lua-code pre  { border-left-color: var(--sym-color-fn);       }
.sym-callback .xplm-code pre, .sym-callback .lua-code pre  { border-left-color: var(--sym-color-cb);       }
.sym-enum     .xplm-code pre, .sym-enum     .lua-code pre  { border-left-color: var(--sym-color-enum);     }
.sym-bulkenum .xplm-code pre, .sym-bulkenum .lua-code pre  { border-left-color: var(--sym-color-bulkenum); }
.sym-struct   .xplm-code pre, .sym-struct   .lua-code pre  { border-left-color: var(--sym-color-struct);   }
.sym-typedef  .xplm-code pre, .sym-typedef  .lua-code pre  { border-left-color: var(--sym-color-typedef);  }
.sym-define   .xplm-code pre, .sym-define   .lua-code pre  { border-left-color: var(--sym-color-define);   }
.sym-event    .xplm-code pre, .sym-event    .lua-code pre  { border-left-color: var(--sym-color-event);    }

/* ── Copy button ──────────────────────────────────────────────────────
   Injected by initCopyButtons() in wm_base.js.
   Stays hidden until the code block is hovered.
   ─────────────────────────────────────────────────────────────────── */

.code-copy-btn {
    position:    absolute;
    top:         8px;
    right:       8px;
    padding:     3px 9px;
    font-size:   1.1rem;
    font-family: inherit;
    font-weight: 600;
    background:  #ffffff;
    color:       #555;
    border:      1px solid #ccc;
    border-radius: 4px;
    cursor:      pointer;
    transition:  background 0.15s, color 0.15s;
    z-index:     10;
    line-height: 1.6;
    white-space: nowrap;
}

.code-copy-btn:hover {
    background:  #e8e8e8;
    border-color: #aaa;
}

.code-copy-btn.copied {
    background:  var(--laminar_green);
    color:       #fff;
    border-color: var(--laminar_green_darkest);
}

.lua-code pre {
    position:    relative;  /* anchor for copy button */
    border-left: 8px solid var(--laminar_green);
    padding:     8px 30px 8px 30px !important;
    margin:      20px 0px;
    background:  #F2F4F5;
}
/* xlua: hide xplm-code blocks (C/C++), show only lua-code */
.xplm-code { display: none !important; }

/* ── XPLM symbol highlight color ──────────────────────────────────────
   Change --xplm-sym-color to adjust all API symbol highlighting at once.
   ─────────────────────────────────────────────────────────────────── */
:root {
    --xplm-sym-color: #C17D00;   /* warm amber — distinct from hljs blue/teal */
}

span.hljs-xplm {
    color:       var(--xplm-sym-color);
    font-weight: 600;
}

code.language-cpp.hljs{
/* 	min-height: 50px; */
}

code.language-cpp.hljs{
/* 	min-height: 41px; */
}


.lr-collapsible {
  border: 1px solid var(--laminar_blue);
  border-radius: 5px;
  background: var(--laminar_blue);
  margin: 10px 0;
  overflow: hidden;
  border: 2px solid #3A5B9D;
}


.lr-collapsible-title {
  cursor: pointer;
  padding: 10px 16px;
  background: var(--laminar_blue);
  color: white;
  font-weight: 600;
  list-style: none;
}

.lr-collapsible-title::-webkit-details-marker {
  display: none;
}

.lr-collapsible-title::before {
  content: "+";
  display: inline-block;
  width: 1.5em;
  font-weight: bold;
}

.lr-collapsible[open] .lr-collapsible-title::before {
  content: "–";
}

.lr-collapsible-content {
  padding: 20px;
  background: white;
  margin: 0px;
}

span.hljs-comment a{
	color: blue;
}

span.hljs-comment a:visited{
	color: blue;
}
/* ── Module header banner ─────────────────────────────────────────────────── */

.module-header {
    background: linear-gradient(180deg, #0FB5E8 0%, #086582 100%);
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    margin-bottom: 24px;
}

.module-header-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 28px;
    gap: 5px;
}

.module-header-doc-title {
    font-family: 'Lato', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.70);
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.module-header-module-name {
    font-family: 'Lato', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.module-header-version {
    font-family: 'Lato', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
}

.module-header-image {
    height: 100%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.module-header-image img {
    height: 100%;
    width: auto;
    display: block;
}
