/**
 * BlockSmith ZMP Projection UI Theme - Optimized Low-Width Constraints
 */

:root {
    --bg-main: #090d16;
    --bg-surface: #0f172a;
    --bg-input: #1e293b;
    --border-color: #334155;
    --border-focus: #3b82f6;
    
    --text-primary: #f8fafc;
    --text-muted: #94a3b8;
    
    --color-logical: #64748b;
    --color-index: #cbd5e1;
    --color-alpha: #38bdf8;
    --color-token: #c084fc;
    --color-secret: #34d399;
    
    --font-mono: "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
    --font-sans: system-ui, -apple-system, sans-serif;

    --row-height: 18px;
    --row-font-size: 9px;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-sans);
    margin: 0;
    padding: 24px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.header {
    margin-bottom: 20px;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 12px;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 4px 0;
    letter-spacing: -0.02em;
}

.header p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

#decoySpace {
    background-color: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.controls-toolbar {
    display: grid;
    grid-template-columns: 2fr 2fr 1.2fr;
    gap: 14px;
    margin-bottom: 16px;
    align-items: end;
}

@media (max-width: 840px) {
    .controls-toolbar { grid-template-columns: 1fr; gap: 10px; }
}

.control-item { display: flex; flex-direction: column; gap: 6px; }

.control-item label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.password-wrapper { position: relative; display: flex; align-items: center; width: 100%; }

.control-item input,
.control-item select {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--text-primary);
    font-size: 0.88rem;
    font-family: var(--font-mono);
    width: 100%;
    height: 36px;
    box-sizing: border-box;
}

.password-wrapper input { padding-right: 40px; }
.control-item input:focus, .control-item select:focus { outline: none; border-color: var(--border-focus); }

.password-peek-icon {
    position: absolute; right: 12px; width: 20px; height: 20px;
    color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center;
}

/* Fast Timeline Navigation Track Styling */
.fast-navigation-panel {
    background: #0b0f19;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.slider-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #38bdf8;
}

.nav-val {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #f59e0b;
    font-weight: 600;
}

.fast-navigation-panel input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: #1e293b;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.fast-navigation-panel input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3b82f6;
    border: 2px solid #f8fafc;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
    transition: transform 0.1s ease;
}

.fast-navigation-panel input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

/* Master Fixed Envelope Scroller Viewport */
.grid-scroll-container {
    overflow-x: auto; 
    overflow-y: hidden;
    height: 520px; 
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: #070a12;
    position: relative;
    touch-action: pan-x; 
    cursor: grab;
}

.grid-scroll-container:active { cursor: grabbing; }

.decoy-grid {
    display: grid;
    /* grid-template-columns: 6rem 80px 1em 20px 1.5fr 1fr 1fr 70px; */
    background-color: var(--border-color);
    gap: 1px;
    width: 100%;
    min-width: 720px;
    height: 100%; 
    user-select: none;
}

.gh {
    background-color: #0f172a !important;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    height: 36px;
    box-sizing: border-box;
    padding: 0 8px;
    display: flex;
    align-items: center;
}

.gc {
    background-color: #090d16;
    padding-left: 6px;
    padding-right: 6px;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    font-family: var(--font-mono);
    font-size: var(--row-font-size);
    height: var(--row-height);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    line-height: 1 !important; 
}
.overflow-left {
    font-size: 0.8rem;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: clip !important;
    direction: rtl !important;
    text-align: right !important;
    justify-content: right !important;
    unicode-bidi: bidi-override !important;
}

.decoy-grid .gc:nth-child(7n+1) { color: var(--color-logical); }
.decoy-grid .gc:nth-child(7n+2) { color: var(--color-index); }
.decoy-grid .gc:nth-child(7n+3) { color: var(--color-alpha); justify-content: center; }
.decoy-grid .gc:nth-child(7n+4) { color: #f59e0b; justify-content: center; font-weight: 500; }
.decoy-grid .gc:nth-child(7n+5) { color: var(--color-token); font-weight: 500; }
.decoy-grid .gc:nth-child(7n+6) { color: var(--color-secret); font-weight: 500; }
.decoy-grid .gc:nth-child(7n+7) { justify-content: center; font-size: 10px; }

.decoy-grid:hover .gc { background-color: #0b0f19; }
.decoy-grid .gc:hover { background-color: #131c2e; }
.decoy-target { background-color: rgba(16, 185, 129, 0.12) !important; }

/* Enforce high-priority visualization rules for target matching components */
.decoy-grid .gc.decoy-target {
    background-color: #064e3b !important;
    color: #a7f3d0 !important;
}
