/* WASMShark Documentation — Custom RTD Theme Overrides */

/* ── Brand colors ─────────────────────────────────────── */
:root {
    --wasmshark-red:    #ff4444;
    --wasmshark-blue:   #58a6ff;
    --wasmshark-green:  #3fb950;
    --wasmshark-orange: #f0883e;
    --wasmshark-purple: #bc8cff;
    --wasmshark-dark:   #0d1117;
    --wasmshark-surface:#161b22;
}

/* ── Header ───────────────────────────────────────────── */
.wy-nav-top {
    background: #1a1a2e !important;
    font-family: 'Courier New', monospace;
}

.wy-nav-top a {
    color: #58a6ff !important;
    font-weight: bold;
    font-size: 1.1em;
}

/* ── Sidebar ──────────────────────────────────────────── */
.wy-nav-side {
    background: #0d1117 !important;
    border-right: 1px solid #30363d;
}

.wy-side-nav-search {
    background: #1a1a2e !important;
}

.wy-side-nav-search input[type=text] {
    background: #21262d;
    border: 1px solid #30363d;
    color: #c9d1d9;
    border-radius: 6px;
}

.wy-menu-vertical a {
    color: #8b949e !important;
}

.wy-menu-vertical a:hover {
    background: #21262d !important;
    color: #58a6ff !important;
}

.wy-menu-vertical li.current > a,
.wy-menu-vertical li.current a {
    background: #21262d !important;
    color: #58a6ff !important;
    border-right: 3px solid #58a6ff;
}

.wy-menu-vertical header,
.wy-menu-vertical p.caption {
    color: #58a6ff !important;
    font-weight: bold;
    font-size: 0.85em;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ── Content area ─────────────────────────────────────── */
.wy-nav-content-wrap {
    background: #0d1117 !important;
}

.wy-nav-content {
    background: #0d1117 !important;
    color: #c9d1d9;
    max-width: 1000px;
}

/* ── Headings ─────────────────────────────────────────── */
h1, h2, h3, h4 {
    color: #e6edf3 !important;
    font-family: 'Helvetica Neue', sans-serif;
}

h1 { border-bottom: 2px solid #30363d; padding-bottom: 0.4em; }
h2 { border-bottom: 1px solid #21262d; padding-bottom: 0.3em; }

h1::before { content: "🦈 "; }

/* ── Code blocks ──────────────────────────────────────── */
.highlight {
    background: #161b22 !important;
    border: 1px solid #30363d;
    border-radius: 6px;
}

.highlight pre {
    background: #161b22 !important;
    color: #c9d1d9;
    font-size: 0.88em;
    line-height: 1.5;
}

code, tt {
    background: #21262d !important;
    color: #f0883e !important;
    border: 1px solid #30363d;
    border-radius: 3px;
    padding: 1px 5px;
    font-size: 0.9em;
}

/* ── Admonitions (note, warning, tip) ────────────────── */
.admonition {
    border-radius: 6px;
    border: none;
}

.admonition.note {
    background: #161b22;
    border-left: 4px solid #58a6ff;
}

.admonition.warning {
    background: #161b22;
    border-left: 4px solid #f0883e;
}

.admonition.danger, .admonition.error {
    background: #161b22;
    border-left: 4px solid #ff4444;
}

.admonition.tip, .admonition.hint {
    background: #161b22;
    border-left: 4px solid #3fb950;
}

.admonition-title {
    background: transparent !important;
    font-weight: bold;
    color: #e6edf3;
}

/* ── Tables ───────────────────────────────────────────── */
table.docutils {
    border: 1px solid #30363d;
    border-radius: 6px;
    overflow: hidden;
    background: #161b22;
    width: 100%;
}

table.docutils th {
    background: #21262d !important;
    color: #79c0ff !important;
    padding: 10px 14px;
    border-bottom: 1px solid #30363d;
}

table.docutils td {
    background: #161b22 !important;
    color: #c9d1d9;
    padding: 8px 14px;
    border-bottom: 1px solid #21262d;
}

table.docutils tr:hover td {
    background: #1c2128 !important;
}

/* ── Links ────────────────────────────────────────────── */
a, a:visited {
    color: #58a6ff !important;
}

a:hover {
    color: #79c0ff !important;
    text-decoration: underline;
}

/* ── Verdict badges ───────────────────────────────────── */
.badge-malicious {
    background: #da3633;
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 0.85em;
}

.badge-clean {
    background: #238636;
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 0.85em;
}

/* ── Score bars ───────────────────────────────────────── */
.score-bar-wrap {
    background: #21262d;
    border-radius: 4px;
    height: 8px;
    display: inline-block;
    width: 150px;
    vertical-align: middle;
    margin: 0 8px;
}

.score-bar-fill {
    background: #da3633;
    height: 8px;
    border-radius: 4px;
}

/* ── Footer ───────────────────────────────────────────── */
footer {
    color: #484f58 !important;
    border-top: 1px solid #21262d;
    padding-top: 1em;
}

/* ── Scrollbar ────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0d1117; }
::-webkit-scrollbar-thumb { background: #30363d; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #484f58; }

/* ── Fix admonition background on index page ──────────── */
.admonition {
    background: #161b22 !important;
    border-radius: 6px !important;
    border: 1px solid #30363d !important;
    color: #c9d1d9 !important;
}

.admonition.note {
    border-left: 4px solid #58a6ff !important;
    background: #161b22 !important;
}

.admonition p,
.admonition ul,
.admonition li {
    color: #c9d1d9 !important;
}

.admonition strong {
    color: #79c0ff !important;
}

.admonition-title {
    background: #21262d !important;
    color: #58a6ff !important;
    border-radius: 4px 4px 0 0 !important;
    padding: 8px 12px !important;
}

/* Fix any remaining white backgrounds */
.rst-content .note,
.rst-content .warning,
.rst-content .tip,
.rst-content .hint,
.rst-content .important,
.rst-content .caution,
.rst-content .danger,
.rst-content .error,
.rst-content .attention {
    background: #161b22 !important;
    border: 1px solid #30363d !important;
    color: #c9d1d9 !important;
}

/* ── Footer credit ────────────────────────────────────── */
.rst-footer-buttons,
footer, .footer {
    color: #484f58 !important;
}

footer a, .footer a {
    color: #58a6ff !important;
}

/* Make copyright link styled */
.wy-nav-content footer a {
    color: #58a6ff !important;
    text-decoration: none;
}

.wy-nav-content footer a:hover {
    color: #79c0ff !important;
    text-decoration: underline;
}
