/* In-agent help overlay */

.advisor-help-overlay {
    position: fixed;
    inset: 0;
    z-index: 210000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.advisor-help-overlay[hidden] {
    display: none !important;
}

.advisor-help-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
}

.advisor-help-panel {
    position: relative;
    z-index: 1;
    width: min(640px, 100%);
    max-height: min(88vh, 720px);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #0f172a;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
    font-size: 15px;
}

.advisor-help-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    flex-shrink: 0;
}

.advisor-help-panel__title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.35;
    color: #0a192f;
}

.advisor-help-panel__close {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #475569;
    padding: 0.35rem 0.55rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
}

.advisor-help-panel__close svg {
    width: 1rem;
    height: 1rem;
}

.advisor-help-panel__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem 1.15rem;
    -webkit-overflow-scrolling: touch;
}

.advisor-help__section {
    margin-bottom: 1.15rem;
}

.advisor-help__section:last-child {
    margin-bottom: 0;
}

.advisor-help__section-title {
    margin: 0 0 0.45rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: #0a192f;
}

.advisor-help__section-body {
    font-size: 0.875rem;
    line-height: 1.55;
    color: #334155;
}

.advisor-help__section-body p {
    margin: 0 0 0.5rem;
}

.advisor-help__section-body p:last-child {
    margin-bottom: 0;
}

.advisor-help__section-body ul,
.advisor-help__section-body ol {
    margin: 0;
    padding-left: 1.2rem;
}

.advisor-help__section-body li {
    margin-bottom: 0.35rem;
}

.advisor-help__section-body a {
    color: #2563eb;
    text-decoration: underline;
}

.advisor-help-panel__footer {
    flex-shrink: 0;
    padding: 0.75rem 1.15rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #e2e8f0;
    background: #fff;
    display: flex;
    justify-content: flex-end;
}

.advisor-help-panel__btn {
    min-height: 40px;
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: 10px;
    background: #0a192f;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.advisor-help-panel__btn:hover {
    background: #112240;
}

@media (max-width: 768px) {
    .advisor-help-overlay {
        padding: 0;
        align-items: stretch;
    }

    .advisor-help-panel {
        width: 100%;
        max-height: 100vh;
        max-height: 100dvh;
        border-radius: 0;
    }

    .advisor-help-panel__close span {
        display: none;
    }
}
