/**
 * NeoWeaver – Cyber HUD Styles
 *
 * Covers: HUD overlay, status bar, HUD grid, columns,
 * bars, scanlines, center line, tags, and footer trigger.
 *
 * @package Neoweaver
 */

/* ==========================================================================
   1. HUD OVERLAY
   ========================================================================== */

/* Pointer-events fix — HUD nie blokuje kliknięć pod spodem */
#hud-wrapper {
    pointer-events: none;
}

#hud-wrapper > * {
    pointer-events: all;
}

/* ==========================================================================
   2. HUD WRAPPER
   ========================================================================== */
.cyber-hud-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100001;
    max-height: 40px;
    overflow: hidden;
    font-family: var(--font-terminal);

    background: var(--neo-surface-hud);
    backdrop-filter: blur(var(--blur-hud)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--blur-hud)) saturate(180%);

    border-bottom: 1px solid var(--neo-monitor-border);
    box-shadow:
        inset 0 0 20px rgba(0, 210, 255, 0.1),
        0 4px 24px rgba(0, 0, 0, 0.7),
        0 0 24px rgba(0, 210, 255, 0.15);

    transition: all var(--transition-hud);
}

.cyber-hud-wrapper.is-open {
    max-height: 550px;
    background: var(--neo-surface-hud-open);
    border-color: rgba(0, 210, 255, 0.45);
    box-shadow:
        inset 0 0 40px rgba(0, 210, 255, 0.15),
        0 8px 40px rgba(0, 0, 0, 0.8);
}

/* ==========================================================================
   2a. OFFLINE STATE (brak sesji / postaci — PHP branch)
   ========================================================================== */
.cyber-hud-wrapper--offline {
    max-height: 40px;
    display: flex;
    align-items: center;
    padding: 0 30px;
}

.cyber-hud-wrapper--offline .hud-status-label {
    color: #ff4444;
    text-shadow: 0 0 12px rgba(255, 68, 68, 0.7);
    letter-spacing: 2px;
    font-size: 10px;
}

/* ==========================================================================
   2b. JS FAILURE FALLBACK
   BUG 19 fix — .hud-error-state visible by default; hidden once JS adds
   .hud-js-ready to #hud-wrapper. .cyber-hud-grid is hidden until JS ready.
   ========================================================================== */
.hud-error-state {
    display: block;
    padding: 0 30px;
    height: 40px;
    line-height: 40px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #ff4444;
    text-shadow: 0 0 12px rgba(255, 68, 68, 0.7);
}

#hud-wrapper.hud-js-ready .hud-error-state {
    display: none;
}

.cyber-hud-grid {
    display: none;
}

#hud-wrapper.hud-js-ready .cyber-hud-grid {
    display: flex;
}

/* ==========================================================================
   3. STATUS BAR
   ========================================================================== */
.status-dots-row {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    cursor: pointer;
    background:
        radial-gradient(circle at 0% 50%, rgba(0, 210, 255, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 100% 50%, rgba(0, 210, 255, 0.10) 0%, transparent 40%);
}

.hud-status-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--neo-monitor);
    text-shadow: 0 0 20px var(--neo-monitor-glow);
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* ==========================================================================
   4. HUD GRID
   ========================================================================== */
/* Base display: none — overridden by .hud-js-ready above */
.cyber-hud-grid {
    overflow-x: auto;
    padding: 24px 28px 20px;
    gap: 18px;
    scrollbar-width: thin;
    scrollbar-color: var(--neo-monitor) transparent;
}

/* ==========================================================================
   5. HUD COLUMNS
   ========================================================================== */
.hud-column {
    min-width: 200px;
    flex: 1;
    padding: 18px 16px;
    border-radius: 12px;
    background: var(--neo-surface-col);
    backdrop-filter: blur(10px) saturate(200%);
    border: 1px solid rgba(0, 210, 255, 0.2);
    box-shadow:
        inset 0 0 12px rgba(255, 255, 255, 0.05),
        0 4px 20px rgba(0, 0, 0, 0.6);
    transition: all var(--transition-smooth);
}

.hud-column:hover {
    background: rgba(15, 23, 42, 0.25);
    border-color: rgba(0, 210, 255, 0.5);
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        inset 0 0 20px rgba(255, 255, 255, 0.08),
        0 12px 40px rgba(0, 210, 255, 0.2);
}

/* ==========================================================================
   6. LABELS & VALUES
   ========================================================================== */
.hud-labels {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 12px;
    font-size: 9px;
    color: #a1a1aa;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
}

.val-num {
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    color: #fff;
    text-shadow: 0 0 16px rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   7. HUD BARS
   ========================================================================== */
.hud-bar-container {
    height: 5px;
    background: rgba(15, 23, 42, 0.6);
    margin-bottom: 14px;
    position: relative;
    border-radius: 999px;
    overflow: hidden;
}

.hud-bar-fill {
    height: 100%;
    position: absolute;
    border-radius: 999px;
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.25);
    transition:
        width 1s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.4s ease;
}

/* ==========================================================================
   8. HUD EFFECTS
   ========================================================================== */
.scanlines {
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            0deg,
            transparent 0px,
            rgba(255, 255, 255, 0.04) 1px,
            transparent 2px
        ),
        linear-gradient(
            90deg,
            rgba(0, 210, 255, 0.1) 0%,
            transparent 50%,
            rgba(0, 210, 255, 0.1) 100%
        );
    background-size: 100% 100%, 8px 100%;
    z-index: 5;
    pointer-events: none;
}

.center-line {
    position: absolute;
    left: 50%;
    top: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    z-index: 10;
    transform: translateX(-50%);
}

/* ==========================================================================
   9. TAG CLOUD
   ========================================================================== */
.tag-cloud {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 45px;
}

.tag-item {
    font-size: 9px;
    font-weight: 700;
    color: #f4f4f5;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid rgba(0, 210, 255, 0.3);
    background: rgba(0, 210, 255, 0.08);
    backdrop-filter: blur(6px);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.25s ease;
}

.tag-item:hover {
    background: rgba(0, 210, 255, 0.15);
    box-shadow: 0 0 12px rgba(0, 210, 255, 0.4);
}

/* ==========================================================================
   10. HUD FOOTER TRIGGER
   ========================================================================== */
.hud-close-trigger {
    text-align: center;
    padding: 16px;
    font-size: 10px;
    color: #8b949e;
    letter-spacing: 4px;
    cursor: pointer;
    border-top: 1px solid rgba(0, 210, 255, 0.2);
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.hud-close-trigger:hover {
    color: var(--neo-monitor);
    letter-spacing: 6px;
    background: rgba(0, 210, 255, 0.12);
    box-shadow: inset 0 0 20px rgba(0, 210, 255, 0.2);
    animation: neon-pulse 1.5s infinite;
}
