/* Components Documentation Page Styles */
/* Minimal color scheme with clean design */

/* Modern fonts and base styles */
.docs-page {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    background-color: #f8fafc;
    min-height: 100vh;
}

/* Container Layout */
.docs-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px 24px 24px;
    display: flex;
    gap: 32px;
    min-height: calc(100vh - 80px);
}

/* Left Sidebar Navigation */
.docs-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 24px;
    height: fit-content;
    position: sticky;
    top: 120px;
    border: 1px solid #e2e8f0;
}

.docs-sidebar__title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.docs-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.docs-nav__item {
    margin-bottom: 8px;
}

.docs-nav__link {
    display: block;
    padding: 12px 16px;
    color: #64748b;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.docs-nav__link:hover {
    background-color: #eff6ff;
    color: #2563eb;
    border-left-color: #3b82f6;
}

.docs-nav__link.active {
    background-color: #dbeafe;
    color: #1d4ed8;
    border-left-color: #2563eb;
    font-weight: 600;
}

/* Main Content Area */
.docs-main {
    flex: 1;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.docs-content {
    padding: 40px 48px;
}

/* Hero Section - Subtle colors */
.docs-hero {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: white;
    padding: 48px;
    margin: -40px -48px 40px -48px;
}

.docs-hero__title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.docs-hero__subtitle {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 0;
    font-weight: 400;
}

/* Section Styles */
.docs-section {
    margin-bottom: 48px;
}

.docs-section__header {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.docs-section__icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    flex-shrink: 0;
}

.docs-section__icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.docs-section__title {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.docs-section__description {
    font-size: 16px;
    color: #64748b;
    margin-bottom: 32px;
    line-height: 1.7;
}

/* Components Grid */
.components-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.component-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
    height: 100%;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.component-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.15);
    border-color: #a5b4fc;
    text-decoration: none;
    color: inherit;
}

.component-card__header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
}

.component-card__icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    flex-shrink: 0;
}

.component-card__icon svg {
    width: 24px;
    height: 24px;
    color: #2563eb;
}

.component-card__title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    line-height: 1.3;
}

.component-card__description {
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.component-card__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.component-card__tag {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #bfdbfe;
}

/* Component Card Actions */
.component-card__actions {
    margin: 16px 0;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.download-btn:hover {
    background: linear-gradient(135deg, #4338ca, #4f46e5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    color: white;
    text-decoration: none;
}

.download-btn:active {
    transform: translateY(0);
}

.download-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Quick Start Steps */
.quick-start-steps {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 32px;
}

.step-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.step-item:hover {
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
    border-color: #a5b4fc;
}

.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.step-description {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
}

/* Mobile Navigation Toggle */
.mobile-nav-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    color: #64748b;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-nav-toggle svg {
    width: 20px;
    height: 20px;
}

/* CSV Template Information */
.csv-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.csv-info-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
}

.csv-info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.1);
    border-color: #a5b4fc;
}

.csv-info-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.csv-field-list,
.csv-steps-list {
    margin: 0;
    padding-left: 20px;
    color: #64748b;
}

.csv-field-list li,
.csv-steps-list li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.csv-field-list strong {
    color: #1e293b;
    font-weight: 600;
}

.csv-tip {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 12px;
    margin-top: 16px;
    font-size: 14px;
    color: #1d4ed8;
}

/* Code Blocks for Upgrade Commands */
.copy-btn-wrapper {
    background: none;
    border: none;
    padding: 0;
    width: 100%;
    cursor: pointer;
}

.code-block {
    position: relative;
    background: #1e293b;
    border-radius: 8px;
    margin: 16px 0;
    overflow: hidden;
}

.code-block pre {
    margin: 0;
    padding: 16px;
    overflow-x: auto;
    background: transparent;
}

.code-block code {
    color: #e2e8f0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
    background: transparent;
}

.copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 8px;
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.copy-btn svg {
    width: 16px;
    height: 16px;
    display: block;
}

/* Enhanced component card actions for upgrade page */
.component-card .component-card__actions {
    margin: 16px 0 8px 0;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

/* Command line styling */
.code-block pre code::before {
    content: "$ ";
    color: #10b981;
    font-weight: bold;
}

.code-block pre code {
    display: block;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Improved Upgrade Page Layout */
.docs-container-upgrade {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px 24px 24px;
    display: flex;
    gap: 40px;
    min-height: calc(100vh - 80px);
}

.docs-main-upgrade {
    flex: 1;
    max-width: calc(100% - 320px);
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    padding: 32px;
    height: fit-content;
}

/* Improved component grid for upgrade page */
.docs-main-upgrade .components-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 32px;
}

.docs-main-upgrade .component-card {
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.docs-main-upgrade .component-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Enhanced code block for upgrade page */
.docs-main-upgrade .code-block {
    position: relative;
    background: #0f172a;
    border-radius: 12px;
    margin: 20px 0;
    overflow: hidden;
    border: 1px solid #334155;
}

.docs-main-upgrade .code-block pre {
    margin: 0;
    padding: 24px;
    overflow-x: auto;
    background: transparent;
    font-size: 15px;
    line-height: 1.6;
}

.docs-main-upgrade .code-block code {
    color: #f1f5f9;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-weight: 500;
}

.docs-main-upgrade .copy-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(59, 130, 246, 0.9);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    padding: 10px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
    z-index: 10;
}

.docs-main-upgrade .copy-btn:hover {
    background: rgba(37, 99, 235, 1);
    border-color: rgba(37, 99, 235, 0.5);
    transform: scale(1.05);
}

.docs-main-upgrade .copy-btn svg {
    width: 16px;
    height: 16px;
    display: block;
}

/* Enhanced component card styling for upgrade */
.docs-main-upgrade .component-card__header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.docs-main-upgrade .component-card__icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.docs-main-upgrade .component-card__icon svg {
    width: 24px;
    height: 24px;
}

.docs-main-upgrade .component-card__title {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.docs-main-upgrade .component-card__description {
    font-size: 16px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 24px;
}

.docs-main-upgrade .component-card__footer {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.docs-main-upgrade .component-card__tag {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1d4ed8;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #93c5fd;
}

/* Responsive improvements */
@media (max-width: 1024px) {
    .docs-container-upgrade {
        flex-direction: column;
        gap: 24px;
    }
    
    .docs-main-upgrade {
        max-width: 100%;
        padding: 24px;
    }
    
    .docs-main-upgrade .component-card {
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .docs-container-upgrade {
        padding: 16px;
    }
    
    .docs-main-upgrade {
        padding: 16px;
    }
    
    .docs-main-upgrade .component-card {
        padding: 20px;
    }
    
    .docs-main-upgrade .code-block pre {
        padding: 16px;
        font-size: 14px;
    }
    
    .docs-main-upgrade .copy-btn {
        top: 12px;
        right: 12px;
        padding: 8px;
    }
}

/* Focus styles for accessibility */
.component-card:focus,
.docs-nav__link:focus,
.mobile-nav-toggle:focus {
    outline: 2px solid #4f46e5;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .docs-sidebar,
    .mobile-nav-toggle {
        display: none;
    }
    
    .docs-main {
        box-shadow: none;
        border: none;
    }
    
    .docs-container {
        max-width: none;
        padding: 0;
    }
}
