/* ═══════════════════════════════════════
   Help Page — Guide Section
   ═══════════════════════════════════════ */

/* ── Guide accordion wrapper ── */
.hc-guide-grid-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ── Group container ── */
.hc-guide-group {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
}

/* ── Group header ── */
.hc-guide-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 18px;
    background: #fafafa;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 700;
    font-size: .88rem;
    color: #0f172a;
    letter-spacing: .01em;
}

.hc-guide-group-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    flex-shrink: 0;
    background: #f1f5f9;
    color: #64748b;
}

/* ── Accordion list ── */
.hc-accordion {
    display: flex;
    flex-direction: column;
}

/* ── Single accordion row ── */
.hc-accordion-item {
    border-bottom: 1px solid #f1f5f9;
}

.hc-accordion-item:last-child {
    border-bottom: none;
}

/* ── Trigger button ── */
.hc-accordion-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 18px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background .15s;
}

.hc-accordion-trigger:hover {
    background: #f8fafc;
}

.hc-accordion-item.is-open > .hc-accordion-trigger {
    background: #f8fafc;
}

/* ── Row icon ── */
.hc-acc-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .82rem;
    flex-shrink: 0;
    background: #f1f5f9;
    color: #64748b;
    transition: background .15s, color .15s;
}

/* ── Title + description ── */
.hc-acc-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.hc-acc-title {
    font-weight: 600;
    font-size: .84rem;
    color: #111827;
    line-height: 1.3;
}

.hc-acc-desc {
    font-size: .74rem;
    color: #6b7280;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Badge ── */
.hc-acc-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 9999px;
    background: #f1f5f9;
    color: #6b7280;
    font-size: .67rem;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Chevron ── */
.hc-acc-chevron {
    font-size: .73rem;
    color: #9ca3af;
    flex-shrink: 0;
    transition: transform .25s ease, color .15s;
}

.hc-accordion-item.is-open > .hc-accordion-trigger .hc-acc-chevron {
    transform: rotate(180deg);
    color: #018771;
}

/* ── Collapsible content ── */
.hc-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease;
}

.hc-accordion-item.is-open > .hc-accordion-content {
    max-height: 1800px;
}

.hc-accordion-inner {
    padding: 16px 18px 18px 64px;
    border-top: 1px solid #f1f5f9;
}

/* ── Nav-style item (links to a tab, no expand) ── */
.hc-accordion-item--nav > .hc-accordion-trigger .hc-acc-chevron {
    color: #018771;
}

.hc-accordion-item--nav > .hc-accordion-trigger:hover .hc-acc-chevron {
    transform: translateX(4px);
    color: #015e4e;
}

/* ── Path tags (way/step indicators) ── */
.hc-path-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: .77rem;
    font-weight: 700;
    letter-spacing: .03em;
    margin-bottom: 12px;
}

.hc-path-tag--teal {
    background: #f0fdf9;
    color: #018771;
    border: 1px solid #ccfbf1;
}

.hc-path-tag--blue {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.hc-path-tag--gray {
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

/* ── Alert callouts ── */
.hc-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: .83rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

    .hc-alert > i {
        font-size: .95rem;
        margin-top: 2px;
        flex-shrink: 0;
    }

    .hc-alert strong { font-weight: 700; }

.hc-alert--warn {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #78350f;
}

    .hc-alert--warn > i { color: #d97706; }

.hc-alert--tip {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

    .hc-alert--tip > i { color: #16a34a; }

.hc-alert--info {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #075985;
}

    .hc-alert--info > i { color: #0284c7; }

/* ── Utility ── */
.mt-5 { margin-top: 20px; }

/* ── Responsive ── */
@media (max-width: 640px) {
    .hc-accordion-trigger {
        padding: 11px 14px;
        gap: 10px;
    }

    .hc-accordion-inner {
        padding: 14px 14px 16px 14px;
    }

    .hc-acc-desc {
        display: none;
    }

    .hc-acc-badge {
        display: none;
    }
}


/* ═══════════════════════════════════════
   Help Page — Chatbot Widget
   ═══════════════════════════════════════ */

/* ── Floating Button ── */
#helpChatBtn {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #0d9488, #0f766e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(13,148,136,.45);
    z-index: 100001;
    transition: transform .2s, box-shadow .2s;
    border: none;
}

    #helpChatBtn:hover {
        transform: scale(1.08);
        box-shadow: 0 6px 26px rgba(13,148,136,.55);
    }

    #helpChatBtn i {
        font-size: 1.25rem;
        color: #fff;
        transition: opacity .15s;
    }

    #helpChatBtn .cb-close-icon {
        display: none;
    }

    #helpChatBtn.open .cb-chat-icon {
        display: none;
    }

    #helpChatBtn.open .cb-close-icon {
        display: block;
    }

.cb-pulse {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    background: #f97316;
    border-radius: 50%;
    border: 2px solid #fff;
    animation: cbPulse 2s infinite;
    pointer-events: none;
}

@keyframes cbPulse {
    0% { box-shadow: 0 0 0 0 rgba(249,115,22,.6); }
    70% { box-shadow: 0 0 0 8px rgba(249,115,22,0); }
    100% { box-shadow: 0 0 0 0 rgba(249,115,22,0); }
}

/* ── Chat Window ── */
#helpChatWindow {
    position: fixed;
    bottom: 92px;
    left: 24px;
    width: 370px;
    max-width: calc(100vw - 48px);
    height: 530px;
    max-height: calc(100vh - 120px);
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 12px 48px rgba(0,0,0,.18);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 100000;
    animation: cbSlideUp .22s ease;
}

    #helpChatWindow.open {
        display: flex;
    }

@keyframes cbSlideUp {
    from { opacity: 0; transform: translateY(16px) scale(.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Mobile — full-width bottom sheet */
@media (max-width: 520px) {
    #helpChatBtn {
        bottom: 16px;
        left: 16px;
        width: 50px;
        height: 50px;
    }

    /* Hide floating button when chat is open on mobile */
    #helpChatBtn.open {
        display: none;
    }

    #helpChatWindow {
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: 100%;
        height: 78vh;
        max-height: 78vh;
        border-radius: 22px 22px 0 0;
        animation: cbSlideUpMobile .25s ease;
    }
}

@keyframes cbSlideUpMobile {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Tablet */
@media (min-width: 521px) and (max-width: 768px) {
    #helpChatWindow {
        width: min(370px, calc(100vw - 48px));
    }
}

/* ── Header ── */
.cb-header {
    background: linear-gradient(135deg, #0d9488, #0f766e);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.cb-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff;
    flex-shrink: 0;
}

.cb-header-info {
    flex: 1;
}

    .cb-header-info strong {
        display: block;
        color: #fff;
        font-size: .88rem;
        font-weight: 700;
    }

    .cb-header-info span {
        font-size: .7rem;
        color: rgba(255,255,255,.8);
    }

.cb-online-dot {
    width: 7px;
    height: 7px;
    background: #4ade80;
    border-radius: 50%;
    display: inline-block;
    margin-right: 4px;
}

/* ── Header Close Button (visible on mobile) ── */
.cb-header-close {
    display: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
    border: none;
    color: #fff;
    font-size: .85rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .15s;
}

    .cb-header-close:hover { background: rgba(255,255,255,.3); }

@media (max-width: 520px) {
    .cb-header-close { display: flex; }
}

/* ── Messages Area ── */
.cb-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scroll-behavior: smooth;
}

    .cb-messages::-webkit-scrollbar { width: 3px; }
    .cb-messages::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; }

/* ── Message Rows ── */
.cb-msg {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

    .cb-msg.bot  { align-self: flex-start; max-width: 94%; }
    .cb-msg.user { align-self: flex-end;   flex-direction: row-reverse; max-width: 80%; }

.cb-msg-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #e0f2f1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .65rem;
    color: #0d9488;
    flex-shrink: 0;
    margin-bottom: 2px;
}

/* ── Plain Bubble (social / short messages) ── */
.cb-bubble {
    padding: 10px 14px;
    border-radius: 16px;
    font-size: .82rem;
    line-height: 1.55;
}

.cb-msg.bot  .cb-bubble { background: #f3f4f6; color: #1f2937; border-bottom-left-radius: 4px; }
.cb-msg.user .cb-bubble { background: #0d9488; color: #fff;    border-bottom-right-radius: 4px; }
.cb-msg.user .cb-bubble a { color: #a7f3d0; }
.cb-msg.bot  .cb-bubble a { color: #0d9488; font-weight: 600; }
.cb-bubble strong { font-weight: 700; }

/* ── Typing Indicator ── */
.cb-typing-bubble {
    background: #f3f4f6;
    padding: 12px 16px;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.cb-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #9ca3af;
    animation: cbDot 1.2s infinite;
}

    .cb-dot:nth-child(2) { animation-delay: .2s; }
    .cb-dot:nth-child(3) { animation-delay: .4s; }

@keyframes cbDot {
    0%, 60%, 100% { transform: translateY(0); opacity: .6; }
    30%            { transform: translateY(-5px); opacity: 1; }
}

/* ── Answer Card (structured replies) ── */
.cb-answer-card {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    width: 100%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.cb-answer-header {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 14px;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .01em;
}

    .cb-answer-header i { font-size: .85rem; }

.cb-answer-body {
    padding: 14px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .cb-answer-body > p {
        font-size: .81rem;
        color: #374151;
        line-height: 1.6;
        margin: 0;
    }

/* Color themes */
.cb-color-teal   .cb-answer-header { background: #f0fdfa; color: #0d9488;  border-bottom: 1px solid #ccfbf1; }
.cb-color-blue   .cb-answer-header { background: #eff6ff; color: #1d4ed8;  border-bottom: 1px solid #bfdbfe; }
.cb-color-green  .cb-answer-header { background: #f0fdf4; color: #15803d;  border-bottom: 1px solid #bbf7d0; }
.cb-color-orange .cb-answer-header { background: #fff7ed; color: #c2410c;  border-bottom: 1px solid #fed7aa; }
.cb-color-red    .cb-answer-header { background: #fef2f2; color: #dc2626;  border-bottom: 1px solid #fecaca; }
.cb-color-purple .cb-answer-header { background: #faf5ff; color: #7c3aed;  border-bottom: 1px solid #ddd6fe; }
.cb-color-yellow .cb-answer-header { background: #fefce8; color: #a16207;  border-bottom: 1px solid #fef08a; }

/* ── Numbered Steps ── */
ol.cb-steps {
    counter-reset: step-counter;
    list-style: none;
    margin: 2px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

    ol.cb-steps li {
        counter-increment: step-counter;
        display: flex;
        align-items: flex-start;
        gap: 11px;
        padding: 9px 0;
        border-bottom: 1px solid #f3f4f6;
    }

    ol.cb-steps li:last-child { border-bottom: none; padding-bottom: 2px; }
    ol.cb-steps li:first-child { padding-top: 2px; }

        ol.cb-steps li::before {
            content: counter(step-counter);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 22px;
            height: 22px;
            border-radius: 50%;
            background: #0d9488;
            color: #fff;
            font-size: .65rem;
            font-weight: 700;
            flex-shrink: 0;
            margin-top: 1px;
        }

        ol.cb-steps li span {
            font-size: .8rem;
            color: #374151;
            line-height: 1.55;
            flex: 1;
        }

/* Themed step number colors */
.cb-color-blue   ol.cb-steps li::before { background: #1d4ed8; }
.cb-color-green  ol.cb-steps li::before { background: #15803d; }
.cb-color-orange ol.cb-steps li::before { background: #c2410c; }
.cb-color-red    ol.cb-steps li::before { background: #dc2626; }
.cb-color-purple ol.cb-steps li::before { background: #7c3aed; }
.cb-color-yellow ol.cb-steps li::before { background: #a16207; }

/* ── Note / Warning Callouts ── */
.cb-note {
    display: flow;
    align-items: flex-start;
    flex-direction: row;
    gap: 8px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 9px 11px;
    margin-top: 6px;
    font-size: .77rem;
    color: #166534;
    line-height: 1.55;
}

.cb-note::before {
    content: '💡';
    font-size: .8rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.cb-warn {
    display: flow;
    align-items: flex-start;
    gap: 8px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 10px;
    padding: 9px 11px;
    margin-top: 6px;
    font-size: .77rem;
    color: #9a3412;
    line-height: 1.55;
}

.cb-warn::before {
    content: '⚠️';
    font-size: .8rem;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ── Info Rows (contact details, lists) ── */
.cb-info-rows {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 6px;
}

.cb-info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border-radius: 9px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    font-size: .8rem;
    color: #374151;
    line-height: 1.4;
}

    .cb-info-row i { width: 16px; text-align: center; flex-shrink: 0; font-size: .85rem; }
    .cb-info-row strong { font-weight: 600; color: #111827; }

/* ── Topic Menu Buttons ── */
.cb-topic-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.cb-topic-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 9px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    font-size: .75rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
    line-height: 1.2;
    white-space: nowrap;
}

    .cb-topic-btn:hover {
        background: #f0fdfa;
        border-color: #0d9488;
        color: #0d9488;
    }

/* ── Escalation / No-answer Card ── */
.cb-escalate {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 12px;
    padding: 12px 14px;
    margin-top: 6px;
}

    .cb-escalate p {
        font-size: .78rem;
        color: #92400e;
        margin: 0 0 10px;
        line-height: 1.5;
    }

.cb-escalate-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cb-call-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex: 1;
    min-width: 110px;
    padding: 9px 12px;
    border-radius: 9px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white !important;
    font-size: .78rem;
    font-weight: 700;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    transition: opacity .15s;
}

    .cb-call-btn:hover { opacity: .88; }

.cb-complaint-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex: 1;
    min-width: 110px;
    padding: 9px 12px;
    border-radius: 9px;
    background: #fff;
    border: 1.5px solid #f97316;
    color: #ea580c;
    font-size: .78rem;
    font-weight: 700;
    text-decoration: none;
    transition: background .15s;
}

    .cb-complaint-btn:hover { background: #fff7ed; }

.cb-support-contact {
    display: block;
    font-size: .74rem;
    color: #6b7280;
    text-align: center;
    margin-top: 8px;
}

/* ── Input Bar ── */
.cb-input-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
}

    .cb-input-bar input {
        flex: 1;
        border: 1.5px solid #e5e7eb;
        border-radius: 9999px;
        padding: 9px 16px;
        font-size: .82rem;
        outline: none;
        color: #1f2937;
        background: #f9fafb;
        transition: border-color .15s;
    }

        .cb-input-bar input:focus {
            border-color: #0d9488;
            background: #fff;
        }

.cb-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #0d9488;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    flex-shrink: 0;
    transition: background .15s;
}

    .cb-send-btn:hover { background: #0f766e; }

