/* =============================================
   Billix Guides Pages Styles
   ============================================= */

/* ---- Guides Listing Page ---- */

.guides-hero {
    padding: 140px 0 60px;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
    text-align: center;
}

.guides-list {
    padding: 40px 0 80px;
}

.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.guide-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-normal);
    box-shadow: 0 2px 8px var(--shadow-light);
}

.guide-card:hover {
    border-color: var(--brand-primary);
    box-shadow: 0 8px 30px var(--shadow-primary);
    transform: translateY(-2px);
}

.guide-card-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    background: var(--brand-primary-lighter);
    color: var(--brand-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.guide-card-content {
    flex: 1;
    min-width: 0;
}

.guide-card-badge {
    display: inline-block;
    background: var(--brand-primary-lighter);
    color: var(--brand-primary-dark);
    font-size: 12px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
}

.guide-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 6px;
}

.guide-card-description {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.5;
    margin-bottom: 10px;
}

.guide-card-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--gray-500);
}

.guide-card-meta i {
    margin-left: 4px;
}

.guide-card-arrow {
    flex-shrink: 0;
    color: var(--gray-400);
    font-size: 16px;
    transition: all var(--transition-fast);
}

.guide-card:hover .guide-card-arrow {
    color: var(--brand-primary);
    transform: translateX(-4px);
}


/* ---- Guide Detail Page ---- */

.guide-hero {
    padding: 120px 0 50px;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
}

.guide-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--brand-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 24px;
    transition: all var(--transition-fast);
}

.guide-back-link:hover {
    color: var(--brand-primary-dark);
}

.guide-hero-content {
    max-width: 700px;
}

.guide-badge {
    display: inline-block;
    background: var(--brand-primary);
    color: var(--white);
    font-size: 13px;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.guide-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1.3;
    margin-bottom: 12px;
}

.guide-subtitle {
    font-size: 18px;
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 20px;
}

.guide-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 14px;
    color: var(--gray-500);
}

.guide-meta-bar i {
    margin-left: 6px;
    color: var(--brand-primary);
}


/* ---- Layout: Sidebar + Content ---- */

.guide-toc-section {
    padding: 40px 0 80px;
}

.guide-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 48px;
    align-items: start;
}

.guide-sidebar {
    position: sticky;
    top: 90px;
}

.guide-toc {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: 0 2px 8px var(--shadow-light);
}

.toc-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gray-200);
}

.toc-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toc-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    color: var(--gray-600);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.toc-link:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.toc-link.active {
    background: var(--brand-primary-lighter);
    color: var(--brand-primary-dark);
    font-weight: 600;
}

.toc-step {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: var(--gray-200);
    color: var(--gray-600);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.toc-link.active .toc-step {
    background: var(--brand-primary);
    color: var(--white);
}


/* ---- Guide Content ---- */

.guide-content {
    min-width: 0;
}

.guide-step {
    margin-bottom: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--gray-200);
}

.guide-step:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.step-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.step-number {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: var(--brand-primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
}

.step-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.step-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
}

.step-badge.one-time {
    background: var(--info-light);
    color: #1d4ed8;
}

.step-badge.recurring {
    background: var(--success-light);
    color: #065f46;
}

.step-intro {
    font-size: 16px;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 24px;
}


/* ---- Sub-steps ---- */

.sub-step {
    margin-bottom: 32px;
    padding: 24px;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    border-right: 4px solid var(--brand-primary);
}

.sub-step h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 16px;
}

.sub-step h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 8px;
    margin-top: 16px;
}

.sub-detail {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

.sub-detail p {
    font-size: 14px;
    color: var(--gray-700);
    line-height: 1.7;
    margin-bottom: 8px;
}


/* ---- Path Indicator (navigation breadcrumb) ---- */

.path-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--gray-700);
    font-weight: 500;
}

.path-indicator i {
    color: var(--brand-primary);
    font-size: 16px;
}


/* ---- Ordered / Unordered Lists ---- */

.guide-steps-list {
    list-style: none;
    counter-reset: step-counter;
    padding: 0;
    margin: 0 0 12px;
}

.guide-steps-list > li {
    counter-increment: step-counter;
    position: relative;
    padding-right: 36px;
    padding-bottom: 12px;
    font-size: 14px;
    color: var(--gray-700);
    line-height: 1.7;
}

.guide-steps-list > li::before {
    content: counter(step-counter);
    position: absolute;
    right: 0;
    top: 2px;
    width: 22px;
    height: 22px;
    background: var(--brand-primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.guide-steps-list > li:last-child {
    padding-bottom: 0;
}

/* Nested ordered list inside guide-steps-list */
.guide-steps-list ul {
    margin-top: 8px;
    padding-right: 20px;
}

.guide-steps-list ul li {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 4px;
    list-style: disc;
}

.guide-bullets {
    padding-right: 20px;
    margin: 8px 0 16px;
}

.guide-bullets li {
    font-size: 14px;
    color: var(--gray-700);
    line-height: 1.7;
    margin-bottom: 6px;
}

.step-body p {
    font-size: 14px;
    color: var(--gray-700);
    line-height: 1.7;
    margin-bottom: 12px;
}


/* ---- Info / Tip / Warning / Success Boxes ---- */

.info-box,
.tip-box,
.warning-box,
.success-box {
    display: flex;
    gap: 14px;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin: 16px 0;
    font-size: 14px;
    line-height: 1.6;
}

.info-box > i,
.tip-box > i,
.warning-box > i,
.success-box > i {
    flex-shrink: 0;
    font-size: 18px;
    margin-top: 2px;
}

.info-box {
    background: var(--info-light);
    border: 1px solid #93c5fd;
    color: #1e40af;
}

.info-box > i { color: #3b82f6; }

.tip-box {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
}

.tip-box > i { color: #22c55e; }

.warning-box {
    background: var(--warning-light);
    border: 1px solid #fcd34d;
    color: #92400e;
}

.warning-box > i { color: #f59e0b; }

.warning-box ul {
    margin: 8px 0 0;
    padding-right: 18px;
}

.warning-box ul li {
    margin-bottom: 4px;
}

.success-box {
    background: var(--success-light);
    border: 1px solid #6ee7b7;
    color: #065f46;
    font-size: 16px;
    font-weight: 600;
}

.success-box > i { color: #10b981; font-size: 22px; }


/* ---- Status Cards (Preview Screen) ---- */

.status-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 16px 0;
}

.status-card {
    display: flex;
    gap: 16px;
    padding: 20px;
    border-radius: var(--radius-md);
    background: var(--white);
    border: 1px solid var(--gray-200);
}

.status-icon {
    flex-shrink: 0;
    font-size: 22px;
    margin-top: 2px;
}

.status-content h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
}

.status-content p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 8px;
}

.status-content ul {
    padding-right: 18px;
    margin: 0;
}

.status-content ul li {
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 4px;
}

.status-red { border-right: 4px solid #ef4444; }
.status-red .status-icon { color: #ef4444; }
.status-red h4 { color: #dc2626; }

.status-blue { border-right: 4px solid #3b82f6; }
.status-blue .status-icon { color: #3b82f6; }
.status-blue h4 { color: #2563eb; }

.status-orange { border-right: 4px solid #f59e0b; }
.status-orange .status-icon { color: #f59e0b; }
.status-orange h4 { color: #d97706; }


/* ---- File Cards ---- */

.file-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px 0;
}

.file-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 20px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
}

.file-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--gray-100);
    color: var(--gray-600);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.file-info {
    flex: 1;
}

.file-info h5 {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
    font-family: monospace;
    direction: ltr;
    text-align: right;
}

.file-info p {
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.6;
    margin: 6px 0 0;
}

.file-freq {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 1px 8px;
    border-radius: 10px;
}

.recurring-badge {
    background: var(--success-light);
    color: #065f46;
}

.onetime-badge {
    background: var(--info-light);
    color: #1d4ed8;
}

.optional-badge {
    background: var(--gray-100);
    color: var(--gray-600);
}


/* ---- Code styling ---- */

code {
    background: var(--gray-100);
    color: var(--brand-primary-dark);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    direction: ltr;
    unicode-bidi: embed;
}


/* ---- Responsive ---- */

@media (max-width: 1023px) {
    .guide-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .guide-sidebar {
        position: relative;
        top: 0;
        margin-bottom: 32px;
    }

    .guide-toc {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
    }

    .toc-title {
        width: 100%;
        margin-bottom: 8px;
        padding-bottom: 8px;
    }

    .toc-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }

    .toc-link {
        padding: 6px 12px;
        font-size: 13px;
        background: var(--gray-50);
        border: 1px solid var(--gray-200);
        border-radius: 20px;
    }

    .toc-link.active {
        border-color: var(--brand-primary);
    }

    .guide-title {
        font-size: 28px;
    }
}

@media (max-width: 639px) {
    .guides-hero {
        padding: 120px 0 40px;
    }

    .guide-hero {
        padding: 100px 0 30px;
    }

    .guide-title {
        font-size: 24px;
    }

    .guide-subtitle {
        font-size: 16px;
    }

    .guide-meta-bar {
        flex-direction: column;
        gap: 8px;
    }

    .guides-grid {
        grid-template-columns: 1fr;
    }

    .guide-card {
        flex-direction: column;
        text-align: center;
    }

    .guide-card-arrow {
        display: none;
    }

    .guide-card-meta {
        justify-content: center;
    }

    .step-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .step-title {
        font-size: 20px;
    }

    .sub-step {
        padding: 16px;
    }

    .status-card {
        flex-direction: column;
        gap: 10px;
    }

    .file-card {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .file-icon {
        margin: 0 auto;
    }

    .file-info h5 {
        text-align: center;
    }

    .path-indicator {
        flex-direction: column;
        text-align: center;
        gap: 6px;
    }
}