/* Partial: _header.css.j2 — Unified header styles (both modes) */

/* Edit header base (overrides shared _header.css.j2 values) */
.header {
    background: white;
    border-bottom: 1px solid #e9ecef;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    flex-shrink: 0;
    z-index: 100;
}

.header-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #212529;
    display: flex;
    align-items: center;
    gap: 8px;
}

.version-badge {
    padding: 2px 6px;
    background: #e9ecef;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    color: #6c757d;
}

.header-stats {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.stat-badge {
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    user-select: none;
    cursor: pointer;
    transition: opacity 0.15s, box-shadow 0.15s;
}

.stat-badge:hover { box-shadow: 0 0 0 2px rgba(255,255,255,0.3); }
.stat-badge.dimmed { opacity: 0.3; text-decoration: line-through; }

.stat-badge.prd { background: #1b3a5c; color: white; }
.stat-badge.ops { background: #fd7e14; color: white; }
.stat-badge.dev { background: #20c997; color: white; }
.stat-badge.main { background: #6f42c1; color: white; }
.stat-badge.tests { background: #0dcaf0; color: #212529; }
.stat-badge.results { background: #6c757d; color: white; }
.stat-badge.active { box-shadow: 0 0 0 2px #0d6efd; }
.stat-badge.repo { background: #e83e8c; color: white; }

.stat-sep { color: #adb5bd; font-size: 0.8rem; }

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    min-width: 300px;
}

.search-box {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.search-box input {
    width: 100%;
    padding: 7px 12px 7px 32px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.875rem;
    background: #f8f9fa;
    transition: border-color 0.15s, background 0.15s;
}

.search-box input:focus {
    outline: none;
    border-color: #0d6efd;
    background: white;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.search-box::before {
    content: "\1F50D";
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    opacity: 0.5;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-height: 320px;
    overflow-y: auto;
    z-index: 200;
    display: none;
}

.search-results.visible {
    display: block;
}

.search-result-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f1f3f4;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-result-item:hover {
    background: #f0f4ff;
}

.search-result-id {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 0.8rem;
    color: #0d6efd;
    flex-shrink: 0;
}

.search-result-title {
    font-size: 0.8rem;
    color: #495057;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-result-level {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 3px;
    flex-shrink: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Edit Mode Toggle */
.edit-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: #495057;
    transition: all 0.2s;
    user-select: none;
}

.edit-toggle:hover {
    border-color: #adb5bd;
}

.edit-toggle.active {
    border-color: #0d6efd;
    background: #e7f1ff;
    color: #0d6efd;
}

.edit-toggle-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #adb5bd;
    transition: background 0.2s;
}

.edit-toggle.active .edit-toggle-indicator {
    background: #0d6efd;
}

/* Hamburger Menu */
.hamburger-menu { position: relative; }

.hamburger-btn {
    font-size: 1.2rem;
    padding: 6px 10px;
    line-height: 1;
}

.hamburger-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 220px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    z-index: 300;
    padding: 4px 0;
    margin-top: 4px;
}

.hamburger-dropdown.visible { display: block; }

.hamburger-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 14px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.85rem;
    color: #495057;
    text-align: left;
    transition: background 0.1s;
}

.hamburger-item:hover { background: #f0f4ff; }

.hamburger-label {
    padding: 4px 14px 2px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #adb5bd;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hamburger-divider {
    height: 1px;
    background: #e9ecef;
    margin: 4px 0;
}

/* Font size controls */
.font-size-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: default;
}

.font-size-btn {
    padding: 2px 8px !important;
    font-size: 0.8rem !important;
    min-width: 32px;
    text-align: center;
}

#font-size-display {
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 36px;
    text-align: center;
    color: #495057;
}

/* Theme controls */
.theme-controls {
    display: flex;
    gap: 4px;
    cursor: default;
}

.theme-btn {
    padding: 4px 10px !important;
    font-size: 1rem !important;
    border-radius: 4px;
    min-width: 36px;
    text-align: center;
}

.theme-btn.active {
    background: #e7f1ff !important;
    border-color: #0d6efd !important;
    color: #0d6efd !important;
}

/* Filter toggle button */
.filter-toggle-btn {
    padding: 2px 8px !important;
    font-size: 0.85rem !important;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.15s;
}
.filter-toggle-btn:hover { opacity: 1; }
.filter-toggle-btn.dimmed { opacity: 0.3; }
