/**
 * help-system.css — Shared help panel, settings, onboarding, and hint styles.
 *
 * Used by both collect/index.html and admin/index.html.
 * CSS variables are defined with fallback values here; collect portal
 * overrides them in its own <style> block.
 */

:root {
    --bc-border: #e5e7eb;
    --bc-text: #111827;
    --bc-red: #c31717;
    --bc-text-light: #6b7280;
}

/* --- Inline help hints --- */

.hint-banner {
    background: #e8f4fd;
    border: 1px solid #b3d9f2;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: #1a5276;
    gap: 12px;
}
.hint-banner-dismiss {
    background: none;
    border: none;
    font-size: 18px;
    color: #1a5276;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    flex-shrink: 0;
    opacity: 0.6;
}
.hint-banner-dismiss:hover { opacity: 1; }
.hint-inline {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

/* --- Help reference panel --- */

.help-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--bc-border);
    background: #fff;
    font-size: 16px;
    font-weight: 700;
    color: var(--bc-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}
.help-btn:hover { border-color: var(--bc-red); color: var(--bc-red); }
.help-panel {
    padding: 16px 20px;
    margin-bottom: 16px;
    background: #fff;
    border: 1px solid var(--bc-border);
    border-radius: 8px;
    display: none;
    max-height: 70vh;
    overflow-y: auto;
}
.help-panel h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.help-section {
    border-bottom: 1px solid #eee;
}
.help-section:last-child { border-bottom: none; }
.help-section-header {
    padding: 10px 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 14px;
    color: var(--bc-text);
    user-select: none;
}
.help-section-header:hover { color: var(--bc-red); }
.help-section-header .help-arrow {
    font-size: 12px;
    transition: transform 0.2s;
    color: #888;
}
.help-section-header .help-arrow.open { transform: rotate(90deg); }
.help-section-body {
    display: none;
    padding: 0 0 12px 0;
    font-size: 13px;
    line-height: 1.6;
    color: #555;
}
.help-section-body.open { display: block; }
.help-item {
    margin-bottom: 6px;
    padding-left: 12px;
    border-left: 2px solid #e0e0e0;
}
.help-item-label {
    font-weight: 600;
    color: var(--bc-text);
}
.help-kbd {
    display: inline-block;
    padding: 1px 6px;
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-family: monospace;
    font-size: 11px;
}
.help-item.help-hidden { display: none; }
.help-section.help-hidden { display: none; }

/* --- Help search input --- */

.help-search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--bc-border);
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 12px;
    box-sizing: border-box;
}
.help-search-input:focus {
    outline: 2px solid var(--bc-red);
    outline-offset: -1px;
}

/* --- Settings panel --- */

.settings-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--bc-border);
    background: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}
.settings-btn:hover { border-color: var(--bc-red); color: var(--bc-red); }
.settings-panel {
    padding: 16px 20px;
    margin-bottom: 16px;
    background: #fff;
    border: 1px solid var(--bc-border);
    border-radius: 8px;
    display: none;
}
.settings-panel h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}
.settings-row:last-child { border-bottom: none; }
.settings-row label { font-size: 13px; font-weight: 600; color: var(--bc-text); }
.settings-row .settings-desc { font-size: 12px; color: #888; margin-top: 2px; }
.settings-row input[type="number"],
.settings-row select {
    padding: 4px 8px;
    border: 1px solid var(--bc-border);
    border-radius: 4px;
    font-size: 13px;
    width: 80px;
}
.settings-row select { width: 100px; }
.settings-info {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #eee;
    font-size: 12px;
    color: #888;
    line-height: 1.8;
}
.settings-info strong { color: var(--bc-text); }

/* --- Onboarding overlay --- */

.onboarding-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 300;
    pointer-events: auto;
}
.onboarding-spotlight {
    position: fixed;
    border-radius: 8px;
    box-shadow: 0 0 0 9999px rgba(0,0,0,0.45);
    background: transparent;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 300;
}
.onboarding-card {
    position: fixed;
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    width: 340px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    border-top: 4px solid var(--bc-red);
    z-index: 302;
}
.onboarding-card h4 {
    margin: 0 0 8px 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--bc-text);
}
.onboarding-card p {
    margin: 0 0 16px 0;
    font-size: 13px;
    line-height: 1.5;
    color: #555;
}
.onboarding-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.onboarding-dots {
    display: flex;
    gap: 6px;
}
.onboarding-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
}
.onboarding-dot.active { background: var(--bc-red); }
.onboarding-skip {
    background: none;
    border: none;
    color: #888;
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
}
.onboarding-skip:hover { color: var(--bc-text); }
