/* Help Center Modal Styles */

/* Brand Colors */
:root {
    --meshlist-color: #52d1a0;
    --meshfeed-color: #419fec;
    --meshmedia-color: #7c3aed;
    --meshads-color: #ff7547;
}

.help-center-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.help-center-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 999998;
    animation: fadeIn 0.3s ease-out;
}

.help-center-container {
    position: relative;
    background: white;
    border-radius: 24px;
    width: 100%;
    max-width: 1100px;
    height: 90vh;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    z-index: 999999;
}

.help-center-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 16px;
    transition: all 0.2s ease;
    z-index: 10;
}

.help-center-close:hover {
    background: transparent;
    color: #374151;
    transform: scale(1.1);
}

/* Help Center Content */
.help-center-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Help Center Sidebar */
.help-center-sidebar {
    width: 240px;
    padding: 24px;
    background: #f8fafc;
    border-right: 1px solid #e5e7eb;
    overflow-y: auto;
}

.help-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.help-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.help-nav-item i {
    width: 20px;
    font-size: 16px;
}

.help-nav-item:hover {
    background: white;
    color: #129ed9;
}

.help-nav-item.active {
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

/* Brand-specific navigation colors */
.help-nav-item[data-help-section="introduction"].active {
    color: #129ed9;
}

.help-nav-item[data-help-section="connections"]:hover,
.help-nav-item[data-help-section="connections"].active {
    color: #129ed9;
}

.help-nav-item[data-help-section="meshlist"]:hover,
.help-nav-item[data-help-section="meshlist"].active {
    color: var(--meshlist-color);
}

.help-nav-item[data-help-section="meshfeed"]:hover,
.help-nav-item[data-help-section="meshfeed"].active {
    color: var(--meshfeed-color);
}

.help-nav-item[data-help-section="meshmedia"]:hover,
.help-nav-item[data-help-section="meshmedia"].active {
    color: var(--meshmedia-color);
}

.help-nav-item[data-help-section="meshads"]:hover,
.help-nav-item[data-help-section="meshads"].active {
    color: var(--meshads-color);
}

/* Help Content Area */
.help-content-area {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    min-height: 0;
}

.help-section {
    display: none;
}

.help-section.active {
    display: block;
}

.help-section-content {
    max-width: 680px;
    margin: 0 auto;
    min-height: 400px;
}

.help-step-content {
    display: none;
    text-align: center;
    animation: fadeInScale 0.3s ease-out;
}

.help-step-content.active {
    display: block;
}

.help-icon {
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: auto;
}

.help-icon img {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

.help-icon i {
    font-size: 48px;
}

/* Brand-specific icon colors */
.help-section[data-section="connections"] .help-icon i {
    color: #129ed9 !important;
}

.help-section[data-section="meshlist"] .help-icon i {
    color: var(--meshlist-color) !important;
}

.help-section[data-section="meshfeed"] .help-icon i {
    color: var(--meshfeed-color) !important;
}

.help-section[data-section="meshmedia"] .help-icon i {
    color: var(--meshmedia-color) !important;
}

.help-section[data-section="meshads"] .help-icon i {
    color: var(--meshads-color) !important;
}

.help-step-content h2 {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 16px;
    line-height: 1.2;
}

.help-description {
    font-size: 16px;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 32px;
}

.help-feature-list {
    list-style: none;
    text-align: left;
    max-width: 560px;
    margin: 32px auto 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.help-feature-list li {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    background: #f9fafb;
    border-radius: 12px;
    font-size: 15px;
    color: #374151;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.help-feature-list li:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.help-feature-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.help-feature-card-header:hover {
    background: #f1f5f9;
}

.help-feature-card-header i {
    font-size: 18px;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

.help-feature-card-header .feature-title {
    flex: 1;
    font-weight: 500;
}

.help-feature-card-header .feature-chevron {
    font-size: 12px;
    color: #9ca3af;
    transition: transform 0.2s ease;
}

.help-feature-list li.expanded .feature-chevron {
    transform: rotate(180deg);
}

/* Expandable content */
.help-feature-card-content {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid #e5e7eb;
    background: white;
}

.help-feature-list li.expanded .help-feature-card-content {
    display: block;
    animation: slideDown 0.2s ease-out;
}

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

.help-feature-card-content p {
    margin: 12px 0 0;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
}

/* Example box inside feature card */
.help-example-box {
    margin-top: 12px;
    padding: 12px 14px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px dashed #d1d5db;
}

.help-example-box .example-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #9ca3af;
    margin-bottom: 8px;
}

.help-example-box .example-label i {
    font-size: 10px;
}

.help-example-box .example-content {
    font-size: 13px;
    color: #374151;
    line-height: 1.5;
}

.help-example-box .example-content code {
    background: #e5e7eb;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 12px;
    color: #1e293b;
}

.help-example-box .example-content .example-rule {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 10px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    font-size: 12px;
}

.help-example-box .example-content .example-rule i {
    color: #10b981;
    font-size: 14px;
}

/* Legacy simple li styling for backwards compatibility */
.help-feature-list li:not(:has(.help-feature-card-header)) {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
}

.help-feature-list li:not(:has(.help-feature-card-header)) i {
    font-size: 18px;
    flex-shrink: 0;
}

/* Brand-specific feature list icons */
.help-section[data-section="introduction"] .help-feature-list li i {
    color: #129ed9;
}

.help-section[data-section="connections"] .help-feature-list li i {
    color: #129ed9;
}

.help-section[data-section="meshlist"] .help-feature-list li i {
    color: var(--meshlist-color);
}

.help-section[data-section="meshfeed"] .help-feature-list li i {
    color: var(--meshfeed-color);
}

.help-section[data-section="meshmedia"] .help-feature-list li i {
    color: var(--meshmedia-color);
}

.help-section[data-section="meshads"] .help-feature-list li i {
    color: var(--meshads-color);
}

.help-steps-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 32px;
    text-align: left;
}

.help-step-item {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
    border-left: 3px solid #129ed9;
}

/* Brand-specific step item borders */
.help-section[data-section="connections"] .help-step-item {
    border-left-color: #129ed9;
}

.help-section[data-section="meshlist"] .help-step-item {
    border-left-color: var(--meshlist-color);
}

.help-section[data-section="meshfeed"] .help-step-item {
    border-left-color: var(--meshfeed-color);
}

.help-section[data-section="meshmedia"] .help-step-item {
    border-left-color: var(--meshmedia-color);
}

.help-section[data-section="meshads"] .help-step-item {
    border-left-color: var(--meshads-color);
}

.help-step-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #129ed9 0%, #a474eb 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

/* Brand-specific step numbers */
.help-section[data-section="connections"] .help-step-number {
    background: linear-gradient(135deg, #129ed9 0%, #0c7cb5 100%);
}

.help-section[data-section="meshlist"] .help-step-number {
    background: linear-gradient(135deg, var(--meshlist-color) 0%, #3ab88a 100%);
}

.help-section[data-section="meshfeed"] .help-step-number {
    background: linear-gradient(135deg, var(--meshfeed-color) 0%, #2a8dd9 100%);
}

.help-section[data-section="meshmedia"] .help-step-number {
    background: linear-gradient(135deg, var(--meshmedia-color) 0%, #6d28d9 100%);
}

.help-section[data-section="meshads"] .help-step-number {
    background: linear-gradient(135deg, var(--meshads-color) 0%, #f97316 100%);
}

.help-step-details strong {
    display: block;
    font-size: 15px;
    color: #111827;
    margin-bottom: 4px;
}

.help-step-details p {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
    margin: 0;
}

/* Steps Progress Indicator */
.help-steps-progress {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 24px;
    padding: 0 32px;
}

.help-step-indicator {
    height: 4px;
    flex: 1;
    background: #e5e7eb;
    border-radius: 2px;
    transition: all 0.3s ease;
    position: relative;
}

.help-step-indicator::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(135deg, #129ed9 0%, #a474eb 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
    width: var(--progress-width, 0%);
}

/* Brand-specific progress indicators */
.help-section[data-section="connections"] .help-step-indicator::after {
    background: linear-gradient(135deg, #129ed9 0%, #0c7cb5 100%);
}

.help-section[data-section="meshlist"] .help-step-indicator::after {
    background: linear-gradient(135deg, var(--meshlist-color) 0%, #3ab88a 100%);
}

.help-section[data-section="meshfeed"] .help-step-indicator::after {
    background: linear-gradient(135deg, var(--meshfeed-color) 0%, #2a8dd9 100%);
}

.help-section[data-section="meshmedia"] .help-step-indicator::after {
    background: linear-gradient(135deg, var(--meshmedia-color) 0%, #6d28d9 100%);
}

.help-section[data-section="meshads"] .help-step-indicator::after {
    background: linear-gradient(135deg, var(--meshads-color) 0%, #f97316 100%);
}

/* Progress width is now dynamically calculated via --progress-width CSS variable */

/* Help Center Footer */
.help-center-footer {
    padding: 20px 32px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 16px;
}

.help-prev-btn,
.help-next-btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.help-prev-btn {
    background: #f3f4f6;
    color: #374151;
}

.help-prev-btn:hover {
    background: #e5e7eb;
}

.help-next-btn {
    background: linear-gradient(135deg, #129ed9 0%, #a474eb 100%);
    color: white;
}

.help-next-btn:hover {
    box-shadow: 0 4px 12px rgba(18, 158, 217, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .help-center-modal {
        padding: 0;
    }

    .help-center-container {
        max-width: 100%;
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .help-center-close {
        top: 12px;
        right: 12px;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 8px;
        width: 32px;
        height: 32px;
    }

    .help-center-content {
        flex-direction: column;
        height: 100%;
    }

    .help-center-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 2px solid #e5e7eb;
        padding: 8px 12px;
        flex-shrink: 0;
        background: white;
    }

    .help-center-sidebar h3 {
        display: none; /* Hide "Help Center" title on mobile */
    }

    .help-nav {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 6px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding: 4px 0;
    }

    .help-nav::-webkit-scrollbar {
        display: none;
    }

    .help-nav-item {
        white-space: nowrap;
        padding: 8px 12px;
        font-size: 12px;
        flex-shrink: 0;
        border-radius: 8px;
        background: #f8fafc;
        border: 1px solid #e5e7eb;
    }

    .help-nav-item.active {
        background: white;
        border-color: currentColor;
        font-weight: 600;
    }

    .help-nav-item i {
        font-size: 13px;
    }

    .help-nav-item span {
        font-size: 12px;
    }

    .help-content-area {
        padding: 16px 12px;
        flex: 1;
        overflow-y: auto;
        min-height: 0;
    }

    .help-section-content {
        min-height: auto;
    }

    .help-step-content h2 {
        font-size: 24px;
    }

    .help-description {
        font-size: 15px;
    }

    .help-feature-list {
        margin-top: 24px;
        max-width: 100%;
    }

    .help-feature-list li {
        font-size: 14px;
    }
    
    .help-feature-card-header {
        padding: 12px 14px;
    }
    
    .help-feature-card-content {
        padding: 0 14px 14px;
    }
    
    .help-example-box {
        padding: 10px 12px;
    }
    
    .help-example-box .example-content {
        font-size: 12px;
    }

    .help-steps-list {
        gap: 16px;
        margin-top: 24px;
    }

    .help-step-item {
        padding: 16px;
    }

    .help-step-number {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }

    .help-step-details strong {
        font-size: 14px;
    }

    .help-step-details p {
        font-size: 13px;
    }

    .help-center-footer {
        padding: 10px 12px;
        gap: 10px;
        flex-shrink: 0;
        background: white;
        border-top: 2px solid #e5e7eb;
    }

    .help-prev-btn,
    .help-next-btn {
        padding: 10px 16px;
        font-size: 13px;
        flex: 1;
    }

    .help-steps-progress {
        padding: 0 12px;
        margin-bottom: 16px;
    }

    .help-icon {
        margin-bottom: 16px;
    }

    .help-icon img {
        width: 80px;
        height: 80px;
    }

    .help-icon i {
        font-size: 40px !important;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
