/*
 * Custom Dokka theme overrides for Arrow Resilience Kit.
 *
 * Layered on top of Dokka's default HTML theme (docs/styles/style.css).
 * Goal: better reading rhythm (line-height/measure), higher-contrast code
 * blocks, calmer symbol/table styling, and a slightly wider content column
 * — without touching Dokka's own generated files.
 */

:root {
    /* Slightly larger body copy and looser line-height for readability. */
    --default-font-size: 16px;
    --max-width: 1280px;

    /* Softer, warmer surface for inline/code backgrounds. */
    --code-background: rgba(88, 66, 214, 0.06);
    --border-color: rgba(39, 40, 44, 0.14);

    /* Arrow-kt-leaning accent, kept close to Dokka's Kotlin purple so
       platform tabs/active states still look native. */
    --active-tab-border-color: #6B3FE0;
    --active-section-color: #6B3FE0;
    --sidemenu-section-active-color: #6B3FE0;
    --hover-link-color: #6B3FE0;
}

.theme-dark {
    --code-background: rgba(160, 130, 255, 0.08);
    --border-color: rgba(255, 255, 255, 0.12);
}

body {
    line-height: 1.65;
}

/* --- Readable measure for prose (briefs, KDoc paragraphs) --- */
.content p,
.content li {
    max-width: 78ch;
    line-height: 1.65;
}

/* --- Headings: more breathing room, clearer hierarchy --- */
.content h1,
.content h2,
.content h3,
.content h4 {
    margin-top: 2em;
    margin-bottom: 0.6em;
    letter-spacing: -0.01em;
}

.content h2 {
    padding-bottom: 0.3em;
    border-bottom: 1px solid var(--border-color);
}

/* --- Code blocks: clearer borders, comfortable padding, rounded --- */
pre {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    line-height: 1.55;
}

code:not(.block) {
    border-radius: 4px;
    padding: 0.1em 0.35em;
}

pre code {
    border-radius: 0;
    padding: 0;
}

/* --- Symbol cards (functions/classes/properties): calmer separation --- */
.content > .symbol,
.cover ~ .divergent-group .main-subrow .symbol {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 12px;
}

.symbol:hover {
    border-color: var(--active-section-color);
}

/* --- Tables: zebra striping + tighter, legible padding --- */
.table,
table {
    border-collapse: collapse;
}

.table tr,
table tr {
    border-bottom: 1px solid var(--border-color);
}

.table tr:nth-child(even),
table tr:nth-child(even) {
    background: var(--code-background);
}

.table td,
.table th,
table td,
table th {
    padding: 10px 12px;
}

/* --- Platform tags: slightly bolder so multiplatform coverage pops --- */
.platform-tag {
    font-weight: 600;
    border-radius: 4px;
}

/* --- Sidebar: quieter active state, easier to scan a long package list --- */
.sidebar--content a:hover {
    background: var(--code-background);
    border-radius: 4px;
}

/* --- Footer: de-emphasize so it doesn't compete with content --- */
footer {
    opacity: 0.85;
}
