/**
 * NetworkTraffic - Custom Styles
 */

/* Chart containers */
.chart-lg {
    position: relative;
    height: 220px;
}

.chart-sm {
    position: relative;
    height: 180px;
}

/* Navbar background */
.navbar {
    background-color: #1b2a4a;
}

.navbar .navbar-brand,
.navbar .nav-link,
.navbar .text-reset,
.navbar .text-muted {
    color: rgba(255, 255, 255, 0.85) !important;
}

.navbar .text-muted {
    color: rgba(255, 255, 255, 0.55) !important;
}

.navbar .dropdown-menu {
    background-color: #fff;
}

.navbar .dropdown-item {
    color: #1e293b;
}

/* Tabs */
.nav-tabs-custom {
    border-bottom: 2px solid #e6e8eb;
    margin-bottom: 1.5rem;
}

.nav-tabs-custom .nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1.25rem;
    color: #626976;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
}

.nav-tabs-custom .nav-link:hover {
    color: #206bc4;
    border-bottom-color: rgba(32, 107, 196, 0.3);
}

.nav-tabs-custom .nav-link.active {
    color: #206bc4;
    border-bottom-color: #206bc4;
    background: transparent;
}

.tab-content > .tab-pane {
    display: none;
}

.tab-content > .tab-pane.active {
    display: block;
}

/* KPI cards */
.card .subheader {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #626976;
}

.card .h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Top table rank column */
#topTable td:first-child {
    font-weight: 700;
    color: #206bc4;
}

/* Countdown badge */
#refreshCountdown {
    font-weight: 600;
}

/* Login page centering */
.page-center {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ─── Connections Analysis Section ─────────────────────────── */

/* Filters bar */
.connections-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
}

.connections-filter-item {
    flex: 0 0 auto;
    min-width: 140px;
}

.connections-filter-search {
    flex: 1 1 200px;
    min-width: 200px;
}

.connections-filter-btn {
    min-width: 100px;
    flex: 0 0 100px;
}

/* Country badge */
.conn-country-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.5rem;
    font-size: 0.85rem;
    background-color: rgba(32, 107, 196, 0.08);
    border-radius: 4px;
    white-space: nowrap;
}

/* Top panels - scrollable, show 3 rows */
.top-panel-scroll {
    max-height: 145px;
    overflow-y: auto;
    overflow-x: hidden;
}

.top-panel-scroll::-webkit-scrollbar {
    width: 4px;
}

.top-panel-scroll::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

.top-panel-scroll .table-sm td,
.top-panel-scroll .table-sm th {
    padding: 0.4rem 0.5rem;
    font-size: 0.82rem;
}

/* Application badge */
.conn-app-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-weight: 500;
    background-color: rgba(114, 57, 234, 0.08);
    border-radius: 4px;
    white-space: nowrap;
    color: #7239ea;
}

/* Striped + hover tables (connections) */
.table-striped tbody tr:nth-child(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table-hover tbody tr:hover {
    background-color: rgba(32, 107, 196, 0.06);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .chart-lg {
        height: 180px;
    }

    .chart-sm {
        height: 150px;
    }

    .card .h1 {
        font-size: 1.25rem;
    }

    .navbar-brand {
        font-size: 1rem;
    }

    .connections-filters {
        flex-direction: column;
    }

    .connections-filter-item {
        width: 100%;
    }

    .connections-filter-btn {
        flex: 0 0 auto;
        min-width: auto;
    }
}

/* Footer */
.footer {
    margin-top: auto;
}

/* Navbar icon styling */
.navbar-brand .icon-lg {
    width: 32px;
    height: 32px;
}
