/* AI Chat Implementation Guide Styles */

:root {
    --primary-color: #00b4d8;
    --secondary-color: #ff6b35;
    --text-color: #374151;
    --light-text: #6b7280;
    --background-color: #ffffff;
    --light-background: #f9fafb;
    --border-color: #e5e7eb;
    --code-background: #f3f4f6;
    --header-height: 70px;
    --toc-width: 260px;
    --max-content-width: 800px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    padding-top: 0;
}

/* Header Styles */
header {
    position: relative;
    left: 0;
    right: 0;
    height: var(--header-height);
    background-color: var(--background-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

header.shadow {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.logo:hover {
    opacity: 0.8;
    text-decoration: none;
}

.logo span:nth-child(1) { color: #1a1a2e; }
.logo span:nth-child(2) { color: var(--primary-color); }
.logo span:nth-child(3) { color: var(--secondary-color); }

nav {
    display: flex;
    gap: 2rem;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.2s ease;
    border-bottom: 2px solid transparent;
}

nav a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Article Container */
.article-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: var(--toc-width) 1fr;
    gap: 3rem;
    padding: 2rem;
    position: relative;
}

/* Article Header */
.article-header {
    grid-column: 1 / -1;
    margin-bottom: 2rem;
    padding: 2rem 0;
    border-bottom: 2px solid var(--border-color);
}

.article-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.article-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.article-meta span {
    color: var(--light-text);
    font-size: 0.9rem;
    padding: 0.25rem 0.75rem;
    background: var(--light-background);
    border-radius: 15px;
}

.published-date {
    background: linear-gradient(135deg, var(--primary-color), #0891b2) !important;
    color: white !important;
}

.read-time {
    background: linear-gradient(135deg, var(--secondary-color), #ea580c) !important;
    color: white !important;
}

.category {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: white !important;
}

.article-intro {
    font-size: 1.2rem;
    color: var(--light-text);
    line-height: 1.7;
}

/* Table of Contents */
.table-of-contents {
    position: sticky;
    top: 2rem;
    height: fit-content;
    background: var(--light-background);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.table-of-contents h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 600;
}

.table-of-contents ul {
    list-style: none;
}

.table-of-contents li {
    margin-bottom: 0.5rem;
}

.table-of-contents a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.4;
    display: block;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.table-of-contents a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(4px);
}

/* Article Content */
.article-content {
    max-width: var(--max-content-width);
}

.article-content h2 {
    font-size: 2rem;
    margin: 3rem 0 1.5rem 0;
    color: var(--primary-color);
    font-weight: 700;
    scroll-margin-top: 1rem;
    position: relative;
}

.article-content h2::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.article-content h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem 0;
    color: var(--text-color);
    font-weight: 600;
}

.article-content h4 {
    font-size: 1.2rem;
    margin: 1.5rem 0 0.75rem 0;
    color: var(--text-color);
    font-weight: 600;
}

.article-content p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.article-content ul, .article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Special Content Boxes */
.intro-callout {
    background: linear-gradient(135deg, rgba(0, 180, 216, 0.1), rgba(255, 107, 53, 0.1));
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
}

.intro-callout h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    margin-top: 0;
}

.tip-box {
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.tip-box h4 {
    color: #0369a1;
    margin-bottom: 0.75rem;
    margin-top: 0;
}

.example-box {
    background: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.example-box h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    margin-top: 0;
}

.warning-box {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.warning-box h4 {
    color: #dc2626;
    margin-bottom: 0.75rem;
    margin-top: 0;
}

/* Platform Cards */
.platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.platform-card {
    background: var(--light-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.platform-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.platform-card h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.platform-card .pricing {
    font-weight: 600;
    color: var(--secondary-color);
    margin-top: 1rem;
}

/* Decision Matrix Table */
.decision-matrix {
    margin: 2rem 0;
}

.decision-matrix table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.decision-matrix th,
.decision-matrix td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.decision-matrix th {
    background: var(--light-background);
    font-weight: 600;
    color: var(--primary-color);
}

/* Checklist Styles */
.checklist {
    background: var(--light-background);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.checklist input[type="checkbox"] {
    margin-right: 0.75rem;
    transform: scale(1.2);
    accent-color: var(--primary-color);
}

.checklist label {
    cursor: pointer;
    line-height: 2;
    font-weight: 500;
}

/* Code Blocks */
.code-block {
    background: var(--code-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Color Examples */
.color-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.color-sample {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.color-box {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* Conversation Flow */
.flow-example {
    background: var(--light-background);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.conversation-flow {
    max-width: 400px;
}

.bot-message {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 18px 18px 18px 4px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.user-options {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.user-options button {
    background: white;
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.75rem;
    border-radius: 15px;
    text-align: left;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.user-options button:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Testing Grid */
.testing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.test-category {
    background: var(--light-background);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.test-category h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* A/B Test Table */
.ab-test-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

.ab-test-table th,
.ab-test-table td {
    padding: 0.75rem;
    text-align: left;
    border: 1px solid var(--border-color);
}

.ab-test-table th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.ab-test-table tr:nth-child(even) {
    background: var(--light-background);
}

/* Integration Tips */
.integration-tips {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
    margin: 2rem 0;
}

.integration-tips h4 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 1rem;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.metric-card {
    background: var(--light-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
}

.metric-card h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.metric-card .target {
    background: var(--secondary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 1rem;
    display: inline-block;
}

/* Improvement Actions Table */
.improvement-actions {
    margin: 2rem 0;
}

.improvement-actions table {
    width: 100%;
    border-collapse: collapse;
}

.improvement-actions th,
.improvement-actions td {
    padding: 1rem;
    text-align: left;
    border: 1px solid var(--border-color);
}

.improvement-actions th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.improvement-actions tr:nth-child(even) {
    background: var(--light-background);
}

/* Troubleshooting Grid */
.troubleshooting-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.issue-card {
    background: var(--light-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.issue-card h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #dc2626;
}

.issue-card ul,
.issue-card ol {
    margin-left: 1rem;
}

/* Emergency Contacts */
.emergency-contacts {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.emergency-contacts h4 {
    color: #dc2626;
    margin-top: 0;
    margin-bottom: 1rem;
}

/* Enhancement Timeline */
.enhancement-timeline {
    margin: 2rem 0;
}

.timeline-item {
    background: var(--light-background);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 0 8px 8px 0;
}

.timeline-item h4 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 1rem;
}

/* ROI Projection */
.roi-projection {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 1px solid #86efac;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.roi-projection h3 {
    color: #15803d;
    margin-top: 0;
    margin-bottom: 1rem;
}

/* Next Steps CTA */
.next-steps-cta {
    background: linear-gradient(135deg, var(--primary-color), #0891b2);
    color: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin: 3rem 0;
}

.next-steps-cta h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: white;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.primary-btn,
.secondary-btn {
    padding: 1rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-block;
}

.primary-btn {
    background: var(--secondary-color);
    color: white;
}

.primary-btn:hover {
    background: #ea580c;
    transform: translateY(-2px);
}

.secondary-btn {
    background: white;
    color: var(--primary-color);
    border: 2px solid white;
}

.secondary-btn:hover {
    background: transparent;
    color: white;
}

.cta-benefits {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 1rem;
}

/* Related Articles */
.related-articles {
    margin: 4rem 0 2rem 0;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.related-articles h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.related-card {
    background: var(--light-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform 0.2s ease;
}

.related-card:hover {
    transform: translateY(-2px);
}

.related-card h4 {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.related-card h4 a {
    color: var(--primary-color);
    text-decoration: none;
}

.related-card h4 a:hover {
    text-decoration: underline;
}

.related-card p {
    color: var(--light-text);
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #0891b2;
    transform: translateY(-2px);
}

/* Mobile Styles */
@media (max-width: 768px) {
    .article-container {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 2rem;
    }
    
    .table-of-contents {
        position: static;
        order: -1;
        margin-bottom: 2rem;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    nav {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .platform-grid,
    .testing-grid,
    .metrics-grid,
    .troubleshooting-grid {
        grid-template-columns: 1fr;
    }
    
    .color-examples {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .primary-btn,
    .secondary-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .article-content h2::before {
        display: none;
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}

/* Print Styles */
@media print {
    .table-of-contents,
    .back-to-top,
    header {
        display: none;
    }
    
    .article-container {
        grid-template-columns: 1fr;
        max-width: none;
    }
    
    .article-content {
        max-width: none;
    }
}