/*
Theme Name: AI Modern
Theme URI: https://eok.com
Description: A modern, minimalist full-page theme for AI comparison tool
Version: 1.0.0
Author: AI Comparison Team
Author URI: https://eok.com
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ai-modern
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: #fff;
    color: #0d0d0d;
}

/* Remove all WordPress admin bar spacing */
html {
    margin-top: 0 !important;
}

#wpadminbar {
    display: none !important;
}

/* Full page application container */
#page {
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
}

/* Remove default WordPress content padding */
.site-content {
    flex: 1;
    min-height: 0;
}

/* Ensure plugin container takes full space */
.entry-content {
    height: 100%;
}

/* Hide WordPress page title and meta */
.entry-header,
.entry-footer,
.post-navigation,
.site-footer,
.site-title,
.site-description,
article header,
article footer,
.page-header,
.entry-title {
    display: none !important;
}

/* Make sure the AI comparison container is full height */
.ai-modern-container {
    height: 100% !important;
}

/* ========================================
   DOCUMENTATION PAGE STYLES
   ======================================== */

/* Override hiding rules for documentation pages */
.page-template-page-documentation .entry-header,
.page-template-page-documentation .entry-title,
.page-template-page-documentation article header {
    display: block !important;
}

.page-template-page-documentation #page {
    height: 100vh;
}

.page-template-page-documentation .site-content {
    flex: 1;
    min-height: 0;
}

.page-template-page-documentation .entry-content {
    height: 100%;
}

.page-template-page-documentation .new-conversation-btn {
    text-decoration: none;
}

/* Documentation Main Area */
.documentation-main {
    background: linear-gradient(to bottom, #fafafa 0%, #ffffff 100%);
}

/* Documentation Wrapper */
.documentation-wrapper {
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 40px 20px 60px;
}

/* Documentation Container */
.documentation-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    padding: 60px 80px;
}

/* Documentation Header */
.documentation-header {
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 2px solid #f0f0f0;
}

.documentation-title {
    font-size: 42px;
    font-weight: 700;
    color: #0d0d0d;
    margin: 0 0 16px 0;
    line-height: 1.2;
}

.documentation-excerpt {
    font-size: 18px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* Documentation Body */
.documentation-body {
    font-size: 16px;
    line-height: 1.8;
    color: #2d2d2d;
}

/* Headings */
.documentation-body h1 {
    font-size: 36px;
    font-weight: 700;
    color: #0d0d0d;
    margin: 48px 0 24px 0;
    line-height: 1.3;
    border-bottom: 2px solid #e5e5e5;
    padding-bottom: 12px;
}

.documentation-body h2 {
    font-size: 28px;
    font-weight: 600;
    color: #0d0d0d;
    margin: 40px 0 20px 0;
    line-height: 1.3;
}

.documentation-body h3 {
    font-size: 22px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 32px 0 16px 0;
    line-height: 1.4;
}

.documentation-body h4 {
    font-size: 18px;
    font-weight: 600;
    color: #2d2d2d;
    margin: 24px 0 12px 0;
    line-height: 1.4;
}

/* Paragraphs */
.documentation-body p {
    margin: 0 0 20px 0;
    line-height: 1.8;
}

/* Links */
.documentation-body a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s;
    border-bottom: 1px solid transparent;
}

.documentation-body a:hover {
    color: #0052a3;
    border-bottom-color: #0052a3;
}

/* Lists */
.documentation-body ul,
.documentation-body ol {
    margin: 0 0 24px 0;
    padding-left: 28px;
}

.documentation-body ul li,
.documentation-body ol li {
    margin-bottom: 12px;
    line-height: 1.8;
}

.documentation-body ul {
    list-style-type: disc;
}

.documentation-body ol {
    list-style-type: decimal;
}

.documentation-body ul ul,
.documentation-body ol ul,
.documentation-body ul ol,
.documentation-body ol ol {
    margin: 8px 0 8px 0;
}

/* Strong/Bold */
.documentation-body strong {
    font-weight: 600;
    color: #0d0d0d;
}

/* Emphasis/Italic */
.documentation-body em {
    font-style: italic;
    color: #404040;
}

/* Code Blocks - Inline */
.documentation-body code {
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 14px;
    color: #d63384;
    border: 1px solid #e5e5e5;
}

/* Code Blocks - Tables (used as code blocks) */
.documentation-body .wp-block-table {
    margin: 24px 0;
    width: 100%;
    overflow: hidden;
}

.documentation-body .wp-block-table table {
    width: 100%;
    border-collapse: collapse;
    background: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
}

.documentation-body .wp-block-table table tbody tr td {
    padding: 20px 24px;
    color: #d4d4d4;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-wrap;
    word-wrap: break-word;
    border: none;
}

/* Separators */
.documentation-body hr,
.documentation-body .wp-block-separator {
    margin: 40px 0;
    border: none;
    border-top: 1px solid #e5e5e5;
    height: 1px;
    background: transparent;
}

/* Embeds (for URLs) */
.documentation-body .wp-block-embed {
    margin: 20px 0;
    padding: 16px 20px;
    background: #f8f9fa;
    border-left: 4px solid #0066cc;
    border-radius: 4px;
}

.documentation-body .wp-block-embed__wrapper {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 14px;
    color: #0066cc;
    word-break: break-all;
}

/* Tables (for regular data tables) */
.documentation-body table:not(.wp-block-table table) {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 15px;
}

.documentation-body table:not(.wp-block-table table) th {
    background: #f8f9fa;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    border: 1px solid #e5e5e5;
    color: #0d0d0d;
}

.documentation-body table:not(.wp-block-table table) td {
    padding: 12px 16px;
    border: 1px solid #e5e5e5;
    color: #2d2d2d;
}

.documentation-body table:not(.wp-block-table table) tr:nth-child(even) {
    background: #fafafa;
}

/* Documentation Footer */
.documentation-footer {
    margin-top: 60px;
    padding-top: 24px;
    border-top: 1px solid #e5e5e5;
    text-align: right;
}

.documentation-footer .edit-link a {
    font-size: 14px;
    color: #666;
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    transition: all 0.2s;
    display: inline-block;
}

.documentation-footer .edit-link a:hover {
    background: #f5f5f5;
    border-color: #d5d5d5;
    color: #0d0d0d;
}

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

    .documentation-title {
        font-size: 36px;
    }

    .documentation-body h1 {
        font-size: 32px;
    }

    .documentation-body h2 {
        font-size: 24px;
    }

    .documentation-body h3 {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .documentation-wrapper {
        padding: 40px 16px 60px;
    }

    .documentation-container {
        padding: 32px 24px;
        border-radius: 8px;
    }

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

    .documentation-excerpt {
        font-size: 16px;
    }

    .documentation-body {
        font-size: 15px;
    }

    .documentation-body h1 {
        font-size: 26px;
        margin: 32px 0 20px 0;
    }

    .documentation-body h2 {
        font-size: 22px;
        margin: 28px 0 16px 0;
    }

    .documentation-body h3 {
        font-size: 18px;
        margin: 24px 0 12px 0;
    }

    .documentation-body h4 {
        font-size: 16px;
    }

    .documentation-body .wp-block-table table tbody tr td {
        padding: 16px;
        font-size: 13px;
    }

    .documentation-body ul,
    .documentation-body ol {
        padding-left: 24px;
    }
}

@media (max-width: 480px) {
    .documentation-wrapper {
        padding: 20px 12px 40px;
    }

    .documentation-container {
        padding: 24px 20px;
    }

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

    .documentation-body .wp-block-table table tbody tr td {
        padding: 12px;
        font-size: 12px;
    }
}

/* Documentation Navigation in Sidebar */
.docs-sidebar-nav {
    text-align: left !important;
}

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

.docs-nav-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    color: #0d0d0d;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.docs-nav-item:hover {
    background: #e5e5e5;
}

.docs-nav-item.active {
    background: #e5e5e5;
    font-weight: 500;
}

.docs-nav-item svg {
    flex-shrink: 0;
}

.docs-nav-subitems {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 4px;
    margin-left: 28px;
}

.docs-nav-subitem {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    color: #6b7280;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
}

.docs-nav-subitem:hover {
    background: #f3f4f6;
    color: #0d0d0d;
}

/* Mobile Adjustments for Documentation */
@media (max-width: 1024px) {
    .documentation-main {
        padding-top: 60px; /* Space for mobile header */
    }

    .documentation-wrapper {
        padding: 20px 16px 40px;
    }

    .documentation-container {
        padding: 32px 24px;
    }
}
