/* Common CSS for TietAI Healthcare Integration Platform Documentation */

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

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.7;
    color: #1a202c;
    background-color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.page-header {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 300;
}

.page-header p {
    font-size: 1.2em;
    opacity: 0.9;
}

.breadcrumb {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.breadcrumb a {
    color: #3498db;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.status-banner {
    background: #27ae60;
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: center;
}

.status-banner h2 {
    margin-bottom: 10px;
}

.content-section {
    background: white;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.content-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.content-section h3 {
    color: #2c3e50;
    margin: 25px 0 15px 0;
}

.content-section h4 {
    color: #34495e;
    margin: 20px 0 10px 0;
}

.content-section p {
    margin-bottom: 15px;
    line-height: 1.7;
}

.content-section ul,
.content-section ol {
    margin: 15px 0 15px 30px;
}

.content-section li {
    margin-bottom: 8px;
}

.content-section a {
    color: #3498db;
    text-decoration: none;
}

.content-section a:hover {
    text-decoration: underline;
}

.code-block {
    background: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    font-family: 'Courier New', Courier, monospace;
    overflow-x: auto;
    margin: 15px 0;
    font-size: 14px;
    white-space: pre-wrap;
    line-height: 1.4;
}

.endpoint-box {
    background: #2c3e50;
    color: white;
    padding: 15px;
    border-radius: 5px;
    font-family: 'Courier New', Courier, monospace;
    margin: 10px 0;
    font-size: 14px;
    white-space: pre-wrap;
    line-height: 1.4;
}

code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    color: #d73502;
}

pre {
    background: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    font-family: 'Courier New', Courier, monospace;
    overflow-x: auto;
    margin: 15px 0;
    font-size: 14px;
    white-space: pre-wrap;
    line-height: 1.4;
}

.info-box {
    background: #e8f4fd;
    border-left: 4px solid #3498db;
    padding: 15px;
    margin: 20px 0;
    border-radius: 0 5px 5px 0;
}

.warning-box {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin: 20px 0;
    border-radius: 0 5px 5px 0;
}

.success-box {
    background: #d4edda;
    border-left: 4px solid #28a745;
    padding: 15px;
    margin: 20px 0;
    border-radius: 0 5px 5px 0;
}

.error-box {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
    padding: 15px;
    margin: 20px 0;
    border-radius: 0 5px 5px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

table tr:hover {
    background: #f8f9fa;
}

.button {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 12px 24px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.button:hover {
    background: #2980b9;
    color: white;
}

.button-secondary {
    background: #95a5a6;
}

.button-secondary:hover {
    background: #7f8c8d;
}

.button-success {
    background: #27ae60;
}

.button-success:hover {
    background: #229954;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .page-header h1 {
        font-size: 2em;
    }

    .container {
        padding: 10px;
    }
}

footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 60px;
}

footer p {
    margin-bottom: 5px;
}

/* Navigation Styles */
.nav-section {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.nav-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.nav-link {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.nav-link:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.nav-link a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
}

/* Active navigation link style */
.navbar nav a.active {
    color: #2563eb;
    background-color: #f1f5f9;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        max-width: 100%;
        padding: 15px;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 40px 0;
    }

    .page-header h1 {
        font-size: 2em;
    }

    .content-section {
        padding: 20px;
    }

    .code-block,
    .endpoint-box {
        font-size: 12px;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8em;
    }

    .content-section {
        padding: 15px;
    }
}

/* Tutorial-specific styles */
.docs-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background: #ffffff;
}

.docs-container {
    display: grid;
    grid-template-columns: 980px 1fr;
    gap: 0.75rem;
}

.docs-nav {
    position: sticky;
    top: 100px;
    height: fit-content;
    background: #f8fafc;
    padding: 0.4rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.docs-nav h3 {
    color: #1a202c;
    margin-bottom: 0.3rem;
    font-size: 0.7rem;
    font-weight: 600;
}

.docs-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.docs-nav li {
    margin-bottom: 0.25rem;
}

.docs-nav a {
    color: #4a5568;
    text-decoration: none;
    font-size: 0.75rem;
    padding: 0.1rem 0;
    display: block;
    transition: color 0.2s ease;
}

.docs-nav a:hover {
    color: #2563eb;
}

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

.tutorial-content h1 {
    color: #1a202c;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.tutorial-content h2 {
    color: #1a202c;
    font-size: 1.875rem;
    font-weight: 600;
    margin: 3rem 0 1.5rem 0;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.tutorial-content h3 {
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
}

.tutorial-content h4 {
    color: #4a5568;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.5rem 0 1rem 0;
}

.tutorial-content p {
    color: #4a5568;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.tutorial-content ul,
.tutorial-content ol {
    color: #4a5568;
    margin: 1rem 0 1.5rem 2rem;
}

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

.tutorial-content strong {
    color: #2d3748;
    font-weight: 600;
}

.best-practices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.practice-item {
    background: #f7fafc;
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.practice-item h3 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.practice-item ul {
    margin-left: 1rem;
}

.next-steps {
    background: #f0fff4;
    padding: 2rem;
    border-radius: 0.5rem;
    margin: 3rem 0;
    border: 1px solid #9ae6b4;
}

.tutorial-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.tutorial-link {
    background: #2563eb;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tutorial-link:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

/* X12-specific styles */
.transaction-table {
    margin: 2rem 0;
    overflow-x: auto;
}

.transaction-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.transaction-table th,
.transaction-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.transaction-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #2d3748;
}

.status-implemented {
    background: #d1fae5;
    color: #065f46;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.validation-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.validation-item {
    background: #f7fafc;
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.validation-item h4 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.troubleshooting-items {
    display: grid;
    gap: 1.5rem;
    margin: 2rem 0;
}

.troubleshooting-item {
    background: #f7fafc;
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.troubleshooting-item h4 {
    color: #e53e3e;
    margin-bottom: 1rem;
}

.support-section {
    background: #f0fff4;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin: 2rem 0;
    border: 1px solid #9ae6b4;
}

/* Custom integration specific styles */
.platform-features {
    margin: 3rem 0;
}

.feature-item {
    background: #f7fafc;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
    border: 1px solid #e2e8f0;
}

.feature-item h4 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.resources-section {
    background: #fafafa;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin: 2rem 0;
}

.resources-section ul {
    margin-left: 1rem;
}

/* Tutorial responsive design */
@media (max-width: 1200px) {
    .docs-container {
        grid-template-columns: 100px 1fr;
        gap: 0.75rem;
    }

    .docs-nav {
        padding: 0.5rem;
    }
}

@media (max-width: 1024px) {
    .docs-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .docs-nav {
        position: static;
        order: -1;
        margin-bottom: 1rem;
        padding: 0.5rem;
    }

    .docs-nav ul {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .docs-nav li {
        margin-bottom: 0;
    }

    .docs-nav a {
        background: #e2e8f0;
        padding: 0.25rem 0.5rem;
        border-radius: 0.25rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 768px) {
    .docs-content {
        padding: 1rem;
    }

    .tutorial-content h1 {
        font-size: 2rem;
    }

    .tutorial-content h2 {
        font-size: 1.5rem;
    }

    .best-practices-grid,
    .validation-categories {
        grid-template-columns: 1fr;
    }

    .tutorial-links {
        flex-direction: column;
    }
}