/**
 * OptiKit Roadmap & Docs - Frontend Styles
 * Version: 1.0.0
 */

/* ===== Variables - OptiKit Brand Colors ===== */
:root {
    /* OptiKit Brand Colors */
    --okrd-primary: #3B82F6;
    --okrd-primary-dark: #2563EB;
    --okrd-primary-light: #60A5FA;
    --okrd-secondary: #8B5CF6;
    --okrd-secondary-dark: #7C3AED;
    --okrd-accent: #EC4899;
    
    /* Status Colors */
    --okrd-success: #10B981;
    --okrd-warning: #F59E0B;
    --okrd-danger: #EF4444;
    --okrd-info: #3B82F6;
    
    /* Neutrals */
    --okrd-light: #F8FAFC;
    --okrd-light-gray: #F1F5F9;
    --okrd-gray: #94A3B8;
    --okrd-dark-gray: #475569;
    --okrd-dark: #1E293B;
    --okrd-border: #E2E8F0;
    --okrd-border-hover: #CBD5E1;
    
    /* Design Tokens */
    --okrd-radius: 12px;
    --okrd-radius-sm: 8px;
    --okrd-radius-lg: 16px;
    --okrd-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --okrd-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --okrd-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --okrd-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --okrd-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Typography */
    --okrd-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --okrd-font-heading: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ===== Roadmap Styles ===== */
.okrd-roadmap-wrapper {
    margin: 40px 0;
    font-family: var(--okrd-font-body);
    line-height: 1.6;
}

.okrd-roadmap-header {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 32px;
    background: linear-gradient(135deg, var(--okrd-light) 0%, #ffffff 100%);
    border-radius: var(--okrd-radius-lg);
    border: 1px solid var(--okrd-border);
    border-left: 5px solid var(--okrd-primary);
    margin-bottom: 32px;
    box-shadow: var(--okrd-shadow-md);
    transition: var(--okrd-transition);
}

.okrd-roadmap-header:hover {
    box-shadow: var(--okrd-shadow-lg);
    transform: translateY(-2px);
}

.okrd-product-icon {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--okrd-primary) 0%, var(--okrd-secondary) 100%);
    border-radius: var(--okrd-radius);
    padding: 12px;
    box-shadow: var(--okrd-shadow);
}

.okrd-product-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.okrd-product-info {
    flex: 1;
}

.okrd-product-name {
    font-size: 28px;
    font-weight: 700;
    font-family: var(--okrd-font-heading);
    margin: 0 0 8px 0;
    color: var(--okrd-dark);
    letter-spacing: -0.02em;
}

.okrd-product-description {
    margin: 0;
    color: var(--okrd-dark-gray);
    font-size: 15px;
    line-height: 1.6;
}

.okrd-search-box {
    margin-left: auto;
    position: relative;
    flex-shrink: 0;
}

.okrd-search-input {
    padding: 12px 48px 12px 20px;
    border: 2px solid var(--okrd-border);
    border-radius: var(--okrd-radius);
    width: 320px;
    font-size: 15px;
    background: white;
    transition: var(--okrd-transition);
    font-family: var(--okrd-font-body);
}

.okrd-search-input:focus {
    outline: none;
    border-color: var(--okrd-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.okrd-search-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--okrd-gray);
    font-size: 18px;
    padding: 8px;
    transition: var(--okrd-transition);
}

.okrd-search-btn:hover {
    color: var(--okrd-primary);
}

/* ===== Filters ===== */
.okrd-filters {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
    padding: 20px 24px;
    background: white;
    border-radius: var(--okrd-radius);
    margin-bottom: 24px;
    box-shadow: var(--okrd-shadow);
    border: 1px solid var(--okrd-border);
}

.okrd-filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.okrd-filter-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--okrd-dark-gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.okrd-filter-select {
    padding: 8px 36px 8px 12px;
    border: 2px solid var(--okrd-border);
    border-radius: var(--okrd-radius-sm);
    font-size: 14px;
    background: white;
    color: var(--okrd-dark);
    cursor: pointer;
    transition: var(--okrd-transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23475569' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.okrd-filter-select:hover {
    border-color: var(--okrd-border-hover);
}

.okrd-filter-select:focus {
    outline: none;
    border-color: var(--okrd-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.okrd-clear-filters {
    margin-left: auto;
    padding: 8px 16px;
    background: transparent;
    border: 2px solid var(--okrd-border);
    border-radius: var(--okrd-radius-sm);
    color: var(--okrd-dark-gray);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--okrd-transition);
}

.okrd-clear-filters:hover {
    background: var(--okrd-light);
    border-color: var(--okrd-border-hover);
    color: var(--okrd-dark);
}

/* ===== View Switcher ===== */
.okrd-view-switcher {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    padding: 6px;
    background: var(--okrd-light-gray);
    border-radius: var(--okrd-radius);
    width: fit-content;
}

.okrd-view-btn {
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-radius: var(--okrd-radius-sm);
    color: var(--okrd-dark-gray);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--okrd-transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.okrd-view-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--okrd-primary);
}

.okrd-view-btn.active {
    background: white;
    color: var(--okrd-primary);
    box-shadow: var(--okrd-shadow);
}

.okrd-view-btn svg {
    width: 16px;
    height: 16px;
    font-weight: 500;
    color: var(--okrd-dark);
}

.okrd-filter-select {
    padding: 8px 12px;
    border: 1px solid var(--okrd-border);
    border-radius: 5px;
    font-size: 14px;
}

.okrd-filter-reset {
    margin-left: auto;
    padding: 8px 15px;
    background: var(--okrd-light);
    border: 1px solid var(--okrd-border);
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: var(--okrd-transition);
}

.okrd-filter-reset:hover {
    background: #e5e5e5;
}

/* ===== View Switcher ===== */
.okrd-view-switcher {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.okrd-view-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: #fff;
    border: 1px solid var(--okrd-border);
    border-radius: var(--okrd-radius);
    cursor: pointer;
    font-size: 14px;
    transition: var(--okrd-transition);
}

.okrd-view-btn svg {
    width: 20px;
    height: 20px;
}

.okrd-view-btn:hover {
    border-color: var(--okrd-primary);
    color: var(--okrd-primary);
}

.okrd-view-btn.active {
    background: var(--okrd-primary);
    color: #fff;
    border-color: var(--okrd-primary);
}

/* ===== Kanban View ===== */
.okrd-kanban-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.okrd-kanban-column {
    background: var(--okrd-light);
    border-radius: var(--okrd-radius);
    padding: 15px;
}

.okrd-kanban-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #fff;
    border-radius: var(--okrd-radius);
    border-top: 3px solid var(--okrd-primary);
    margin-bottom: 15px;
}

.okrd-kanban-column-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.okrd-feature-count {
    background: var(--okrd-primary);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.okrd-kanban-column-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* ===== Feature Cards ===== */
.okrd-feature-card {
    background: #fff;
    padding: 15px;
    border-radius: var(--okrd-radius);
    box-shadow: var(--okrd-shadow);
    transition: var(--okrd-transition);
    cursor: pointer;
}

.okrd-feature-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.okrd-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}

.okrd-feature-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.okrd-feature-title a {
    color: var(--okrd-dark);
    text-decoration: none;
}

.okrd-feature-title a:hover {
    color: var(--okrd-primary);
}

.okrd-feature-category {
    background: var(--okrd-light);
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 12px;
    color: #666;
}

.okrd-feature-excerpt {
    color: #666;
    font-size: 14px;
    margin: 10px 0;
    line-height: 1.5;
}

.okrd-card-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 10px 0;
}

.okrd-priority-badge {
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.okrd-priority-low { background: #A0AEC0; color: #fff; }
.okrd-priority-medium { background: #4299E1; color: #fff; }
.okrd-priority-high { background: #ED8936; color: #fff; }
.okrd-priority-critical { background: #F56565; color: #fff; }

.okrd-progress-mini {
    flex: 1;
    height: 6px;
    background: var(--okrd-light);
    border-radius: 3px;
    overflow: hidden;
}

.okrd-progress-fill {
    height: 100%;
    background: var(--okrd-success);
    transition: width 0.3s ease;
}

/* ===== Voting System ===== */
.okrd-voting-container {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--okrd-border);
}

.okrd-voting-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.okrd-vote-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid var(--okrd-border);
    border-radius: 5px;
    cursor: pointer;
    transition: var(--okrd-transition);
    font-size: 14px;
}

.okrd-vote-btn:hover {
    border-color: var(--okrd-primary);
    color: var(--okrd-primary);
}

.okrd-vote-btn.active {
    background: var(--okrd-primary);
    color: #fff;
    border-color: var(--okrd-primary);
}

.okrd-net-score {
    margin: 0 10px;
    font-weight: 600;
    font-size: 18px;
    color: var(--okrd-primary);
}

/* ===== List View ===== */
.okrd-features-table {
    width: 100%;
    background: #fff;
    border-radius: var(--okrd-radius);
    overflow: hidden;
    box-shadow: var(--okrd-shadow);
}

.okrd-features-table thead {
    background: var(--okrd-light);
}

.okrd-features-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--okrd-dark);
    border-bottom: 2px solid var(--okrd-border);
}

.okrd-features-table td {
    padding: 15px;
    border-bottom: 1px solid var(--okrd-border);
}

.okrd-features-table tr:last-child td {
    border-bottom: none;
}

.okrd-feature-link {
    color: var(--okrd-dark);
    text-decoration: none;
    font-weight: 600;
}

.okrd-feature-link:hover {
    color: var(--okrd-primary);
}

.okrd-status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.okrd-progress-bar {
    position: relative;
    height: 20px;
    background: var(--okrd-light);
    border-radius: 10px;
    overflow: hidden;
}

.okrd-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: 600;
    color: var(--okrd-dark);
    z-index: 1;
}

/* ===== Documentation Styles ===== */
.okrd-docs-builder {
    display: grid;
    grid-template-columns: 280px 1fr 220px;
    gap: 30px;
    margin: 30px 0;
}

.okrd-docs-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.okrd-sidebar-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: var(--okrd-primary);
    color: #fff;
    border-radius: var(--okrd-radius);
    margin-bottom: 20px;
}

.okrd-sidebar-icon {
    width: 40px;
    height: 40px;
}

.okrd-sidebar-header h2 {
    margin: 0;
    font-size: 18px;
}

.okrd-docs-search {
    margin-bottom: 20px;
}

.okrd-docs-search-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--okrd-border);
    border-radius: var(--okrd-radius);
    font-size: 14px;
}

.okrd-docs-tree {
    list-style: none;
    padding: 0;
    margin: 0;
}

.okrd-tree-item {
    margin-bottom: 5px;
}

.okrd-tree-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 5px;
    transition: var(--okrd-transition);
}

.okrd-tree-item-header:hover {
    background: var(--okrd-light);
}

.okrd-tree-item.current .okrd-tree-item-header {
    background: var(--okrd-primary);
    color: #fff;
}

.okrd-tree-link {
    color: inherit;
    text-decoration: none;
    font-size: 14px;
}

.okrd-tree-children {
    list-style: none;
    padding-left: 25px;
    margin-top: 5px;
}

/* ===== FAQ Styles ===== */
.okrd-faq-accordion {
    background: #fff;
    border-radius: var(--okrd-radius);
    box-shadow: var(--okrd-shadow);
    overflow: hidden;
}

.okrd-faq-item {
    border-bottom: 1px solid var(--okrd-border);
}

.okrd-faq-item:last-child {
    border-bottom: none;
}

.okrd-faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: none;
    border: none;
    text-align: left;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--okrd-transition);
}

.okrd-faq-question:hover {
    background: var(--okrd-light);
}

.okrd-faq-icon {
    transition: transform 0.3s ease;
}

.okrd-faq-question[aria-expanded="true"] .okrd-faq-icon {
    transform: rotate(180deg);
}

.okrd-faq-answer {
    padding: 0 20px 20px;
}

.okrd-faq-rating {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--okrd-border);
}

.okrd-rating-buttons {
    display: flex;
    gap: 10px;
}

.okrd-rating-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: #fff;
    border: 1px solid var(--okrd-border);
    border-radius: 5px;
    cursor: pointer;
    transition: var(--okrd-transition);
}

.okrd-rating-btn:hover {
    border-color: var(--okrd-success);
    color: var(--okrd-success);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .okrd-docs-builder {
        grid-template-columns: 1fr;
    }
    
    .okrd-docs-sidebar,
    .okrd-docs-toc {
        position: static;
    }
    
    .okrd-kanban-board {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .okrd-roadmap-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .okrd-search-box {
        margin-left: 0;
        width: 100%;
    }
    
    .okrd-search-input {
        width: 100%;
    }
    
    .okrd-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .okrd-filter-group {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===== List View Styles ===== */
.okrd-list-view {
    background: white;
    border-radius: var(--okrd-radius);
    box-shadow: var(--okrd-shadow-md);
    overflow: hidden;
}

.okrd-features-table {
    width: 100%;
    border-collapse: collapse;
}

.okrd-features-table thead {
    background: linear-gradient(135deg, var(--okrd-light) 0%, white 100%);
    border-bottom: 2px solid var(--okrd-border);
}

.okrd-features-table th {
    padding: 16px;
    text-align: left;
    font-weight: 700;
    font-size: 13px;
    color: var(--okrd-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.okrd-features-table tbody tr {
    border-bottom: 1px solid var(--okrd-border);
    transition: var(--okrd-transition);
}

.okrd-features-table tbody tr:last-child {
    border-bottom: none;
}

.okrd-features-table tbody tr:hover {
    background: var(--okrd-light);
}

.okrd-features-table td {
    padding: 20px 16px;
    vertical-align: middle;
}

.okrd-feature-link {
    color: var(--okrd-dark);
    text-decoration: none;
    font-weight: 600;
    transition: var(--okrd-transition);
}

.okrd-feature-link:hover {
    color: var(--okrd-primary);
}

.okrd-feature-excerpt {
    margin: 8px 0 0 0;
    color: var(--okrd-gray);
    font-size: 14px;
    line-height: 1.5;
}

.okrd-status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: var(--okrd-radius-sm);
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.okrd-category-badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--okrd-light);
    border-radius: var(--okrd-radius-sm);
    font-size: 12px;
    font-weight: 600;
    color: var(--okrd-dark-gray);
}

.okrd-priority-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--okrd-radius-sm);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.okrd-priority-high {
    background: #FEE2E2;
    color: #991B1B;
}

.okrd-priority-medium {
    background: #FEF3C7;
    color: #92400E;
}

.okrd-priority-low {
    background: #DBEAFE;
    color: #1E40AF;
}

.okrd-progress-bar {
    width: 100px;
    height: 8px;
    background: var(--okrd-light-gray);
    border-radius: 4px;
    overflow: hidden;
}

.okrd-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--okrd-primary) 0%, var(--okrd-secondary) 100%);
    transition: width 0.3s ease;
}

.okrd-vote-count {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--okrd-primary);
}

/* ===== Timeline View Styles ===== */
.okrd-timeline-view {
    position: relative;
    padding-left: 40px;
}

.okrd-timeline-view::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--okrd-primary) 0%, var(--okrd-secondary) 100%);
    border-radius: 2px;
}

.okrd-timeline-period {
    margin-bottom: 48px;
    position: relative;
}

.okrd-timeline-period:last-child {
    margin-bottom: 0;
}

.okrd-timeline-header {
    position: relative;
    margin-bottom: 24px;
    padding: 16px 24px;
    background: white;
    border-radius: var(--okrd-radius);
    box-shadow: var(--okrd-shadow-md);
    border-left: 5px solid var(--okrd-primary);
}

.okrd-timeline-header::before {
    content: '';
    position: absolute;
    left: -50px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: white;
    border: 4px solid var(--okrd-primary);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.okrd-timeline-header h3 {
    margin: 0 0 4px 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--okrd-dark);
}

.okrd-timeline-header .okrd-feature-count {
    font-size: 14px;
    color: var(--okrd-gray);
    font-weight: 600;
}

.okrd-timeline-features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    padding-left: 16px;
}

/* ===== Dark Mode Styles ===== */
.okrd-dark-mode {
    --okrd-light: #1E293B;
    --okrd-light-gray: #334155;
    --okrd-gray: #94A3B8;
    --okrd-dark-gray: #CBD5E1;
    --okrd-dark: #F8FAFC;
    --okrd-border: #334155;
    --okrd-border-hover: #475569;
}

.okrd-dark-mode .okrd-roadmap-header,
.okrd-dark-mode .okrd-filters,
.okrd-dark-mode .okrd-list-view,
.okrd-dark-mode .okrd-feature-card,
.okrd-dark-mode .okrd-timeline-header {
    background: #1E293B;
    color: #F8FAFC;
}

.okrd-dark-mode .okrd-search-input,
.okrd-dark-mode .okrd-filter-select {
    background: #334155;
    color: #F8FAFC;
    border-color: #475569;
}

.okrd-dark-mode .okrd-features-table tbody tr:hover {
    background: #334155;
}

/* ===== GitBook Style Documentation ===== */
.okrd-docs-gitbook {
    display: grid;
    /* grid-template-columns: 280px 1fr 280px; */
    grid-template-columns: 300px 700px 280px!important;
    gap: 0;
    min-height: 100vh;
    font-family: var(--okrd-font-body);
}

.okrd-docs-gitbook-sidebar {
    background: #FAFBFC;
    border-right: 1px solid #E2E8F0;
    padding: 32px 24px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.okrd-docs-gitbook-sidebar::-webkit-scrollbar {
    width: 6px;
}

.okrd-docs-gitbook-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.okrd-docs-gitbook-sidebar::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 3px;
}

.okrd-docs-gitbook-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #E2E8F0;
}

.okrd-docs-gitbook-logo img {
    width: 40px;
    height: 40px;
}

.okrd-docs-gitbook-logo h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--okrd-dark);
}

.okrd-docs-gitbook-search {
    margin-bottom: 24px;
}

.okrd-docs-gitbook-search input {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid #E2E8F0;
    border-radius: var(--okrd-radius-sm);
    font-size: 14px;
    background: white;
    transition: var(--okrd-transition);
}

.okrd-docs-gitbook-search input:focus {
    outline: none;
    border-color: var(--okrd-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

.okrd-docs-gitbook-nav-item {
    margin-bottom: 4px;
}

.okrd-docs-gitbook-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    color: var(--okrd-dark-gray);
    text-decoration: none;
    border-radius: var(--okrd-radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: var(--okrd-transition);
}

.okrd-docs-gitbook-nav-link:hover {
    background: white;
    color: var(--okrd-primary);
}

.okrd-docs-gitbook-nav-link.active {
    background: var(--okrd-primary);
    color: white;
    font-weight: 600;
}

.okrd-docs-gitbook-nav-children {
    list-style: none;
    padding-left: 20px;
    margin: 4px 0;
}

.okrd-docs-gitbook-content {
    padding: 48px 64px;
    max-width: 900px;
}

.okrd-docs-gitbook-content h1 {
    font-size: 36px;
    font-weight: 800;
    margin: 0 0 16px 0;
    color: var(--okrd-dark);
    line-height: 1.2;
}

.okrd-docs-gitbook-content h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 40px 0 16px 0;
    color: var(--okrd-dark);
    padding-bottom: 8px;
    border-bottom: 2px solid var(--okrd-border);
}

.okrd-docs-gitbook-content h3 {
    font-size: 22px;
    font-weight: 700;
    margin: 32px 0 12px 0;
    color: var(--okrd-dark);
}

.okrd-docs-gitbook-content p {
    line-height: 1.7;
    margin: 0 0 20px 0;
    color: var(--okrd-dark-gray);
    font-size: 16px;
}

.okrd-docs-gitbook-content code {
    background: var(--okrd-light);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    color: var(--okrd-primary);
}

.okrd-docs-gitbook-content pre {
    background: #1E293B;
    color: #F8FAFC;
    padding: 20px;
    border-radius: var(--okrd-radius);
    overflow-x: auto;
    margin: 20px 0;
}

.okrd-docs-gitbook-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.okrd-docs-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--okrd-gray);
}

.okrd-docs-breadcrumb a {
    color: var(--okrd-primary);
    text-decoration: none;
}

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

.okrd-docs-meta {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px 0;
    margin: 40px 0 0 0;
    border-top: 1px solid var(--okrd-border);
    font-size: 14px;
    color: var(--okrd-gray);
}

.okrd-docs-version-badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--okrd-light);
    border-radius: var(--okrd-radius-sm);
    font-weight: 600;
    color: var(--okrd-primary);
}

/* ===== Responsive Styles ===== */
@media (max-width: 1024px) {
    .okrd-docs-gitbook {
        grid-template-columns: 240px 1fr;
    }
    
    .okrd-docs-gitbook-content {
        padding: 32px 40px;
    }
}

@media (max-width: 768px) {
    .okrd-docs-gitbook {
        grid-template-columns: 1fr;
    }
    
    .okrd-docs-gitbook-sidebar {
        display: none;
    }
    
    .okrd-timeline-view {
        padding-left: 24px;
    }
    
    .okrd-timeline-view::before {
        left: 8px;
    }
    
    .okrd-timeline-header::before {
        left: -34px;
    }
    
    .okrd-timeline-features {
        grid-template-columns: 1fr;
        padding-left: 8px;
    }
    
    .okrd-features-table {
        font-size: 14px;
    }
    
    .okrd-features-table th,
    .okrd-features-table td {
        padding: 12px 8px;
    }
}

/* ===== GitBook 3-Column Layout ===== */
.okrd-docs-gitbook {
    display: grid;
}

.okrd-toc-link:hover {
    background: #F1F5F9;
    color: #3B82F6;
    border-left-color: #3B82F6;
}

.okrd-toc-link.active {
    background: #EFF6FF;
    color: #3B82F6;
    font-weight: 600;
    border-left-color: #3B82F6;
}

.okrd-toc-empty {
    color: #94A3B8;
    font-size: 13px;
    font-style: italic;
}

/* ===== Breadcrumb ===== */
.okrd-docs-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #64748B;
}

.okrd-breadcrumb-separator {
    color: #CBD5E1;
}

.okrd-breadcrumb-item {
    color: #64748B;
}

.okrd-breadcrumb-item:last-child {
    color: #3B82F6;
    font-weight: 600;
}

/* ===== Responsive GitBook ===== */

/* ===== GitBook TOC Sidebar ===== */
.okrd-docs-gitbook-toc {
    background: white;
    border-left: 1px solid #E2E8F0;
    padding: 48px 24px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.okrd-docs-gitbook-toc::-webkit-scrollbar {
    width: 6px;
}

.okrd-docs-gitbook-toc::-webkit-scrollbar-track {
    background: transparent;
}

.okrd-docs-gitbook-toc::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 3px;
}

.okrd-toc-sticky h3 {
    margin: 0 0 20px 0;
    font-size: 12px;
    font-weight: 700;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.okrd-toc-nav {
    margin-top: 16px;
}

.okrd-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.okrd-toc-list li {
    margin-bottom: 6px;
}

.okrd-toc-link {
    display: block;
    padding: 6px 12px;
    color: #64748B;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.5;
    border-radius: 6px;
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
}

.okrd-toc-link:hover {
    background: #F1F5F9;
    color: #3B82F6;
    border-left-color: #3B82F6;
}

.okrd-toc-link.active {
    background: #EFF6FF;
    color: #3B82F6;
    font-weight: 600;
    border-left-color: #3B82F6;
}

.okrd-toc-empty {
    color: #94A3B8;
    font-size: 13px;
    font-style: italic;
    padding: 12px;
}

.okrd-docs-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.okrd-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #E2E8F0;
    border-top-color: #3B82F6;
    border-radius: 50%;
    animation: okrd-spin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes okrd-spin {
    to { transform: rotate(360deg); }
}

.okrd-docs-loading p {
    color: #64748B;
    font-size: 14px;
    margin: 0;
}

@media (max-width: 1280px) {
    .okrd-docs-gitbook {

        grid-template-columns: 300px 700px 280px!important;
        /* grid-template-columns: 260px 1fr 240px; - FIXIT */
    }
    
    .okrd-docs-gitbook-content {
        padding: 40px 48px;
    }
}

@media (max-width: 1024px) {
    .okrd-docs-gitbook {
        grid-template-columns: 240px 1fr;
    }
    
    .okrd-docs-gitbook-toc {
        display: none;
    }
    
    .okrd-docs-gitbook-content {
        padding: 32px 40px;
    }
}

@media (max-width: 768px) {
    .okrd-docs-gitbook {
        grid-template-columns: 1fr;
    }
    
    .okrd-docs-gitbook-sidebar {
        position: relative;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #E2E8F0;
        max-height: 300px;
    }
    
    .okrd-docs-gitbook-content {
        padding: 24px 20px;
    }
}

/* ===== Content Headings with IDs for TOC ===== */
.okrd-docs-inner h2,
.okrd-docs-inner h3 {
    position: relative;
    scroll-margin-top: 100px;
}

.okrd-docs-inner h2::before,
.okrd-docs-inner h3::before {
    content: '#';
    position: absolute;
    left: -20px;
    color: #CBD5E1;
    font-weight: 400;
    opacity: 0;
    transition: opacity 0.2s;
}

.okrd-docs-inner h2:hover::before,
.okrd-docs-inner h3:hover::before {
    opacity: 1;
}
