/* ====================================================================
   INTELLIGENCE PAGE — Component Styles
   Extracted from intelligence.html inline styles (Part 2)
   Bars, Heatmap, Tooltip, Process, Params, Expand, Features, etc.
   ==================================================================== */

/* --- Horizontal CSS Bars --- */
.bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.bar-label {
    font-size: 12px;
    font-weight: 500;
    color: #a1a1aa;
    width: 80px;
    flex-shrink: 0;
    font-family: 'JetBrains Mono', monospace;
}

.intel-page .bar-track {
    flex: 1;
    height: 24px;
    background: rgba(42, 42, 53, 0.5);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.intel-page .bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    display: flex;
    align-items: center;
    padding-left: 10px;
}

.bar-fill-text {
    font-size: 11px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    color: #fafafa;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.bar-value {
    font-size: 12px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    color: #a1a1aa;
    width: 60px;
    text-align: right;
    flex-shrink: 0;
}

/* --- Heatmap Grid --- */
.heatmap-container {
    overflow-x: auto;
    margin: 12px 0;
}

.heatmap-grid {
    display: inline-grid;
    gap: 2px;
    min-width: 100%;
}

.heatmap-cell {
    width: 100%;
    min-width: 44px;
    height: 36px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    color: #fafafa;
    cursor: default;
    transition: transform 0.15s ease;
    position: relative;
}

.heatmap-cell:hover {
    transform: scale(1.08);
    z-index: 2;
}

.heatmap-header {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #71717a;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
}

.heatmap-row-label {
    font-size: 11px;
    font-weight: 500;
    color: #a1a1aa;
    display: flex;
    align-items: center;
    padding-right: 8px;
    white-space: nowrap;
    min-width: 110px;
}

/* --- Tooltip --- */
.tooltip {
    position: fixed;
    background: #27272a;
    border: 1px solid #3f3f46;
    color: #fafafa;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    pointer-events: none;
    z-index: 9999;
    display: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    line-height: 1.6;
    max-width: 280px;
}

/* --- Process Status Panel --- */
.process-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.process-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(42, 42, 53, 0.3);
    border: 1px solid #2a2a35;
    border-radius: 8px;
    padding: 14px 18px;
}

.process-name {
    font-size: 13px;
    font-weight: 600;
    color: #d4d4d8;
}

.process-desc {
    font-size: 11px;
    color: #71717a;
    margin-top: 2px;
}

/* --- Param Status Summary --- */
.param-counts {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.param-count-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.param-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.param-count-label {
    font-size: 12px;
    color: #a1a1aa;
}

.param-count-value {
    font-size: 14px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: #fafafa;
}

/* --- Stacked Bar --- */
.stacked-bar {
    display: flex;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    margin: 12px 0;
}

.stacked-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: #fafafa;
    transition: flex-basis 0.4s ease;
    cursor: default;
    position: relative;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.stacked-segment:hover {
    filter: brightness(1.2);
}

.stacked-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #a1a1aa;
}

.legend-swatch {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

/* --- Expandable Sections --- */
.expand-section {
    border: 1px solid #2a2a35;
    border-radius: 10px;
    margin-bottom: 8px;
    overflow: hidden;
}

.expand-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    cursor: pointer;
    background: rgba(26, 26, 36, 0.7);
    transition: background 0.15s ease;
    user-select: none;
}

.expand-header:hover {
    background: rgba(42, 42, 53, 0.5);
}

.expand-header .expand-title {
    font-size: 14px;
    font-weight: 600;
    color: #d4d4d8;
}

.expand-header .expand-count {
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    color: #71717a;
}

.expand-arrow {
    font-size: 12px;
    color: #71717a;
    transition: transform 0.2s ease;
    margin-left: 10px;
}

.expand-section.open .expand-arrow {
    transform: rotate(90deg);
}

.expand-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.expand-section.open .expand-body {
    max-height: 2000px;
}

.expand-body-inner {
    padding: 0 18px 16px;
}

/* --- Feature Weight Row --- */
.feature-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(42, 42, 53, 0.4);
}

.feature-row:last-child {
    border-bottom: none;
}

.feature-name {
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    color: #d4d4d8;
    width: 180px;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.feature-bar-track {
    flex: 1;
    height: 8px;
    background: rgba(42, 42, 53, 0.5);
    border-radius: 4px;
    overflow: hidden;
}

.feature-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #646cff, #818cf8);
    transition: width 0.5s ease;
}

.feature-weight-val {
    font-size: 11px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    color: #a1a1aa;
    width: 45px;
    text-align: right;
    flex-shrink: 0;
}

.feature-mode {
    flex-shrink: 0;
}

/* --- Domain Override Grid --- */
.override-grid {
    overflow-x: auto;
}

.override-grid table {
    width: 100%;
    border-collapse: collapse;
}

.override-grid th {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #71717a;
    padding: 8px 10px;
    text-align: center;
    border-bottom: 1px solid #2a2a35;
    white-space: nowrap;
}

.override-grid td {
    text-align: center;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    border-bottom: 1px solid rgba(42, 42, 53, 0.3);
}

.override-positive { color: #60a5fa; }
.override-negative { color: #f87171; }
.override-zero { color: #3f3f46; }

