/* ====================================================================
   NETWORK WIDGET - Compact Live Monitor (Redesigned)
   ==================================================================== */

.net-widget-surface {
    width: 340px;
    background: var(--io-surface-raised);
    border: 1px solid var(--io-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    user-select: none;
}

/* ====================================================================
   HEADER - Draggable area with close button
   ==================================================================== */

.net-widget-header {
    padding: var(--io-space-md);
    background: var(--io-surface-sunken);
    border-bottom: 1px solid var(--io-border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: move;
    position: relative;
}

.net-widget-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: var(--io-space-md);
    right: var(--io-space-md);
    height: 1px;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(var(--io-border-fade-base), 0.3) 15%,
        rgba(var(--io-border-fade-base), 0.6) 50%,
        rgba(var(--io-border-fade-base), 0.3) 85%,
        transparent 100%
    );
    pointer-events: none;
}

.net-widget-title {
    font-size: 11px;
    color: var(--io-text-primary);
    text-transform: lowercase;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: var(--io-space-xs);
}

.net-widget-title i {
    color: var(--io-accent);
    font-size: 10px;
}

.net-widget-close {
    background: transparent;
    border: none;
    color: var(--io-text-tertiary);
    cursor: pointer;
    font-size: 12px;
    padding: 4px;
    transition: all var(--io-transition-base);
    line-height: 1;
}

.net-widget-close:hover {
    color: var(--io-accent);
}

/* ====================================================================
   BODY - Clickable stats area
   ==================================================================== */

.net-widget-body {
    padding: var(--io-space-md);
    cursor: pointer;
    transition: background var(--io-transition-base);
}

.net-widget-body:hover {
    background: var(--io-surface-hover);
}

/* ====================================================================
   STATUS LINE - Current action + total stats
   ==================================================================== */

.net-widget-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--io-space-md);
    padding-bottom: var(--io-space-sm);
    border-bottom: 1px solid var(--io-border-subtle);
}

.net-widget-action {
    font-size: 11px;
    color: var(--io-text-secondary);
    font-family: var(--io-font-mono);
    letter-spacing: 0.02em;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.net-widget-total {
    font-size: 10px;
    color: var(--io-text-tertiary);
    margin-left: var(--io-space-sm);
    white-space: nowrap;
}

/* ====================================================================
   TX/RX ROWS
   ==================================================================== */

.net-widget-row {
    margin-bottom: var(--io-space-md);
}

.net-widget-row:last-child {
    margin-bottom: 0;
}

.net-widget-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--io-space-xs);
}

/* ====================================================================
   LABELS (TX/RX)
   ==================================================================== */

.net-widget-label {
    display: flex;
    align-items: center;
    gap: var(--io-space-xs);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.net-widget-label i {
    font-size: 9px;
}

.net-widget-label.tx {
    color: var(--io-accent);
}

.net-widget-label.rx {
    color: var(--io-info);
}

/* ====================================================================
   VALUES (Packets + Bytes)
   ==================================================================== */

.net-widget-values {
    display: flex;
    gap: var(--io-space-md);
}

.net-widget-value {
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-size: 13px;
    color: var(--io-text-primary);
    font-family: var(--io-font-mono);
}

.net-widget-value-label {
    font-size: 9px;
    color: var(--io-text-tertiary);
    text-transform: lowercase;
}

/* ====================================================================
   ACTIVITY BARS
   ==================================================================== */

.net-widget-bar {
    height: 4px;
    background: var(--io-surface-sunken);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.net-widget-bar-fill {
    height: 100%;
    transition: width 100ms ease-out;
    border-radius: 2px;
}

.net-widget-bar-fill.tx {
    background: var(--io-accent);
    box-shadow: 0 0 8px var(--io-accent-glow);
}

.net-widget-bar-fill.rx {
    background: var(--io-info);
    box-shadow: 0 0 8px rgba(0, 217, 255, 0.3);
}

/* ====================================================================
   HINT - Click to open debugger
   ==================================================================== */

.net-widget-hint {
    padding: var(--io-space-sm) var(--io-space-md);
    background: var(--io-surface-sunken);
    border-top: 1px solid var(--io-border-subtle);
    font-size: 9px;
    color: var(--io-text-tertiary);
    text-align: center;
    letter-spacing: 0.02em;
}