/* Help overlay — operational Q&A on app usage.
   Backed by /api/v1/help/ask via help-overlay.js. */

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

.help-overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.help-overlay-panel {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: 92vh;
    background: var(--surface, #fff);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.help-overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border, #e5e7eb);
}

.help-overlay-header h5 {
    font-weight: 600;
}

.help-overlay-header h5 i {
    color: var(--primary, #2563eb);
    margin-right: 0.35rem;
}

.help-overlay-body {
    padding: 1rem 1.25rem 1.25rem;
    overflow-y: auto;
}

.help-answer-area {
    min-height: 2rem;
    max-height: 50vh;
    overflow-y: auto;
    padding: 0.75rem;
    background: var(--surface-alt, #f8f9fa);
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

.help-answer-area.is-empty {
    color: var(--text-muted, #6b7280);
    font-style: italic;
}

.help-answer-area .help-error {
    color: var(--danger, #dc2626);
}

@media (max-width: 480px) {
    .help-overlay {
        padding: 0;
    }
    .help-overlay-panel {
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }
}
