/* Help & Guides Module Styles */
/* File: css/modules/help.css */

.help-container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Page Header */
.help-page-header {
    margin-bottom: 32px;
}

.help-page-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 8px 0;
}

.help-page-header p {
    color: var(--gray);
    font-size: 16px;
    margin: 0;
}

/* Quick Nav Container */
.help-quick-nav {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

/* Section Title */
.help-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    margin: 0 0 16px 0;
}

/* Section Description */
.help-section-desc {
    color: var(--dark-gray);
    font-size: 14px;
    line-height: 1.7;
    margin: 0 0 20px 0;
}

.help-section-desc:last-child {
    margin-bottom: 0;
}

/* Step Badge Colors */
.step-badge.step-1 { background: var(--success); }
.step-badge.step-2 { background: var(--info); }
.step-badge.step-3 { background: var(--warning); }
.step-badge.step-4 { background: #8B5CF6; }

/* Step Timing Colors */
.step-timing.step-1 { color: var(--success); }
.step-timing.step-2 { color: var(--info); }
.step-timing.step-3 { color: var(--warning); }
.step-timing.step-4 { color: #8B5CF6; }

/* Doc Icon Colors */
.doc-icon.warning { color: var(--warning); }
.doc-icon.success { color: var(--success); }
.doc-icon.purple { color: #8B5CF6; }
.doc-icon.primary { color: var(--primary); }

/* Check Icon Colors */
.check-icon.success { color: var(--success); }
.check-icon.primary { color: var(--primary); }

.guide-section {
    scroll-margin-top: 100px; /* Offset for fixed header/navigation */
}

/* Quick Navigation */
.help-nav-link {
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all var(--transition-base);
}

.help-nav-link.active {
    background: var(--primary);
    color: white;
}

.help-nav-link:not(.active) {
    background: white;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.help-nav-link:hover:not(.active) {
    background: var(--primary-light);
}

/* Overview Hero Card */
.help-hero {
    background: var(--gradient-1);
    color: white;
    padding: 40px;
    border-radius: 16px;
    margin-bottom: 32px;
}

.help-hero h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 16px 0;
}

.help-hero p {
    font-size: 18px;
    line-height: 1.7;
    margin: 0 0 24px 0;
    opacity: 0.95;
}

.help-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.help-stat-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    color: var(--dark);
}

.help-stat-card .stat-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
}

.help-stat-card .stat-label {
    font-size: 14px;
    color: var(--gray);
}

/* Workflow Steps */
.workflow-step {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    position: relative;
    transition: all 0.3s ease;
}

.workflow-step:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.workflow-step .step-badge {
    position: absolute;
    top: -12px;
    left: 24px;
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.workflow-step .step-icon {
    font-size: 32px;
    margin-bottom: 16px;
}

.workflow-step h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
    margin: 0 0 12px 0;
}

.workflow-step p {
    color: var(--gray);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.workflow-step .step-timing {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    font-size: 12px;
    font-weight: 600;
}

/* Section Cards */
.guide-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 32px;
}

.guide-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.guide-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.guide-card-icon.calculator {
    background: #DCFCE7;
}

.guide-card-icon.certificates {
    background: #FEF3C7;
}

.guide-card-icon.invoicing {
    background: #E0E7FF;
}

.guide-card-icon.reclaims {
    background: #DCFCE7;
}

.guide-card h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 4px 0;
}

.guide-card .subtitle {
    color: var(--gray);
    margin: 0;
    font-size: 14px;
}

.guide-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

@media (max-width: 768px) {
    .guide-content-grid {
        grid-template-columns: 1fr;
    }
}

/* Feature List */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--light);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list .check-icon {
    color: var(--success);
    font-size: 18px;
    flex-shrink: 0;
}

.feature-list span {
    color: var(--dark-gray);
    font-size: 14px;
}

/* How-To Box */
.how-to-box {
    background: var(--light);
    padding: 24px;
    border-radius: 12px;
}

.how-to-box h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    margin: 0 0 16px 0;
}

.how-to-box ol {
    padding-left: 20px;
    margin: 0;
    color: var(--dark-gray);
    font-size: 14px;
    line-height: 1.8;
}

.how-to-box li {
    margin-bottom: 8px;
}

.how-to-box li:last-child {
    margin-bottom: 0;
}

/* Pro Tip Banner */
.pro-tip {
    margin-top: 24px;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid;
}

.pro-tip p {
    margin: 0;
    font-size: 14px;
}

.pro-tip.calculator {
    background: #EFF6FF;
    border-left-color: var(--info);
}

.pro-tip.calculator p {
    color: #1E40AF;
}

.pro-tip.certificates {
    background: #FEF3C7;
    border-left-color: var(--warning);
}

.pro-tip.certificates p {
    color: #92400E;
}

.pro-tip.invoicing {
    background: #E0E7FF;
    border-left-color: var(--primary);
}

.pro-tip.invoicing p {
    color: #3730A3;
}

.pro-tip.reclaims {
    background: #DCFCE7;
    border-left-color: var(--success);
}

.pro-tip.reclaims p {
    color: #065F46;
}

/* Tips Grid */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.tip-card {
    border-radius: 16px;
    padding: 24px;
}

.tip-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
}

.tip-card p {
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.tip-card.plan-ahead {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
}

.tip-card.plan-ahead h3 {
    color: #92400E;
}

.tip-card.plan-ahead p {
    color: #78350F;
}

.tip-card.organize {
    background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
}

.tip-card.organize h3 {
    color: #1E40AF;
}

.tip-card.organize p {
    color: #1E3A8A;
}

.tip-card.communicate {
    background: linear-gradient(135deg, #DCFCE7 0%, #BBF7D0 100%);
}

.tip-card.communicate h3 {
    color: #166534;
}

.tip-card.communicate p {
    color: #14532D;
}

.tip-card.treaties {
    background: linear-gradient(135deg, #E0E7FF 0%, #C7D2FE 100%);
}

.tip-card.treaties h3 {
    color: #3730A3;
}

.tip-card.treaties p {
    color: #312E81;
}

.tip-card.fees {
    background: linear-gradient(135deg, #FCE7F3 0%, #FBCFE8 100%);
}

.tip-card.fees h3 {
    color: #9D174D;
}

.tip-card.fees p {
    color: #831843;
}

.tip-card.deadlines {
    background: linear-gradient(135deg, #F3E8FF 0%, #E9D5FF 100%);
}

.tip-card.deadlines h3 {
    color: #6B21A8;
}

.tip-card.deadlines p {
    color: #581C87;
}

/* Help CTA Banner */
.help-cta {
    background: var(--gradient-1);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    color: white;
}

.help-cta h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 16px 0;
}

.help-cta p {
    font-size: 16px;
    opacity: 0.9;
    margin: 0 0 24px 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.help-cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.help-cta .btn-primary {
    padding: 14px 28px;
    background: white;
    color: var(--primary);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 16px;
}

.help-cta .btn-secondary {
    padding: 14px 28px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 16px;
}

/* Workflow Steps Grid */
.workflow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

/* Document List */
.doc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.doc-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--light);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.doc-list li:last-child {
    border-bottom: none;
}

.doc-list .doc-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.doc-list span {
    color: var(--dark-gray);
    font-size: 14px;
}

/* Section Header with Number */
.section-header-numbered {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.section-header-numbered .number-badge {
    background: var(--primary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
}

.section-header-numbered h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}

/* Search Box */
.help-search-container {
    margin-bottom: 32px;
    position: relative;
}

.help-search-box {
    display: flex;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}

.help-search-box input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: all var(--transition-base);
}

.help-search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.help-search-btn {
    padding: 14px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    transition: all var(--transition-base);
}

.help-search-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.help-search-results {
    margin-top: 16px;
    padding: 16px;
    background: #FEF3C7;
    border-radius: 8px;
    display: none;
}

.help-search-results.has-results {
    display: block;
}

.help-search-results h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: var(--dark);
}

.help-search-results ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.help-search-results li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.help-search-results li:last-child {
    border-bottom: none;
}

.help-search-results a {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
}

.help-search-results a:hover {
    text-decoration: underline;
}

/* Highlight matching text */
.search-highlight {
    background: #FEF3C7;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

/* Scroll Progress Indicator */
.help-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    z-index: 9999;
    display: none;
}

.help-scroll-progress .help-scroll-progress-bar {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.1s ease-out;
}

/* Back to Top Button */
.back-to-top-btn {
    position: fixed;
    bottom: 32px;
    right: 32px;
    padding: 12px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: all var(--transition-base);
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.back-to-top-btn.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.back-to-top-btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* FAQ Section */
.faq-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all var(--transition-base);
}

.faq-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: var(--light);
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    transition: all var(--transition-base);
}

.faq-question:hover {
    background: #E5E7EB;
}

.faq-question[aria-expanded="true"] {
    background: white;
    border-bottom: 1px solid var(--border-color);
}

.faq-question[aria-expanded="true"] .faq-toggle {
    transform: rotate(45deg);
}

.faq-toggle {
    font-size: 24px;
    color: var(--primary);
    font-weight: bold;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 16px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 24px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: white;
}

.faq-answer[aria-hidden="false"] {
    max-height: 1000px;
    padding: 24px;
}

.faq-answer p {
    color: var(--gray);
    line-height: 1.7;
    margin: 0 0 16px 0;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

.faq-answer ul {
    color: var(--gray);
    margin: 16px 0 16px 24px;
    line-height: 1.7;
}

.faq-answer li {
    margin-bottom: 8px;
}

/* Print Styles */
@media print {
    .help-quick-nav,
    .help-search-container,
    .back-to-top-btn,
    .help-scroll-progress,
    .help-cta-buttons button:not(:first-child),
    .faq-toggle {
        display: none !important;
    }
    
    .help-container {
        max-width: 100%;
    }
    
    .guide-section {
        page-break-inside: avoid;
        margin-bottom: 24px;
    }
    
    .guide-card {
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
    
    .faq-answer[aria-hidden="false"] {
        max-height: none;
        display: block;
    }
    
    .faq-item {
        border: 1px solid #ccc;
        margin-bottom: 16px;
        page-break-inside: avoid;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    .help-page-header {
        margin-bottom: 24px;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .help-search-box {
        flex-direction: column;
    }
    
    .back-to-top-btn {
        bottom: 20px;
        right: 20px;
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .help-scroll-progress {
        display: block;
    }
}
