/**
 * Help Center (עזרה ותמיכה) — template-help-center.php
 * Loaded only on that template via inc/help-center.php.
 */

.cnbz-help {
    --hc-green: #2f6656;
    --hc-border: #e2e8e5;
    --hc-surface: #fff;
    --hc-text: #0f292d;
    --hc-muted: #64748b;
}

/* ── Search ─────────────────────────────────────────────── */

.hc-search-wrap {
    position: relative;
    max-width: 520px;
    margin: 0 auto 16px;
}
.hc-search-wrap i {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    color: var(--hc-muted);
    font-size: 0.9rem;
    pointer-events: none;
}
.hc-search-wrap input {
    width: 100%;
    box-sizing: border-box;
    padding: 13px 44px 13px 16px;
    border: 1px solid var(--hc-border);
    border-radius: 14px;
    background: var(--hc-surface);
    color: var(--hc-text);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.hc-search-wrap input:focus {
    border-color: var(--hc-green);
    box-shadow: 0 0 0 3px rgba(47, 102, 86, 0.12);
}

/* ── Topic chips ────────────────────────────────────────── */

.hc-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 26px;
}
.hc-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border: 1px solid var(--hc-border);
    border-radius: 999px;
    background: var(--hc-surface);
    color: var(--hc-text);
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}
.hc-chip i { color: var(--hc-green); font-size: 0.85em; }
.hc-chip:hover {
    border-color: var(--hc-green);
    color: var(--hc-green);
    transform: translateY(-1px);
}

/* ── Groups + items ─────────────────────────────────────── */

/* Reading column: full width hurts scannability on desktop */
.hc-groups,
.hc-cta { max-width: 900px; margin-inline: auto; }

.hc-group {
    margin-bottom: 30px;
    /* Sticky header (~142px desktop) hides anchor targets — offset the scroll stop */
    scroll-margin-top: 160px;
}
.hc-group[hidden] { display: none; }

.hc-group-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 14px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--hc-text);
}
.hc-group-title i { color: var(--hc-green); font-size: 0.95rem; }

.hc-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hc-item {
    border: 1px solid var(--hc-border);
    border-radius: 14px;
    background: var(--hc-surface);
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.hc-item[hidden] { display: none; }
.hc-item[open] {
    border-color: rgba(47, 102, 86, 0.35);
    box-shadow: 0 2px 10px rgba(15, 41, 45, 0.05);
}
.hc-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 15px 18px;
    cursor: pointer;
    list-style: none;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--hc-text);
    line-height: 1.5;
}
.hc-item summary::-webkit-details-marker { display: none; }
.hc-item summary:hover { color: var(--hc-green); }
.hc-chevron {
    flex-shrink: 0;
    font-size: 0.75rem;
    color: var(--hc-muted);
    transition: transform 0.2s ease;
}
.hc-item[open] .hc-chevron { transform: rotate(180deg); }

.hc-a {
    padding: 0 18px 16px;
    font-size: 0.92rem;
    line-height: 1.75;
    color: #334155;
}
.hc-a a {
    color: var(--hc-green);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.hc-a a:hover { color: #1e4a3d; }

.hc-empty {
    text-align: center;
    color: var(--hc-muted);
    font-size: 0.93rem;
    margin: 0 0 20px;
}
.hc-empty.is-hidden { display: none; }
.hc-empty a { color: var(--hc-green); font-weight: 600; }

/* ── Closing CTA ────────────────────────────────────────── */

.hc-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 10px;
    padding: 22px 24px;
    border: 1px solid var(--hc-border);
    border-radius: 16px;
    background: linear-gradient(135deg, #f8faf9 0%, #eef3f0 100%);
}
.hc-cta-main h2 {
    margin: 0 0 5px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--hc-text);
}
.hc-cta-main p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--hc-muted);
    line-height: 1.6;
}
.hc-cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hc-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}
.hc-btn-primary { background: var(--hc-green); color: #fff; }
.hc-btn-primary:hover { background: #245548; color: #fff; transform: translateY(-2px); }
.hc-btn-ghost {
    background: var(--hc-surface);
    color: var(--hc-text);
    border: 1px solid var(--hc-border);
}
.hc-btn-ghost:hover { border-color: var(--hc-green); color: var(--hc-green); }

/* ── Mobile ─────────────────────────────────────────────── */

@media (max-width: 600px) {
    .hc-group { scroll-margin-top: 120px; }
    .hc-chips { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
    .hc-chip { flex-shrink: 0; }
    .hc-item summary { padding: 14px 15px; font-size: 0.92rem; }
    .hc-a { padding: 0 15px 14px; font-size: 0.89rem; }
    .hc-cta { flex-direction: column; align-items: stretch; text-align: center; }
    .hc-cta-actions { justify-content: center; }
}

/* ── Dark mode ──────────────────────────────────────────── */

[data-theme="dim"] .cnbz-help {
    --hc-border: var(--dim-border, #2b3036);
    --hc-surface: var(--dim-surface, #1b1e23);
    --hc-text: var(--dim-text, #e6e8ea);
    --hc-muted: var(--dim-text-muted, #8b949e);
}
[data-theme="dim"] .hc-chip i,
[data-theme="dim"] .hc-group-title i,
[data-theme="dim"] .hc-a a { color: var(--dim-text-brand, #7fd0ae); }
[data-theme="dim"] .hc-chip:hover,
[data-theme="dim"] .hc-item summary:hover,
[data-theme="dim"] .hc-btn-ghost:hover { color: var(--dim-text-brand, #7fd0ae); }
[data-theme="dim"] .hc-chip:hover,
[data-theme="dim"] .hc-item[open],
[data-theme="dim"] .hc-btn-ghost:hover { border-color: var(--dim-text-brand, #7fd0ae); }
[data-theme="dim"] .hc-a { color: var(--dim-text-secondary, #c4c9ce); }
[data-theme="dim"] .hc-cta {
    background: var(--dim-surface-alt, #202429);
    background-image: none;
}
[data-theme="dim"] .hc-btn-primary { background: var(--dim-text-brand, #7fd0ae); color: #0f292d; }
[data-theme="dim"] .hc-btn-primary:hover { background: #6dc39d; color: #0f292d; }
[data-theme="dim"] .hc-search-wrap input:focus {
    border-color: var(--dim-text-brand, #7fd0ae);
    box-shadow: 0 0 0 3px rgba(127, 208, 174, 0.15);
}
