/* Global Styles for UploadsPro Documentation */

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

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #d1d1d1 !important;
    background-color: #1a1a1a !important;
    font-size: 15px;
}

/* Reset any conflicting styles */
html, body {
    margin: 0 !important;
    padding: 0 !important;
}

/* Ensure header section is properly styled */
.header-section {
    background-color: #1a1a1a !important;
    color: white !important;
    padding: 0 !important;
}

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

/* Header Section */
.header-section {
    background-color: #1a1a1a;
    color: white;
    padding: 0;
}

.brand-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #333;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-name {
    font-weight: bold;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.language-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
    position: relative;
}

.language-toggle:hover {
    background-color: #333;
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 150px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.language-toggle:hover .language-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-dropdown a {
    display: block;
    padding: 0.5rem 1rem;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.language-dropdown a:hover {
    background-color: #333;
}

.page-title {
    padding: 2rem;
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
}

.page-title h1 {
    font-size: 2.5rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.search-section {
    padding: 0 2rem 2rem;
}

.search-container {
    position: relative;
    max-width: 600px;
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    background-color: #333;
    color: white;
    outline: none;
}

.search-input::placeholder {
    color: #999;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 1.2rem;
}

/* Main Content */
.main-content {
    background-color: #f5f5f5;
    min-height: 100vh;
    padding: 2rem;
}

.articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.article-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    border: 1px solid #e0e0e0;
}

.article-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.article-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.article-content {
    flex: 1;
}

.article-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 0.5rem 0;
}

.article-content p {
    color: #666;
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #999;
}

.author-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.author-name {
    font-weight: 500;
}

.article-count {
    color: #999;
}

.support-card {
    border: 2px solid #007bff;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
}

.support-card h3,
.support-card p {
    color: white;
}

.support-card .article-meta {
    color: rgba(255, 255, 255, 0.8);
}

/* Footer */
.site-footer {
    background-color: #1a1a1a;
    color: white;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #333;
}

.footer-brand {
    display: flex;
    align-items: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: bold;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: #999;
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: white;
}

.footer-social {
    display: flex;
    gap: 1rem;
    font-size: 1.2rem;
}

/* Typography */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
    line-height: 1.2;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #111827;
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #374151;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

p {
    margin-bottom: 1rem;
    color: #374151;
    line-height: 1.7;
}

/* Lists */
ul, ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

ul li, ol li {
    margin-bottom: 0.5rem;
    color: #374151;
    line-height: 1.6;
}

ul li {
    list-style-type: disc;
}

ol li {
    list-style-type: decimal;
}

/* Nested lists */
ul ul, ol ol, ul ol, ol ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Links */
a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

a:hover {
    text-decoration: underline;
}

/* Strong text */
strong {
    font-weight: 600;
    color: #111827;
}

/* Code blocks */
pre {
    background-color: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    overflow-x: auto;
    font-size: 0.9rem;
}

code {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    background-color: #f3f4f6;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}

pre code {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
}

/* Sections */
section {
    margin-bottom: 2rem;
}

/* Article container */
article {
    background-color: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

/* Header styling for tutorial pages */
.doc-header {
    background: white;
    border-bottom: 1px solid #e0e0e0;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.doc-header h1 {
    color: #333;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.doc-header p {
    color: #666;
    margin: 0;
    font-size: 1rem;
}

/* Tutorial page specific styles */
.tutorial-header {
    background: #1a1a1a !important;
    color: white !important;
    padding: 1rem 0;
    border-bottom: 1px solid #333;
}

.tutorial-header > div {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.tutorial-brand-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333;
}

.tutorial-breadcrumb {
    font-size: 0.875rem;
    color: #ccc !important;
    margin-bottom: 1rem;
}

.tutorial-breadcrumb a {
    color: #007bff !important;
    text-decoration: none;
}

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

.tutorial-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.tutorial-title h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 600;
    color: white !important;
}

.tutorial-description {
    color: #ccc !important;
    font-size: 1.1rem;
    margin: 0;
}

.tutorial-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #ccc !important;
}

.tutorial-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tutorial-author img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.tutorial-body {
    background-color: #f5f5f5;
    min-height: calc(100vh - 200px);
    padding: 2rem 2rem;
}

.tutorial-content {
    background: white;
    padding: 2rem;
    margin: 0 auto;
    min-height: 70vh;
    max-width: 800px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Navigation for index page - now updated to articles grid style */
.nav-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 2rem 0;
}

.nav-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.nav-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.nav-card h3 {
    color: #333;
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.nav-card p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Legacy support for older styles - keeping for tutorial pages */
.language-selector {
    text-align: center;
    margin: 2rem 0;
}

.language-selector a {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    background: white;
    color: #007bff;
    border: 2px solid #007bff;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.language-selector a:hover,
.language-selector a.current {
    background: #007bff;
    color: white;
}

/* Quick start section */
.quick-start {
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.quick-start h2 {
    color: #0c4a6e;
    margin-top: 0;
}

/* Support section */
.support-section {
    background: #fef2f2;
    border: 1px solid #f87171;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: center;
}

.support-section h2 {
    color: #dc2626;
    margin-top: 0;
}

.support-links {
    margin-top: 1rem;
}

.support-links a {
    display: inline-block;
    background: #dc2626;
    color: white;
    padding: 0.5rem 1rem;
    margin: 0 0.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.support-links a:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}

/* Breadcrumb navigation */
.breadcrumb {
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #6b7280;
}

.breadcrumb span {
    color: #9ca3af;
    margin: 0 0.5rem;
}

/* Back to index link */
.back-link {
    display: inline-block;
    background: #f3f4f6;
    color: #374151;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.back-link:hover {
    background: #e5e7eb;
    text-decoration: none;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

th, td {
    border: 1px solid #e5e7eb;
    padding: 0.75rem;
    text-align: left;
}

th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #374151;
}

/* Blockquotes */
blockquote {
    border-left: 4px solid #2563eb;
    background-color: #f8fafc;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 8px 8px 0;
}

blockquote p {
    margin-bottom: 0;
    color: #475569;
    font-style: italic;
}

/* Note/Warning boxes */
.note {
    background-color: #eff6ff;
    border: 1px solid #2563eb;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.warning {
    background-color: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.success {
    background-color: #ecfdf5;
    border: 1px solid #10b981;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

/* Legacy footer for tutorial pages */
footer {
    color: #6b7280;
    font-size: 0.875rem;
    text-align: center;
    margin-top: 3rem;
    padding: 2rem 0;
    border-top: 1px solid #e5e7eb;
    background: white;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .brand-header {
        padding: 1rem;
    }
    
    .page-title {
        padding: 1rem;
    }
    
    .page-title h1 {
        font-size: 2rem;
    }
    
    .search-section {
        padding: 0 1rem 1rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .article-card {
        flex-direction: column;
        text-align: center;
    }
    
    .article-icon {
        font-size: 3rem;
    }
    
    .site-footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-links {
        order: 2;
    }
    
    .footer-social {
        order: 3;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    article {
        padding: 1.5rem;
    }
    
    .tutorial-header {
        padding: 1rem;
    }
    
    .tutorial-title {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .tutorial-content {
        padding: 1rem;
    }
    
    .nav-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .language-selector a {
        display: block;
        margin: 0.25rem 0;
    }
}

/* Info/Warning/Success boxes for tutorials */
.info-box {
    background-color: #ffefef;
    border-left: 4px solid #ff0000;
    border-radius: 8px;
    padding: 1rem 1rem 1rem 1.5rem;
    margin: 1.5rem 0;
    color: #3b3b3b;
}

.info-box strong {
    color: #1e40af;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.info-box ul {
    margin: 0.5rem 0 0 0;
    padding-left: 1.5rem;
}

.info-box li {
    margin: 0.25rem 0;
    color: #1e3a8a;
}

.warning-box {
    background-color: #fef3c7;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    padding: 1rem 1rem 1rem 1.5rem;
    margin: 1.5rem 0;
    color: #3b3b3b;
}

.warning-box strong {
    color: #b45309;
    display: block;
    margin-bottom: 0.5rem;
}

.success-box {
    background-color: #ecfdf5;
    border-left: 4px solid #10b981;
    border-radius: 8px;
    padding: 1rem 1rem 1rem 1.5rem;
    margin: 1.5rem 0;
    color: #3b3b3b;
}

.success-box strong {
    color: #047857;
    display: inline-block;
    margin-bottom: 0.5rem;
}

/* Code block styling */
.code-block {
    background-color: #1e293b;
    border-radius: 8px;
    padding: 0;
    margin: 1.5rem 0;
    overflow: hidden;
}

.code-block pre {
    margin: 0;
    padding: 1.25rem;
    overflow-x: auto;
    background-color: transparent;
}

.code-block code {
    color: #e2e8f0;
    background-color: transparent;
    padding: 0;
    font-size: 0.875rem;
    line-height: 1.6;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

/* Inline code */
.tutorial-content code:not(.code-block code) {
    background-color: #f1f5f9;
    color: #e11d48;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.875em;
    font-weight: 500;
}

.screenshot-placeholder{
    background: #f5f5f5; padding: 5px; text-align: center; border: 2px dashed #ccc; border-radius: 8px; margin: 20px 0;
}

/* Print styles */
@media print {
    body {
        background-color: white;
        color: black;
    }

    .doc-header {
        background: none;
        color: black;
        box-shadow: none;
    }

    .nav-card, .quick-start, .support-section {
        box-shadow: none;
        border: 1px solid #ccc;
    }

    a {
        color: black;
        text-decoration: underline;
    }

    .code-block {
        background-color: #f5f5f5;
        border: 1px solid #ccc;
    }

    .code-block code {
        color: #000;
    }
}