﻿/* Help Modal Overlay */
.help-modal-overlay {
    position: fixed;
    top: var(--px-36);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

/* Contact Us Fullscreen Modal (Portal Entry) */
.portal-contact-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10010;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    transition: opacity var(--transition-smooth);
}

    .portal-contact-modal-overlay.opacity-0 {
        opacity: 0;
        pointer-events: none;
    }

.portal-contact-modal-container {
    width: 100%;
    height: 100%;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.portal-contact-header {
    padding: var(--px-16) 4px;
    padding-top: var(--px-36);
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.portal-contact-back {
    border: none;
    background: transparent;
    color: #374151;
    cursor: pointer;
    padding: var(--px-4);
    border-radius: var(--radius-md);
}

    .portal-contact-back:hover {
        background: #f3f4f6;
    }

    .portal-contact-back svg {
        width: var(--px-32);
        height: var(--px-32);
    }

.portal-contact-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--px-20);
}

.portal-contact-title {
    margin: 0 0 var(--px-20) 0;
    font: normal normal 700 var(--s-28);
    line-height: 1.3;
    color: #111827;
}

.portal-contact-group {
    margin-bottom: var(--px-24);
}

.portal-contact-group-title {
    margin: 0 0 var(--px-12) 0;
    font: normal normal 500 var(--s-16);
    color: var(--bs-gray-600);
    letter-spacing: 0.5px;
}

.portal-contact-item {
    display: flex;
    align-items: flex-start;
    gap: var(--px-12);
    text-decoration: none;
    color: #111827;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    margin-top: -1px;
    padding: var(--px-20);
}

.portal-contact-item-icon {
    margin-top: 2px;
    width: var(--px-20);
    height: var(--px-20);
    flex-shrink: 0;
    color: #374151;
}

    .portal-contact-item-icon svg {
        width: 100%;
        height: 100%;
    }

.portal-contact-item-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--px-4);
}

    .portal-contact-item-text strong {
        font: normal normal 600 var(--s-18);
        line-height: 1.2;
        color: #111827;
    }

    .portal-contact-item-text small {
        font: normal normal 400 var(--s-16);
        line-height: 1.35;
        color: #6b7280;
    }

.portal-contact-item-arrow {
    color: #6b7280;
    font: normal normal 600 var(--s-20);
    line-height: 1;
    margin-top: 2px;
}

@media (max-width: 480px) {
    .portal-contact-content {
        padding: var(--px-16);
    }

    .portal-contact-title {
        font: normal normal 700 var(--s-24);
    }

    .portal-contact-item-text strong {
    }

    .portal-contact-item-text small {
    }
}

/* Legal Information & Privacy Fullscreen Modal (Portal Entry) */
.portal-legal-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10010;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    transition: opacity var(--transition-smooth);
}

    .portal-legal-modal-overlay.opacity-0 {
        opacity: 0;
        pointer-events: none;
    }

.portal-legal-modal-container {
    width: 100%;
    height: 100%;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.portal-legal-header {
    padding: var(--px-16) var(--px-20) var(--px-8);
    padding-top: var(--px-36);
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.portal-legal-back {
    border: none;
    background: transparent;
    color: #374151;
    cursor: pointer;
    padding: var(--px-4);
    border-radius: var(--radius-md);
}

    .portal-legal-back:hover {
        background: #f3f4f6;
    }

    .portal-legal-back svg {
        width: var(--px-24);
        height: var(--px-24);
    }

.portal-legal-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--px-20);
}

.portal-legal-title {
    margin: 0 0 var(--px-20) 0;
    font: normal normal 700 var(--s-28);
    line-height: 1.3;
    color: #111827;
}

.portal-legal-links {
    display: flex;
    flex-direction: column;
}

.portal-legal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--px-10);
    padding: var(--px-20) 0;
    border-top: 1px solid #e5e7eb;
    margin-top: -1px;
    text-decoration: none;
    color: #111827;
    font: normal normal 500 var(--s-16);
    line-height: 1.35;
}

    .portal-legal-item:hover {
        color: #055059;
    }

.portal-legal-item-arrow {
    color: #6b7280;
    font: normal normal 600 var(--s-20);
    flex-shrink: 0;
}

.portal-legal-modal-container {
    position: relative;
}

.portal-legal-detail-panel {
    position: absolute;
    inset: 0;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition-smooth), opacity var(--transition-smooth);
}

.portal-legal-modal-overlay.is-detail-open .portal-legal-detail-panel {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.portal-legal-detail-header {
    padding: var(--px-16) var(--px-8) var(--px-8);
    padding-top: var(--px-36);
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: var(--px-10);
}

.portal-legal-detail-title {
    margin: 0;
    font: normal normal 600 var(--s-20);
    color: #111827;
    line-height: 1.3;
}

.portal-legal-detail-body {
    padding: var(--px-20);
    overflow-y: auto;
    color: #374151;
}

.portal-legal-detail-paragraph {
    margin: 0 0 var(--px-20) 0;
    font: normal normal 400 var(--s-16);
    line-height: 1.65;
    color: #374151;
}

    .portal-legal-detail-paragraph:last-child {
        margin-bottom: 0;
    }

@media (max-width: 480px) {
    .portal-legal-content {
        padding: var(--px-16);
    }

    .portal-legal-title {
        font: normal normal 700 var(--s-24);
    }

    .portal-legal-item {
    }

    .portal-legal-detail-body {
    }

    .portal-legal-detail-title {
    }

    .portal-legal-detail-paragraph {
    }
}

.help-modal-overlay.opacity-0 {
    opacity: 0;
    pointer-events: none;
}

/* Help Modal Container */
.help-modal-container {
    width: 100%;
    height: 100%;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* ============================================
   HEADER
   ============================================ */

.help-modal-header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 1.5rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    padding-top: var(--px-36) !important;
}

.help-header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.help-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-close-help {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
    color: #64748b;
}

    .btn-close-help:hover {
        background: #f1f5f9;
        color: #1e293b;
    }

.help-close-icon {
    width: 24px;
    height: 24px;
}

.help-title-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.help-title-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #067182, #067182);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

    .help-title-icon svg {
        width: 24px;
        height: 24px;
    }

.help-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

/* Language Toggle */
.help-lang-toggle {
    display: flex;
    gap: 0.5rem;
    background: #f1f5f9;
    padding: 0.25rem;
    border-radius: 8px;
}

.help-lang-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    transition: all 0.2s;
    width: auto;
}

    .help-lang-btn.active {
        background: white;
        color: #067182;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
        height: auto;
    }

    .help-lang-btn:hover:not(.active) {
        color: #1e293b;
    }

/* Search Container */
.help-search-container {
    flex: 1;
    max-width: 500px;
}

.help-search-wrapper {
    position: relative;
}

.help-search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.3s;
    background: #f8fafc;
}

    .help-search-input:focus {
        outline: none;
        border-color: #067182;
        background: white;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    }

.help-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #64748b;
}

/* ============================================
   MAIN CONTENT LAYOUT
   ============================================ */

.help-main-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    flex: 1;
    overflow: hidden;
    width: 100%;
}

.help-mobile-nav {
    display: none;
}

/* ============================================
   SIDEBAR
   ============================================ */

.help-sidebar {
    width: 300px;
    background: white;
    border-right: 1px solid #e2e8f0;
    padding: 2rem 0;
    overflow-y: auto;
    flex-shrink: 0;
}

    .help-sidebar::-webkit-scrollbar {
        width: 6px;
    }

    .help-sidebar::-webkit-scrollbar-thumb {
        background: #e2e8f0;
        border-radius: 3px;
    }

        .help-sidebar::-webkit-scrollbar-thumb:hover {
            background: #cbd5e1;
        }

.help-toc-title {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    padding: 0 2rem;
    margin-bottom: 1rem;
}

.help-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.help-toc-item {
    margin-bottom: 0.25rem;
}

.help-toc-link {
    display: block;
    padding: 0.625rem 2rem;
    color: #64748b;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

    .help-toc-link:hover {
        color: #067182;
        background: #f8fafc;
    }

    .help-toc-link.active {
        color: #067182;
        background: #f8fafc;
        border-left-color: #067182;
        font-weight: 600;
    }

/* ============================================
   CONTENT AREA
   ============================================ */

.help-content-area {
    flex: 1;
    padding: 2rem;
    background: #f8fafc;
    overflow-y: auto;
}

    .help-content-area::-webkit-scrollbar {
        width: 8px;
    }

    .help-content-area::-webkit-scrollbar-thumb {
        background: #e2e8f0;
        border-radius: 4px;
    }

        .help-content-area::-webkit-scrollbar-thumb:hover {
            background: #cbd5e1;
        }

.help-content-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

/* ============================================
   SECTIONS
   ============================================ */

.help-section {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    animation: fadeIn 0.5s ease-out;
}

.help-section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
}

.help-section-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #067182, #067182);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

    .help-section-icon svg {
        width: 28px;
        height: 28px;
    }

.help-section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.help-section-intro {
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

/* Subsections */
.help-subsection {
    margin-top: 2rem;
}

.help-subsection-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .help-subsection-title::before {
        content: '';
        width: 4px;
        height: 24px;
        background: #067182;
        border-radius: 2px;
    }

.help-subsection-content {
    color: #64748b;
    line-height: 1.7;
}

/* Lists */
.help-content-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

    .help-content-list li {
        padding-left: 1.75rem;
        margin-bottom: 0.75rem;
        position: relative;
        color: #64748b;
        line-height: 1.6;
    }

        .help-content-list li::before {
            content: '→';
            position: absolute;
            left: 0;
            color: #067182;
            font-weight: 600;
        }

/* FAQs */
.help-faq-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: all 0.3s;
}

    .help-faq-item:hover {
        border-color: #067182;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }

.help-faq-question {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

    .help-faq-question::before {
        content: 'Q:';
        color: #067182;
        font-weight: 700;
        flex-shrink: 0;
    }

.help-faq-answer {
    color: #64748b;
    line-height: 1.6;
    padding-left: 1.75rem;
    margin: 0;
}

/* Info Boxes */
.help-info-box {
    background: rgba(37, 99, 235, 0.05);
    border-left: 4px solid #067182;
    padding: 1.25rem;
    margin: 1.5rem 0;
    border-radius: 8px;
}

.help-info-box-title {
    font-weight: 600;
    color: #067182;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .help-info-box-title svg {
        width: 20px;
        height: 20px;
    }

.help-info-box-content {
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

/* Feature Cards */
.help-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.help-feature-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s;
}

    .help-feature-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        border-color: #067182;
    }

.help-feature-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #067182, #067182);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 1rem;
}

    .help-feature-icon svg {
        width: 22px;
        height: 22px;
    }

.help-feature-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
}

.help-feature-card p {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* Badges */
.help-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    margin-left: 0.5rem;
}

.help-badge-primary {
    background: rgba(37, 99, 235, 0.1);
    color: #067182;
}

.help-badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.help-badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.help-badge-info {
    background: rgba(6, 182, 212, 0.1);
    color: #06b6d4;
}

/* Highlight search results */
.help-highlight {
    background-color: #fef3c7;
    padding: 0.1rem 0.2rem;
    border-radius: 3px;
    font-weight: 600;
}

/* No Results */
.help-no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: #64748b;
}

    .help-no-results svg {
        width: 80px;
        height: 80px;
        color: #e2e8f0;
        margin-bottom: 1rem;
    }

    .help-no-results h3 {
        font-size: 1.25rem;
        color: #1e293b;
        margin: 1rem 0 0.5rem 0;
    }

        .help-no-results h3::before {
            display: none;
        }

    .help-no-results p {
        color: #64748b;
        margin: 0;
    }

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .help-sidebar {
        width: 250px;
    }
}

@media (max-width: 768px) {
    /* Header adjustments */
    .help-modal-header {
        padding: 1rem;
        padding-top: 1rem !important;
    }

    .help-header-content {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .help-header-left {
        justify-content: space-between;
        width: 100%;
        flex-direction: row-reverse;
    }

    .help-search-container {
        max-width: 100%;
        width: 100%;
        order: 3;
    }

    .help-lang-toggle {
        order: 2;
        width: 100%;
        margin: 0 auto;
        justify-content: stretch;
    }

    .help-lang-btn {
        flex: 1;
        text-align: center;
    }

    /* Main container as column */
    .help-main-container {
        flex-direction: column;
    }

    .help-mobile-nav {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.625rem 1rem;
        background: #fff;
        border-bottom: 1px solid #e2e8f0;
    }

        .help-mobile-nav.is-hidden {
            display: none;
        }

    .help-mobile-nav-btn {
        width: 36px;
        height: 36px;
        border: 1px solid #d1d5db;
        border-radius: 10px;
        background: #fff;
        color: #1f2937;
        font-size: 1rem;
        font-weight: 600;
        cursor: pointer;
        flex-shrink: 0;
    }

        .help-mobile-nav-btn:disabled {
            opacity: 0.45;
            cursor: not-allowed;
        }

    .help-mobile-nav-current {
        flex: 1;
        height: 36px;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        background: #f8fafc;
        color: #334155;
        font-size: 0.85rem;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding: 0 0.75rem;
        text-align: center;
    }

    /* Hide sidebar TOC on mobile */
    .help-sidebar {
        display: none;
    }

    /* Content adjustments */
    .help-content-area {
        padding: 1rem;
    }

    .help-section {
        padding: 1.5rem;
        border-radius: 12px;
    }

    .help-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .help-section-title {
        font-size: 1.5rem;
    }

    .help-subsection-title {
        font-size: 1.125rem;
    }

    /* Feature grid single column */
    .help-feature-grid {
        grid-template-columns: 1fr;
    }

    /* Title icon smaller */
    .help-title-icon {
        width: 36px;
        height: 36px;
    }

        .help-title-icon svg {
            width: 20px;
            height: 20px;
        }

    .help-modal-title {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .help-modal-overlay {
        align-items: flex-end;
    }

    .help-modal-container {
        border-radius: 16px 16px 0 0;
        max-height: 100dvh;
    }

    .help-modal-header {
        padding: 0.75rem;
        padding-top: 0.75rem !important;
    }

    .help-title-wrapper {
        gap: 0.75rem;
    }

    .help-header-left {
        gap: 0.75rem;
    }

    .help-search-input {
        font-size: 16px;
    }

    .help-mobile-nav {
        padding: 0.5rem 0.75rem;
    }

    .help-mobile-nav-btn {
        width: 34px;
        height: 34px;
    }

    .help-mobile-nav-current {
        height: 34px;
        font-size: 0.8rem;
    }

    .help-section {
        padding: 1rem;
    }

    .help-section-icon {
        width: 40px;
        height: 40px;
    }

        .help-section-icon svg {
            width: 24px;
            height: 24px;
        }

    .help-section-title {
        font-size: 1.25rem;
    }

    .help-subsection-title {
        font-size: 1rem;
    }
}

.portal-legal-item-arrow svg,
.portal-contact-item-arrow svg {
    height: var(--px-20);
}

/* ============================================
   DARK MODE SUPPORT (Optional)
   ============================================ */

