/* Engineer Documentation - Shared Styles */

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* Sidebar */
.sidebar {
    width: 280px;
    height: calc(100vh - 56px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}
.sidebar::-webkit-scrollbar {
    width: 4px;
}
.sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 2px;
}

/* Sidebar link hover */
.sidebar-link {
    transition: background-color 0.15s ease, color 0.15s ease;
}
.sidebar-link:hover {
    background-color: rgba(0, 113, 227, 0.06);
    color: #0071E3;
}
.sidebar-link.active {
    background-color: rgba(0, 113, 227, 0.1);
    color: #0071E3;
    font-weight: 600;
}

/* Search results dropdown */
.search-results-dropdown {
    display: none;
    position: fixed;
    width: 260px;
    max-height: 420px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    z-index: 200;
    padding: 6px;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}
.search-results-dropdown::-webkit-scrollbar { width: 4px; }
.search-results-dropdown::-webkit-scrollbar-track { background: transparent; }
.search-results-dropdown::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; }
.search-results-dropdown.visible {
    display: block;
}
.search-result-item {
    display: block;
    padding: 8px 10px;
    border-radius: 10px;
    transition: background-color 0.12s ease;
    text-decoration: none;
    cursor: pointer;
}
.search-result-item:hover {
    background-color: rgba(0, 113, 227, 0.06);
}
.search-result-item + .search-result-item {
    margin-top: 2px;
}
.search-highlight {
    background-color: rgba(0, 113, 227, 0.15);
    color: #0071E3;
    border-radius: 2px;
    padding: 0 1px;
}
.search-no-results,
.search-more-results {
    text-align: center;
    padding: 12px 10px;
    font-size: 12px;
    color: #86868B;
}

/* Collapsible sections */
.sidebar-section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease-out;
}
.sidebar-section-content.expanded {
    max-height: 2000px;
    transition: max-height 0.4s ease-in;
}

/* Chevron rotation */
.sidebar-chevron {
    transition: transform 0.2s ease;
}
.sidebar-chevron.rotated {
    transform: rotate(90deg);
}

/* Bento card hover */
.bento-card {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.bento-card:hover {
    transform: scale(1.02) translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.08), 0 16px 48px rgba(0,0,0,0.08);
}

/* Mobile sidebar overlay */
.sidebar-overlay {
    background-color: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.sidebar-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Mobile sidebar slide */
.sidebar-mobile {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}
.sidebar-mobile.open {
    transform: translateX(0);
}
