/* hotpath.rs top nav - shared by the docs and blog books via this theme/ dir.
   Terminal-prompt styling that ignores the mdbook theme toggle. The bar is not
   sticky: header.hbs moves it to <body> and keeps --hp-nav-offset in sync as
   it scrolls away. */

/* Top Nav */
:root {
    --hp-nav-h: 48px;
    --hp-nav-bg: #0d0d0d;
    --hp-nav-border: rgba(255, 255, 255, 0.1);
    --hp-ember: #ffb454;
    --hp-prompt-green: #98c379;
    --hp-nav-fg: #e6e1d6;
    --hp-nav-fg-dim: rgba(230, 225, 214, 0.65);
    --hp-nav-mono: 'SF Mono', 'Fira Code', 'JetBrains Mono', 'Consolas', monospace;
}

.hp-topnav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: var(--hp-nav-h);
    z-index: 1100;               /* above the fixed sidebar + sticky menu-bar */
    background: var(--hp-nav-bg);
    border-bottom: 1px solid var(--hp-nav-border);
    box-sizing: border-box;
    font-family: var(--hp-nav-mono);
}

.hp-topnav-inner {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    height: 100%;
    padding: 0 16px;
}

.hp-brand {
    display: inline-flex;
    align-items: baseline;
    gap: 0.5em;
    flex: 0 0 auto;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-decoration: none;
}

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

.hp-brand-prompt {
    color: var(--hp-prompt-green);
    user-select: none;
}

.hp-brand-cmd {
    color: var(--hp-ember);
}

.hp-brand:hover .hp-brand-cmd {
    text-shadow: 0 0 12px rgba(255, 180, 84, 0.45);
}

/* :visited variants needed throughout - mdbook's `a:visited { color: var(--links) }`
   otherwise out-specifies the plain class and turns visited items blue */
.hp-navlink,
.hp-navlink:visited {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 100%;
    flex: 0 0 auto;
    color: var(--hp-nav-fg-dim);
    font-size: 14px;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: color 0.15s ease;
}

.hp-navlink:hover {
    color: var(--hp-nav-fg);
    text-decoration: none;
}

/* Heat strip: flamegraph-gradient underline marks the active route */
.hp-navlink::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: linear-gradient(90deg, #ff8a3d, #ffb454);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.hp-navlink.active,
.hp-navlink.active:visited {
    color: var(--hp-ember);
}

.hp-navlink.active::after {
    opacity: 1;
    box-shadow: 0 2px 10px rgba(255, 180, 84, 0.35);
}

.hp-brand:focus-visible,
.hp-navlink:focus-visible {
    outline: 2px solid var(--hp-ember);
    outline-offset: -2px;
}

/* Waitlist CTA card - shown on the docs landing page and below blog posts,
   so styled from the shared theme (the toast styles stay in docs custom.css) */
.waitlist-card {
    margin: 2rem 0;
    padding: 1.5rem 1.75rem;
    border: 1px solid rgba(111, 66, 193, 0.5);
    border-radius: 12px;
    background: rgba(111, 66, 193, 0.08);
    box-shadow: 0 4px 28px rgba(111, 66, 193, 0.15);
}

.waitlist-card-title {
    margin-top: 0;
}

.waitlist-card p {
    margin-bottom: 0;
}

.waitlist-card-image {
    display: block;
    width: 100%;
    height: auto;
    margin: 1.25rem 0 0 0;
    border-radius: 10px;
    border: 1px solid rgba(111, 66, 193, 0.3);
}

.waitlist-cta-row {
    margin: 1.5rem 0 0 0;
}

.waitlist-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #6f42c1;
    color: #fff !important;
    text-decoration: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 24px rgba(111, 66, 193, 0.35);
    transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
}

.waitlist-cta:hover {
    background: #7d4fd1;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 6px 28px rgba(111, 66, 193, 0.5);
}

.waitlist-cta-icon {
    flex-shrink: 0;
}

.waitlist-cta-note {
    margin: 0.75rem 0 0 0;
    font-size: 1.5rem;
    opacity: 0.85;
}

.waitlist-social-note {
    margin: 0.75rem 0 0 0;
}

.waitlist-building-note {
    margin: 0.75rem 0 0 0;
    opacity: 0.75;
}

/* Site footer - markup lives in the shared index.hbs, so its styles belong
   here (loaded by both the docs and blog books) */
.site-footer {
    margin-top: 3rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--quote-border);
    text-align: center;
    color: var(--inline-code-color);
    font-size: 1.4rem;
}

.site-footer p {
    margin: 0;
}

.site-footer a,
.site-footer a:link,
.site-footer a:visited {
    color: var(--inline-code-color);
    text-decoration: none;
    -webkit-text-fill-color: var(--inline-code-color);
}

.site-footer a:hover {
    text-decoration: underline;
}

/* Push mdbook's fixed sidebar and sticky menu-bar below the visible part
   of the nav (--hp-nav-offset, set by header.hbs on scroll) */
.sidebar {
    top: var(--hp-nav-offset, var(--hp-nav-h)) !important;
}

/* Always pinned - no hide-on-scroll-down / reveal-on-scroll-up dance
   (book.js toggles .sticky and inline `top`; these win over both).
   The second selector mirrors chrome.css's most specific rule so this
   loads-later declaration beats its `top: 0 !important`. */
#mdbook-menu-bar,
html.sidebar-visible #mdbook-menu-bar {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: var(--hp-nav-offset, var(--hp-nav-h)) !important;
}

#mdbook-body-container {
    padding-top: var(--hp-nav-h);
}

/* Keep in-page anchor jumps clear of the sticky menu-bar */
html {
    scroll-padding-top: calc(var(--menu-bar-height, 50px) + 8px);
}
