﻿.network-tab-container {
    width: 100%;
    height: 600px;
    position: relative;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Header Section */
.network-header-section {
    height: 80px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* Graph Area */
.network-graph-container {
    flex: 1;
    position: relative;
    background: #fafafa;
    margin: 10px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

#sigma-container {
    width: 100%;
    height: 100%;
    background: #fafafa;
    border-radius: 6px;
}

/* Controls Section */
.network-controls-section {
    height: 70px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-top: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-shrink: 0;
}

/* Header Styling */
.network-header {
    position: static;
    background: transparent;
    box-shadow: none;
    padding: 0;
    backdrop-filter: none;
    max-width: none;
    z-index: auto;
}

    .network-header h1 {
        margin: 0 0 5px 0;
        font-size: 20px;
        font-weight: 600;
        color: var(--buttonBackgroundColor2) !important;
        line-height: 1.2;
    }

    .network-header .subtitle {
        margin: 0;
        font-size: 14px;
        color: #666;
        line-height: 1.3;
    }

/* Controls Styling */
.graph-controls {
    position: static;
/*    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);*/
/*    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);*/
    display: flex;
    flex-direction: row;
    gap: 8px;
    z-index: auto;
    visibility: visible;
/*    border: 1px solid #dee2e6;*/
}

    .graph-controls button {
        width: 40px;
        height: 40px;
        border: 1px solid #dee2e6;
        background: #fff;
        border-radius: 6px;
        cursor: pointer;
        font-size: 16px;
        font-weight: 600;
        color: #666;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }

        .graph-controls button:hover {
            background: #f8f9fa;
            color: #333;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            border-color: var(--buttonBackgroundColor2);
        }

    .graph-controls .center-btn {
        background: var(--buttonBackgroundColor2);
        color: white;
        border-color: var(--buttonBackgroundColor2);
    }

        .graph-controls .center-btn:hover {
            background: var(--buttonBackgroundColor2);
            color: white;
            border-color: var(--buttonBackgroundColor2);
        }

/* Node Info Panel - Positioned within graph area */
.node-info {
    position: absolute;
    top: 15px;
    right: 15px;
    background: white;
    border: 2px solid var(--buttonBackgroundColor2);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    max-width: 320px;
    min-width: 280px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: none;
    pointer-events: none;
    overflow: hidden;
}

/* Category Tags */
.category-tag {
    display: inline-block;
    background: #f8f9ff;
    color: var(--buttonBackgroundColor2);
    padding: 4px 10px;
    margin: 2px 4px 2px 0;
    border-radius: 15px;
    font-size: 11px;
    border: 1px solid #e6f0ff;
    font-weight: 500;
    transition: all 0.2s ease;
}

    .category-tag:hover {
        background: #e0e0e0;
        transform: translateY(-1px);
    }

#toggle-categories-btn {
    transition: color 0.2s ease;
}

    #toggle-categories-btn:hover {
        color: var(--buttonBackgroundColor2) !important;
        text-decoration: none !important;
    }

#node-categories-full {
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Loading */
.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 2000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--buttonBackgroundColor2);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

/* Fullscreen Styles */
.chart-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    background: white !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

    .chart-fullscreen #sigma-container {
        width: 100% !important;
        height: 100% !important;
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .chart-fullscreen .graph-controls {
        position: absolute !important;
        bottom: 20px !important;
        left: 20px !important;
        z-index: 10001 !important;
    }

    .chart-fullscreen .network-header {
        position: absolute !important;
        top: 20px !important;
        left: 20px !important;
        z-index: 10001 !important;
        background: rgba(255, 255, 255, 0.95) !important;
        border-radius: 8px !important;
        padding: 15px !important;
        box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
        backdrop-filter: blur(10px) !important;
    }

body.fullscreen-active {
    overflow: hidden !important;
}

/* Responsive */
@media (max-width: 768px) {
    .network-tab-container {
        height: 500px;
    }

    .network-header-section {
        height: 70px;
        padding: 10px 15px;
    }

    .network-controls-section {
        height: 60px;
        padding: 10px 15px;
    }

    .graph-controls button {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}

/* Fullscreen Styles - Keep same layout as normal view */
.chart-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    background: white !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 15px !important; /* Same padding as normal view */
    box-sizing: border-box !important;
}

    .chart-fullscreen .network-graph-container {
        width: 100% !important;
        height: 100% !important;
        position: relative !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
    }

    .chart-fullscreen #sigma-container {
        width: 100% !important;
        height: 100% !important;
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        margin: 10px 0 !important; /* Same margin as normal view */
        padding: 0 !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    /* Header positioning in fullscreen - same as normal view (top-left) */
    .chart-fullscreen .network-header {
        position: absolute !important;
        top: 25px !important; /* Same as normal view */
        left: 25px !important; /* Same as normal view */
        z-index: 10001 !important;
        background: rgba(255, 255, 255, 0.95) !important;
        border-radius: 8px !important;
        padding: 15px 25px !important; /* Same as normal view */
        box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
        backdrop-filter: blur(10px) !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        max-width: 400px !important; /* Same as normal view */
        text-align: left !important; /* Left align like normal view */
    }

        /* Keep header text same size as normal view */
        .chart-fullscreen .network-header h1 {
            font-size: 18px !important; /* Same as normal view */
            margin: 0 0 5px 0 !important;
        }

        .chart-fullscreen .network-header .subtitle {
            font-size: 14px !important; /* Same as normal view */
            margin: 0 !important;
        }

    /* Controls positioning in fullscreen - same as normal view (bottom-left) */
    .chart-fullscreen .graph-controls {
        position: absolute !important;
        bottom: 25px !important; /* Same as normal view */
        left: 25px !important; /* Same as normal view */
        z-index: 10001 !important;
        background: rgba(255, 255, 255, 0.95) !important;
        border-radius: 8px !important;
        padding: 12px !important; /* Same as normal view */
        box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
        backdrop-filter: blur(10px) !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        display: flex !important;
        flex-direction: row !important;
        gap: 10px !important; /* Same as normal view */
    }

        /* Keep button size same as normal view */
        .chart-fullscreen .graph-controls button {
            width: 42px !important; /* Same as normal view */
            height: 42px !important; /* Same as normal view */
            font-size: 16px !important; /* Same as normal view */
            border-radius: 6px !important;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
        }

    /* Node info positioning in fullscreen - top right like normal view */
    .chart-fullscreen .node-info {
        position: absolute !important;
        top: 25px !important; /* Same as normal view */
        right: 25px !important; /* Same as normal view */
        z-index: 10001 !important;
        background: white !important;
        border: 2px solid var(--buttonBackgroundColor2) !important;
        border-radius: 12px !important;
        padding: 15px !important; /* Same as normal view */
        box-shadow: 0 8px 32px rgba(0,0,0,0.15) !important;
        backdrop-filter: blur(10px) !important;
        max-width: 350px !important; /* Same as normal view */
        min-width: 300px !important; /* Same as normal view */
    }

/* Hide body scrollbars when in fullscreen */
body.fullscreen-active {
    overflow: hidden !important;
}

/* Unified tooltip styling for both parent and node tooltips */
.node-info,
#parent-company-tooltip {
    background: white !important;
    border: 2px solid var(--buttonBackgroundColor2) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15) !important;
    max-width: 350px !important;
    min-width: 300px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    backdrop-filter: blur(10px) !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

/* Ensure header styling is consistent */
.node-info-header {
    background: linear-gradient(135deg, var(--buttonBackgroundColor2) 0%, var(--buttonBackgroundColor2) 100%) !important;
    color: white !important;
    padding: 15px !important;
    border-radius: 8px 8px 0 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

/* Logo container styling */
#node-logo-container,
.tooltip-logo-container {
    width: 48px !important;
    height: 48px !important;
    border-radius: 12px !important;
    background: white !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
}

/* Company name styling */
#node-company,
.tooltip-company-name {
    margin: 0 !important;
    font-size: 18px !important;
    font-weight: bold !important;
    color: white !important;
}

/* Stats styling */
.tooltip-stats {
    display: flex !important;
    justify-content: space-around !important;
    margin-bottom: 20px !important;
    gap: 30px !important;
}

.tooltip-stat-item {
    text-align: center !important;
}

.tooltip-stat-value {
    font-size: 28px !important;
    font-weight: bold !important;
}

.tooltip-stat-label {
    font-size: 13px !important;
    color: #666 !important;
    margin-top: 4px !important;
}

/* Compressed spacing for node tooltip */
.node-info {
    padding: 10px !important; /* Reduced from 15px */
}

.node-info-header {
    padding: 10px !important; /* Reduced from 15px */
    gap: 8px !important; /* Reduced from 12px */
}

.tooltip-stats {
    margin-bottom: 12px !important; /* Reduced from 20px */
    gap: 20px !important; /* Reduced from 30px */
}

.tooltip-stat-value {
    font-size: 24px !important; /* Reduced from 28px */
}

/* Compress categories section */
#node-categories-container {
    margin-top: 8px !important; /* Reduced spacing */
}

.category-tag {
    margin: 2px !important; /* Reduced from default */
    padding: 4px 8px !important; /* Reduced padding */
    font-size: 12px !important; /* Smaller font */
}