/*
 * Help button and side panel. Colours come from the brand tokens; nothing is
 * marked important. The panel slides in from the end edge (right in English,
 * left in Arabic) and keeps the page visible behind it.
 */

.crm-help-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 6px 12px;
    border: 1px solid var(--crm-border, #e3e8eb);
    border-radius: 8px;
    background: var(--crm-surface, #fff);
    color: var(--crm-text-muted, #526673);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.crm-help-button:hover {
    border-color: var(--crm-button, var(--crm-primary));
    color: var(--crm-primary-dark, #101d26);
}

.crm-help-button svg {
    width: 18px;
    height: 18px;
    color: var(--crm-button, var(--crm-primary));
}

/* A small inline link, for help next to a section heading. */
.crm-help-button.is-inline {
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 13px;
}

.crm-help-backdrop {
    position: fixed;
    inset: 0;
    z-index: 120;
    background: rgb(15 31 46 / 25%);
}

.crm-help-panel {
    position: fixed;
    inset-block: 0;
    inset-inline-end: 0;
    z-index: 121;
    display: flex;
    flex-direction: column;
    width: min(460px, 100vw);
    background: var(--crm-surface, #fff);
    box-shadow: -16px 0 40px rgb(15 31 46 / 12%);
}

html[dir="rtl"] .crm-help-panel {
    box-shadow: 16px 0 40px rgb(15 31 46 / 12%);
}

.crm-help-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--crm-border, #e3e8eb);
}

.crm-help-eyebrow {
    color: var(--crm-text-muted, #526673);
    font-size: 12px;
    font-weight: 600;
}

.crm-help-header h2 {
    margin: 2px 0 0;
    color: var(--crm-text, #101d26);
    font-size: 18px;
    font-weight: 600;
}

.crm-help-close {
    border: 0;
    background: transparent;
    color: var(--crm-text-muted, #526673);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.crm-help-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.crm-help-article {
    color: var(--crm-text, #101d26);
    font-size: 14.5px;
    line-height: 1.7;
}

.crm-help-article h2 {
    margin: 22px 0 8px;
    font-size: 16px;
    font-weight: 600;
    scroll-margin-top: 12px;
}

.crm-help-article ul,
.crm-help-article ol {
    margin: 8px 0;
    padding-inline-start: 22px;
}

.crm-help-article ul {
    list-style: disc;
}

.crm-help-article ol {
    list-style: decimal;
}

.crm-help-article p {
    margin: 8px 0;
}

.crm-help-article li {
    margin: 4px 0;
}

.crm-help-muted {
    color: var(--crm-text-muted, #526673);
}

.crm-help-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--crm-border, #e3e8eb);
    font-size: 14px;
}

.crm-help-footer a {
    color: var(--crm-primary-dark, #101d26);
    font-weight: 600;
}
