/**
 * ============================================================================
 * NextLife Money - Help & Knowledge Drawer Styles
 * ============================================================================
 */

/* ============================================================================
   1. STICKY RIGHT-EDGE PULL-TAB
   ============================================================================ */

.help-drawer-sticky-tab {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1045;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.55rem 0.45rem 0.6rem;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-right: none;
    border-radius: 1.25rem 0 0 1.25rem;
    box-shadow: -3px 3px 12px rgba(2, 132, 199, 0.35);
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.22s ease, 
                opacity 0.2s ease,
                background 0.2s ease;
    user-select: none;
    outline: none;
}

[data-bs-theme="dark"] .help-drawer-sticky-tab {
    background: linear-gradient(135deg, #0284c7 0%, #0c4a6e 100%);
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: -3px 3px 16px rgba(0, 0, 0, 0.5), 0 0 10px rgba(2, 132, 199, 0.3);
}

.help-drawer-sticky-tab:hover,
.help-drawer-sticky-tab:focus-visible {
    transform: translateY(-50%) translateX(-4px);
    box-shadow: -5px 5px 18px rgba(2, 132, 199, 0.55);
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    color: #ffffff;
}

.help-drawer-sticky-tab:active {
    transform: translateY(-50%) translateX(-2px);
}

/* Hidden state when drawer is opened */
.help-drawer-sticky-tab.is-hidden {
    transform: translateY(-50%) translateX(110%) !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Emphasized '?' Icon */
.sticky-tab-icon {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}

.help-drawer-sticky-tab:hover .sticky-tab-icon {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.32);
}

/* Subtle Pulse Indicator */
.sticky-tab-pulse {
    position: absolute;
    top: 0;
    left: 4px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #38bdf8;
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7);
    animation: tabPulse 2.2s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes tabPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7);
    }
    70% {
        box-shadow: 0 0 0 9px rgba(56, 189, 248, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0);
    }
}

@media (max-width: 576px) {
    .help-drawer-sticky-tab {
        padding: 0.4rem 0.45rem 0.4rem 0.5rem;
    }
}

/* ============================================================================
   2. OFFCANVAS DRAWER CONTAINER & HEADER
   ============================================================================ */

#offcanvasHelpGuide {
    width: 520px;
    max-width: 100vw;
    border-left: 1px solid rgba(0, 0, 0, 0.08);
    background: #ffffff;
    box-shadow: -8px 0 28px rgba(0, 0, 0, 0.12);
    z-index: 1060;
}

[data-bs-theme="dark"] #offcanvasHelpGuide {
    background: #0f172a;
    border-left-color: rgba(255, 255, 255, 0.08);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.45);
    color: #cbd5e1;
}

/* Offcanvas Header styling */
#offcanvasHelpGuide .offcanvas-header {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    padding: 1.25rem 1.5rem;
}

[data-bs-theme="dark"] #offcanvasHelpGuide .offcanvas-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Search bar styling */
.help-search-container {
    position: relative;
    padding: 0.85rem 1.25rem;
    background: #f8fafc;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

[data-bs-theme="dark"] .help-search-container {
    background: #1e293b;
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

.help-search-input {
    border-radius: 50rem;
    padding-left: 2.5rem;
    padding-right: 2rem;
    font-size: 0.85rem;
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
}

[data-bs-theme="dark"] .help-search-input {
    background-color: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

.help-search-icon {
    position: absolute;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

/* ============================================================================
   3. CATEGORY TABS
   ============================================================================ */

.help-nav-pills {
    display: flex;
    gap: 0.4rem;
    padding: 0.75rem 1.25rem;
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    overflow-x: auto;
    scrollbar-width: thin;
}

[data-bs-theme="dark"] .help-nav-pills {
    background: #0f172a;
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

.help-nav-pills .nav-link {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 50rem;
    color: #64748b;
    background: transparent;
    border: 1px solid #e2e8f0;
    white-space: nowrap;
    transition: all 0.2s ease;
}

[data-bs-theme="dark"] .help-nav-pills .nav-link {
    color: #94a3b8;
    border-color: #334155;
}

.help-nav-pills .nav-link.active {
    background-color: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}

/* Drawer Body */
.help-drawer-body {
    padding: 1.25rem;
    height: calc(100vh - 180px);
    overflow-y: auto;
}

/* ============================================================================
   4. CONTEXTUAL "YOU ARE HERE" BANNER
   ============================================================================ */

.help-context-card {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 0.75rem;
    padding: 0.85rem 1rem;
    box-shadow: 0 1px 3px rgba(2, 132, 199, 0.06);
    animation: fadeInSlideDown 0.3s ease-out;
}

[data-bs-theme="dark"] .help-context-card {
    background: rgba(2, 132, 199, 0.12);
    border-color: rgba(56, 189, 248, 0.25);
    color: #e0f2fe;
}

[data-bs-theme="dark"] .help-context-text {
    color: #bae6fd !important;
}

.help-context-icon {
    width: 32px;
    height: 32px;
    background: #e0f2fe;
}

[data-bs-theme="dark"] .help-context-icon {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8 !important;
}

@keyframes fadeInSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================================
   5. BEGINNER ROADMAP CARDS & CALLOUTS
   ============================================================================ */

.help-beginner-hero {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem 1.15rem;
}

[data-bs-theme="dark"] .help-beginner-hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-color: #334155;
}

.help-roadmap-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem 1.15rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

[data-bs-theme="dark"] .help-roadmap-card {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.help-roadmap-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.12);
}

.help-roadmap-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.help-roadmap-step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-weight: 800;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.help-plain-tip {
    background: #fffbeb;
    border: 1px solid #fef3c7;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    color: #92400e;
}

[data-bs-theme="dark"] .help-plain-tip {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.25);
    color: #fde68a;
}

.help-reassure-box {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 0.75rem;
    padding: 0.85rem 1rem;
    color: #166534;
}

[data-bs-theme="dark"] .help-reassure-box {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.25);
    color: #6ee7b7;
}

/* ============================================================================
   6. FLOWCHART STEP CARDS
   ============================================================================ */

.help-flow-card {
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    padding: 1rem 1.15rem;
    margin-bottom: 0.5rem;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

[data-bs-theme="dark"] .help-flow-card {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.help-flow-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.12);
}

.help-step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #0284c7;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.75rem;
    margin-right: 0.5rem;
}

.help-flow-connector {
    text-align: center;
    color: #94a3b8;
    margin-top: -0.25rem;
    margin-bottom: 0.4rem;
    font-size: 1rem;
}

/* ============================================================================
   7. PAGE ACCORDIONS & CALLOUTS
   ============================================================================ */

.help-accordion .accordion-item {
    border-radius: 0.75rem !important;
    border: 1px solid #e2e8f0;
    margin-bottom: 0.75rem;
    background: #ffffff;
    overflow: hidden;
}

[data-bs-theme="dark"] .help-accordion .accordion-item {
    background: #1e293b;
    border-color: #334155;
}

.help-accordion .accordion-button {
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.85rem 1.15rem;
    background: transparent;
    box-shadow: none;
}

.help-accordion .accordion-button:not(.collapsed) {
    background-color: rgba(2, 132, 199, 0.06);
    color: #0284c7;
}

[data-bs-theme="dark"] .help-accordion .accordion-button:not(.collapsed) {
    background-color: rgba(2, 132, 199, 0.15);
    color: #38bdf8;
}

/* Highlighted border when target page matches */
.help-accordion .accordion-item.is-target-page {
    border: 2px solid #0284c7 !important;
    box-shadow: 0 0 12px rgba(2, 132, 199, 0.2);
}

/* Impact Callout Box */
.help-impact-callout {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 0.5rem;
    padding: 0.75rem 0.9rem;
    margin: 0.75rem 0;
    font-size: 0.82rem;
    color: #166534;
}

[data-bs-theme="dark"] .help-impact-callout {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.25);
    color: #6ee7b7;
}

.help-impact-title {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.25rem;
}

/* Search highlight */
.help-highlight {
    background-color: #fef08a;
    color: #854d0e;
    padding: 0.1rem 0.2rem;
    border-radius: 2px;
}

[data-bs-theme="dark"] .help-highlight {
    background-color: #854d0e;
    color: #fef08a;
}
