/* =========================================================
   HealthNet — Sistema de Guia Interativo
   v1.0 (r42)
   ========================================================= */

/* ── Overlay de fundo ───────────────────────────────────── */
#hn-guide-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99990;
    pointer-events: auto;
    transition: background 0.25s;
}

/* ── Tooltip principal ──────────────────────────────────── */
#hn-guide-tooltip {
    display: none;
    position: fixed;
    z-index: 99999;
    width: 320px;
    max-width: calc(100vw - 24px);
    background: #fff;
    border-radius: 16px;
    box-shadow:
        0 4px 6px -1px rgba(0,0,0,0.10),
        0 20px 50px -8px rgba(0,0,0,0.28);
    padding: 24px 20px 18px;
    transition: opacity 0.22s, top 0.22s, left 0.22s;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1e293b;
    line-height: 1.5;
}

/* Seta do tooltip — acima */
#hn-guide-tooltip[data-arrow="top"]::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border: 10px solid transparent;
    border-bottom-color: #fff;
    border-top: 0;
    pointer-events: none;
}

/* Seta do tooltip — abaixo */
#hn-guide-tooltip[data-arrow="bottom"]::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border: 10px solid transparent;
    border-top-color: #fff;
    border-bottom: 0;
    pointer-events: none;
}

/* Botão fechar */
.hn-guide-skip {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #94a3b8;
    padding: 4px 6px;
    border-radius: 6px;
    line-height: 1;
    transition: color 0.15s, background 0.15s;
}
.hn-guide-skip:hover {
    color: #475569;
    background: #f1f5f9;
}

/* Título */
.hn-guide-tt-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1F4E79;
    margin-bottom: 8px;
    padding-right: 24px;
}

/* Corpo */
.hn-guide-tt-body {
    font-size: 0.9rem;
    color: #334155;
    margin-bottom: 16px;
}

/* Rodapé */
.hn-guide-tt-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* Dots de progresso */
.hn-guide-dots {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}
.hn-guide-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #cbd5e1;
    transition: background 0.2s, width 0.2s;
}
.hn-guide-dot.active {
    background: #1F4E79;
    width: 18px;
    border-radius: 4px;
}

/* Ações */
.hn-guide-tt-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

/* Botões do guia */
.hn-guide-btn {
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    white-space: nowrap;
}
.hn-guide-btn:active { transform: scale(0.96); }
.hn-guide-btn--primary {
    background: #1F4E79;
    color: #fff;
}
.hn-guide-btn--primary:hover { background: #1a4268; }
.hn-guide-btn--ghost {
    background: #f1f5f9;
    color: #475569;
}
.hn-guide-btn--ghost:hover { background: #e2e8f0; }

/* ── FAB de Ajuda ───────────────────────────────────────── */
#hn-guide-fab {
    position: fixed;
    bottom: 88px;   /* acima do chat FAB */
    right: 20px;
    z-index: 99980;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #1F4E79;
    color: #1F4E79;
    font-size: 18px;
    font-weight: 800;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s, color 0.18s, transform 0.18s, box-shadow 0.18s;
}
#hn-guide-fab:hover {
    background: #1F4E79;
    color: #fff;
    transform: scale(1.08);
    box-shadow: 0 4px 18px rgba(31,78,121,0.30);
}
#hn-guide-fab.active {
    background: #e11d48;
    border-color: #e11d48;
    color: #fff;
}
#hn-guide-fab.active:hover { background: #be123c; border-color: #be123c; }

/* ── Menu de Ajuda ──────────────────────────────────────── */
.hn-guide-helpmenu {
    position: fixed;
    z-index: 99985;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.10), 0 16px 40px -6px rgba(0,0,0,0.22);
    min-width: 220px;
    padding: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    animation: hnGuideMenuIn 0.18s ease;
}
@keyframes hnGuideMenuIn {
    from { opacity: 0; transform: scale(0.94) translateY(6px); }
    to   { opacity: 1; transform: none; }
}
.hn-guide-helpmenu-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 6px 12px 4px;
}
.hn-guide-helpmenu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    border: none;
    background: none;
    border-radius: 9px;
    font-size: 0.88rem;
    font-weight: 500;
    color: #1e293b;
    cursor: pointer;
    transition: background 0.13s;
    font-family: inherit;
}
.hn-guide-helpmenu-item:hover { background: #f1f5f9; }
.hn-guide-helpmenu-item--muted { color: #94a3b8; }
.hn-guide-helpmenu-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 4px 8px;
}

/* ── Modal de Dicas Rápidas ─────────────────────────────── */
.hn-guide-tips-modal {
    position: fixed;
    inset: 0;
    z-index: 99990;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.hn-guide-tips-box {
    background: #fff;
    border-radius: 16px;
    padding: 0;
    max-width: 380px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    overflow: hidden;
    animation: hnGuideTipsIn 0.22s ease;
}
@keyframes hnGuideTipsIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: none; }
}
.hn-guide-tips-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 14px;
    font-size: 1rem;
    font-weight: 700;
    color: #1F4E79;
    border-bottom: 1px solid #f1f5f9;
}
.hn-guide-tips-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #94a3b8;
    padding: 4px 6px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}
.hn-guide-tips-close:hover { color: #475569; background: #f1f5f9; }
.hn-guide-tips-list {
    list-style: none;
    margin: 0;
    padding: 12px 20px 4px;
}
.hn-guide-tips-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f8fafc;
    font-size: 0.88rem;
    color: #334155;
    line-height: 1.45;
}
.hn-guide-tips-list li:last-child { border-bottom: none; }
.hn-guide-tips-icon {
    font-size: 1.15rem;
    flex-shrink: 0;
    margin-top: 1px;
}
.hn-guide-tips-tour-btn {
    display: block;
    width: calc(100% - 40px);
    margin: 12px 20px 18px;
    padding: 11px;
    background: #1F4E79;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
}
.hn-guide-tips-tour-btn:hover { background: #1a4268; }

/* ── Responsivo — mobile ────────────────────────────────── */
@media (max-width: 500px) {
    #hn-guide-tooltip {
        border-radius: 14px 14px 0 0;
        bottom: 0 !important;
        top: auto !important;
        left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 20px 18px 28px;
        box-shadow: 0 -4px 30px rgba(0,0,0,0.18);
    }
    #hn-guide-tooltip::before { display: none; }
    #hn-guide-fab {
        bottom: 140px;
        right: 16px;
    }
}
