/* PoleArc Help - Stylesheet */

:root {
    --color-primary: #E8731A;
    --color-primary-light: #F5A623;
    --color-primary-bg: #FFF7F0;
    --color-text: #333;
    --color-text-light: #666;
    --color-border: #E0E0E0;
    --color-bg: #FAFAFA;
    --color-white: #FFFFFF;
    --color-hover: #F5F5F5;
    --color-active: #FFF0E0;
    --sidebar-width: 300px;
    --header-height: 48px;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
    font-family: var(--font-family);
    color: var(--color-text);
    background: var(--color-bg);
    height: 100vh;
    overflow: hidden;
}

/* Header */
.header {
    height: var(--header-height);
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    padding: 0 16px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text);
}

.logo-icon {
    flex-shrink: 0;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-right: 8px;
}

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--color-text);
    transition: transform 0.2s, opacity 0.2s;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Layout */
.layout {
    display: flex;
    height: calc(100vh - var(--header-height));
    margin-top: var(--header-height);
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--color-white);
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Search */
.search-container {
    padding: 12px;
    border-bottom: 1px solid var(--color-border);
    position: relative;
}

.search-container input {
    width: 100%;
    padding: 8px 12px 8px 32px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 13px;
    font-family: var(--font-family);
    outline: none;
    transition: border-color 0.2s;
}

.search-container input:focus {
    border-color: var(--color-primary);
}

.search-container input::placeholder {
    color: #AAA;
}

.search-icon {
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Navigation Tree */
.nav-tree {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.nav-loading {
    padding: 16px;
    color: var(--color-text-light);
    font-size: 13px;
}

.nav-category {
    margin-bottom: 2px;
}

.nav-category-header {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    user-select: none;
    transition: background 0.15s;
}

.nav-category-header:hover {
    background: var(--color-hover);
}

.nav-category-arrow {
    width: 16px;
    height: 16px;
    margin-right: 4px;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.nav-category.collapsed .nav-category-arrow {
    transform: rotate(-90deg);
}

.nav-category.collapsed .nav-topic-list {
    display: none;
}

.nav-topic-list {
    list-style: none;
}

.nav-topic {
    display: block;
    padding: 5px 12px 5px 36px;
    font-size: 13px;
    color: var(--color-text-light);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    user-select: none;
}

.nav-topic:hover {
    background: var(--color-hover);
    color: var(--color-text);
}

.nav-topic.active {
    background: var(--color-active);
    color: var(--color-primary);
    font-weight: 500;
}

.nav-topic.hidden {
    display: none;
}

.nav-category.hidden {
    display: none;
}

.nav-no-results {
    padding: 16px;
    color: var(--color-text-light);
    font-size: 13px;
    font-style: italic;
    display: none;
}

/* Content Area */
.content {
    flex: 1;
    overflow: hidden;
}

.content iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: var(--color-white);
}

/* Sidebar Overlay (mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 49;
}

/* Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .sidebar {
        position: fixed;
        top: var(--header-height);
        left: 0;
        bottom: 0;
        z-index: 50;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.visible {
        display: block;
    }

    .content {
        width: 100%;
    }
}

/* Scrollbar styling */
.nav-tree::-webkit-scrollbar {
    width: 6px;
}

.nav-tree::-webkit-scrollbar-track {
    background: transparent;
}

.nav-tree::-webkit-scrollbar-thumb {
    background: #CCC;
    border-radius: 3px;
}

.nav-tree::-webkit-scrollbar-thumb:hover {
    background: #AAA;
}
