/* Nutzerdokumentation auf Basis der bestehenden Detail- und Sidebar-Komponenten. */

.help-documentation-layout {
    width: 100%;
}

.help-sidebar-search {
    padding-top: 0;
}

.help-sidebar .tb-nav-link {
    line-height: 1.4;
}

.help-sidebar-group[hidden],
.help-sidebar .tb-nav-item[hidden] {
    display: none !important;
}

.help-page-wrap {
    width: 100%;
    max-width: none;
    margin: 0;
}

.help-page-wrap .tab-pane-body {
    padding: var(--space-6, 1.5rem) var(--space-8, 2rem) var(--space-8, 2rem);
}

.help-page-wrap .field-value:not(.help-topic-excerpt__value):not(.help-article__value) {
    line-height: 1.65;
}

.help-page-wrap .field-label:not(.help-topic-excerpt__label):not(.help-article__label) {
    flex: 0 0 230px;
}

.help-documentation-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem 1rem;
    color: var(--text-muted, #6b7280);
    font-size: var(--font-size-sm, 0.875rem);
}

.help-documentation-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.help-documentation-meta i {
    color: var(--primary-color, #00618f);
}

.help-section-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0 0 var(--space-4, 1rem);
    padding-bottom: var(--space-3, 0.75rem);
    border-bottom: 2px solid var(--border-light, #e5e7eb);
    color: var(--primary-color, #00618f);
    font-family: var(--font-family-primary, 'Inter', 'Segoe UI', sans-serif);
    font-size: var(--font-size-lg, 1.125rem);
    font-weight: var(--font-weight-semibold, 600);
    line-height: 1.4;
}

.help-section-title i {
    color: var(--primary-hover, #327ebb);
    font-size: 1.1rem;
}

.help-group {
    padding-top: 1rem;
    scroll-margin-top: 80px;
}

.help-group + .help-group {
    border-top: 1px solid var(--border-light, #e5e7eb);
}

.help-group__introduction {
    margin-bottom: 0;
}

.help-article {
    padding: 0;
    scroll-margin-top: 84px;
    transition: background-color 150ms ease, border-color 150ms ease;
}

.help-article:target {
    border-left: 4px solid var(--accent-color, #8ed1b0) !important;
    background: linear-gradient(90deg, rgba(142, 209, 176, 0.1) 0%, transparent 45%);
}

.help-end__link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0.5rem;
    color: var(--primary-color, #00618f);
    font-weight: var(--font-weight-semibold, 600);
    text-decoration: none;
}

.help-end__link:hover,
.help-end__link:focus-visible {
    color: var(--primary-hover, #327ebb);
    text-decoration: underline;
}

.help-no-results {
    margin: 2rem 0;
}

body.help-search-active .help-group[hidden],
body.help-search-active .help-article[hidden] {
    display: none !important;
}

.help-back-to-top {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    z-index: 1040;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 48px;
    padding: 0.7rem 1rem;
    border: 2px solid var(--primary-color, #00618f);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(17, 24, 39, 0.24);
    color: var(--primary-color, #00618f);
    font: inherit;
    font-weight: var(--font-weight-semibold, 600);
    line-height: 1;
    cursor: pointer;
}

.help-back-to-top[hidden] {
    display: none !important;
}

.help-back-to-top:focus-visible {
    outline: 3px solid var(--focus-color, #f4c95d);
    outline-offset: 3px;
}

.help-back-to-top i {
    font-size: 1.1rem;
}

@media (max-width: 992px) {
    .help-documentation-layout .sidebar-layout__aside {
        position: static;
        max-height: min(52vh, 480px);
        overflow-y: auto;
        border-bottom: 1px solid var(--border-light, #e5e7eb);
    }

    .help-page-wrap .tab-pane-body {
        padding: var(--space-5, 1.25rem);
    }

    .help-page-wrap .field-label:not(.help-topic-excerpt__label):not(.help-article__label) {
        flex: 0 0 180px;
    }

    .help-sidebar-search {
        position: sticky;
        top: 0;
        z-index: 2;
        padding-top: 0.75rem;
        background: var(--background-color, #f6f7f9);
    }
}

@media (max-width: 768px) {
    .help-page-wrap .content-header {
        align-items: flex-start;
    }

    .help-documentation-meta {
        justify-content: flex-start;
    }

    .help-page-wrap .field-row:not(.help-topic-excerpt__row):not(.help-article__row) {
        flex-direction: column;
        gap: var(--space-2, 0.5rem);
    }

    .help-page-wrap .field-label:not(.help-topic-excerpt__label):not(.help-article__label) {
        flex: 1;
        padding-top: 0;
    }

    .help-back-to-top {
        width: 48px;
        padding: 0;
    }

    .help-back-to-top span {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .help-article {
        transition: none;
    }
}
