/* ── Help sidebar ── */

#help-sidebar {
    background: var(--color-background-primary);
    border-left: solid 1px var(--color-border-secondary);
    border-top: solid 1px var(--color-border-secondary);
    bottom: 0;
    box-sizing: content-box;
    display: none;
    flex-direction: column;
    line-height: 1.57rem;
    margin-bottom: 0;
    max-width: 100%;
    position: fixed;
    right: 0;
    top: 3rem;
    width: 26rem;
    z-index: 1001;
}

#help-sidebar-resize {
    bottom: 0;
    cursor: col-resize;
    left: 0;
    position: absolute;
    top: 0;
    width: 5px;
}

#help-sidebar-resize:hover,
body.help-resizing #help-sidebar-resize {
    background: var(--color-border-secondary);
}

body.help-resizing {
    cursor: col-resize;
    user-select: none;
}

body.help-open #help-sidebar {
    display: flex;
}

#help-sidebar-body {
    flex: 1 1 auto;
    margin-bottom: 0;
    overflow-y: auto;
}

#help-sidebar-titlebar {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1;
}

#help-sidebar-body .help-sidebar-content {
    padding: var(--space-lg);
    padding-top: 0;
}

#help-sidebar-body .help {
    display: flex;
    flex-direction: column;
}

#help-sidebar textarea {
    min-width: auto;
}

#question {
    box-sizing: border-box;
    min-width: 0;
    resize: none;
    width: 100%;
}

.form-field-container:has(> #question) {
    margin-bottom: var(--space-md);
    margin-top: 0;
    min-width: 0;
    width: 100%;
}

.help-sidebar-status {
    color: var(--color-text-secondary);
    padding: var(--space-lg);
    text-align: center;
}

/* ── Help pages ── */

.help ul, .help ol {
    margin-bottom: 0.57rem;
    margin-top: 0;
    padding: 0 0 0 1.429rem;
}

.help li::marker {
    color: var(--color-text-secondary);
    font-size: 1.143rem;
}

.help ol li::marker {
    color: var(--color-text-secondary);
    font-size: var(--font-size-base);
}

.help ul.no-marker {
    list-style-type: none;
}

button.ask-question {
    background-color: var(--color-background-secondary);
    border: 1px solid var(--color-border-primary);
    border-radius: var(--radius-md);
    box-sizing: border-box;
    color: var(--color-text-primary);
    cursor: pointer;
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    height: 2rem;
    padding: 0 0.36rem;
    padding-top: 0.071rem;
    width: 8.5rem;
}

button.ask-question:hover {
    box-shadow: inset 0 0 1px 1px var(--color-shadow-sm);
}

div.help-section {
    background: var(--color-background-primary);
    border: 1px solid var(--color-border-primary);
    border-radius: var(--radius-md);
    padding: 0.57rem 1.14rem;
    position: relative;
}

div.help-section:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

div.help-section:target,
div.help-section.help-section-located {
    animation-duration: 3s;
    animation-name: highlight;
    scroll-margin-top: 5rem;
}

div.help-section-header {
    align-items: center;
    cursor: pointer;
    display: flex;
    margin: 0;
}

/* TODO (nate) named divs aren't allowed, need to fix this */
div.help-section-header button img.svg,
div.help button[name="menu-toggle"] img.svg,
div.help-section [name="menu"] img.svg {
    height: 1rem;
    position: relative;
    top: 0.143rem;
    width: 1rem;
}

/* TODO (nate) deprecate at some point */
ul.desc-list {
    list-style-type: none;
    margin-bottom: 0.57rem;
    padding-inline-start: 0;
}

ul.desc-list li { margin-bottom: 0.29rem; }

ul.no-indent { padding-left: 0 !important; }

ul.no-marker {
    list-style: none;
    margin: 0;
    padding-left: 1rem;
}

.menu-separator {
    border-top: 1px solid var(--color-border-secondary);
    margin-bottom: 0;
    padding-top: 0.2rem !important;
}

#assistant-answer-section {
    background: var(--color-background-secondary);
    border: 1px solid var(--color-border-primary);
    border-radius: var(--radius-md);
    padding: 0.9rem;
    position: relative;
}

#assistant-answer-section.loading {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 6rem;
    padding: 0;
}

#assistant-answer-section.empty {
    border-left: 10px solid var(--color-border-primary);
}

#assistant-answer-section.success {
    border-left: 10px solid var(--color-success);
}

#assistant-answer-section.fail {
    border-left: 10px solid var(--color-error);
}
