/* =============================================================================
   Public API docs (/entwickler/api) — #1222
   Standalone page: reset.css + tokens.css + this file.
   ============================================================================= */

html {
    color-scheme: dark;
    overflow-x: clip;
}

body {
    background: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-primary);
    line-height: 1.6;
}

.docs-container {
    max-width: 980px;
    margin: 0 auto;
    padding: 4rem 2rem 6rem;
}

/* ── Header ─────────────────────────────────────────────────────────────── */

.docs-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.docs-back {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
}

.docs-back:hover {
    color: var(--text-primary);
}

.docs-header h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0.75rem 0 1rem;
    text-wrap: balance;
}

.docs-lede {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 52rem;
}

.docs-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    margin-top: 1.5rem;
}

.docs-links a {
    color: var(--accent-blue);
    text-decoration: none;
    border: 1px solid var(--accent-blue-border);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
}

.docs-links a:hover {
    background: var(--accent-blue-bg);
    border-color: var(--accent-blue-border-strong);
}

/* ── Sections ───────────────────────────────────────────────────────────── */

.docs-container section {
    margin-bottom: 3rem;
}

.docs-container h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.docs-container h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.75rem 0 0.75rem;
    color: var(--text-primary);
}

.docs-container h2 code,
.docs-container h3 code {
    font-size: 0.9em;
}

.docs-note,
.docs-muted,
.docs-detail {
    color: var(--text-secondary);
}

.docs-note {
    font-size: 0.9rem;
    margin-top: 0.9rem;
    max-width: 52rem;
}

.docs-detail {
    display: block;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.docs-muted {
    font-size: 0.9rem;
}

.docs-list,
.docs-steps {
    color: var(--text-secondary);
    padding-left: 1.25rem;
    max-width: 55rem;
}

.docs-list li,
.docs-steps li {
    margin-bottom: 0.5rem;
}

.docs-steps li {
    margin-bottom: 0.75rem;
}

/* ── Inline code ────────────────────────────────────────────────────────── */

.docs-container code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 0.1rem 0.35rem;
}

.docs-container pre {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    overflow-x: auto;
    margin: 0.5rem 0 1rem;
}

.docs-container pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.85rem;
    line-height: 1.55;
    white-space: pre;
}

.docs-container a {
    color: var(--accent-blue);
}

/* ── Tables ─────────────────────────────────────────────────────────────── */

.docs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.docs-table th,
.docs-table td {
    text-align: left;
    vertical-align: top;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.docs-table th {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.docs-table td code {
    white-space: nowrap;
}

/* ── Method + auth badges ───────────────────────────────────────────────── */

.method {
    display: inline-block;
    min-width: 3.2rem;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 4px;
    padding: 0.15rem 0.4rem;
    border: 1px solid currentColor;
}

.method-get {
    color: #60a5fa;
}

.method-post {
    color: #34d399;
}

.method-put {
    color: #fbbf24;
}

.method-delete {
    color: #f87171;
}

.auth-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 4px;
    padding: 0.15rem 0.4rem;
    margin-right: 0.35rem;
    color: #c4b5fd;
    border: 1px solid rgba(196, 181, 253, 0.4);
}

.auth-badge-cookie {
    color: #fdba74;
    border-color: rgba(253, 186, 116, 0.4);
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

.docs-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.docs-footer a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
}

.docs-footer a:hover {
    color: var(--text-primary);
}

@media (max-width: 600px) {
    .docs-container {
        padding: 2.5rem 1.25rem 4rem;
    }

    .docs-table {
        font-size: 0.85rem;
    }

    .docs-table th,
    .docs-table td {
        padding: 0.5rem 0.4rem;
    }

    .docs-table td code {
        white-space: normal;
        word-break: break-word;
    }
}
