body, html {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: #05060d;
    background-image: none;
    box-sizing: border-box;
}

* {
    box-sizing: inherit;
}

hr {
    border-color: rgb(255,255,255,0.1);
    width: 90%;
    margin: 5px 0px;
    padding: 0px;
    margin-left: auto;
    margin-right: auto;
}

#logo {
    width: 50px;
    height: 40px;
    background-image: url('/img/logo.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    display: inline-block;
    margin-right: 10px;
}

.statsDiv {
    color: #fff;
    margin: 10px 0px 0px 20px;
}

.chartDiv {
    max-width: 430px;
    width: 100%;
    max-height: 750px;
    margin: 0px 10px 0px 10px;
}

#sidebar-trigger {
    cursor: pointer;
    display: inline-flex;
}

#sidebar-close {
    color: #fff;
    padding: 5px;
    cursor: pointer;
    display: block;
    width: 40px;
    height: 35px;
}

#slider {
    background-color: rgba(7, 9, 26, 0.94);
}

#regionDonut {
    height: 250px;
    width: 100%;
    display: block;
}

#countryDonut {
    height: 500px;
    width: 100%;
    display: block;
}

.noscroll {
    overflow: hidden;
}

#nodeInfo {
    position: relative;
    white-space: pre;
}

#map-container {
    display: block;
    position: relative;
    width: 100%;
    height: calc(100% - 56px);
    height: calc(100dvh - 56px);
    vertical-align: top;
    overflow: hidden;
}

.svg-content {
    display: inline-block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#searchResults {
    cursor: pointer;
}

.land {
    fill: #18204a;
    stroke-opacity: 1;
}

.countries path {
    -webkit-transition: fill-opacity 50ms linear;
    -ms-transition: fill-opacity 50ms linear;
    transition: fill-opacity 50ms linear;
}

.countries path {
    stroke: rgba(59, 199, 255, 0.35);
    stroke-linejoin: round;
    stroke-width: 0.5;
    fill: #18204a;
    opacity: 1;
    fill-opacity: 1;
}

    .countries path:hover {
        fill-opacity: 0.3;
        stroke-width: 1.5;
        opacity: 1;
        fill: #1e30f3;
    }

.graticule {
    fill: none;
    stroke: white;
    stroke-width: 0.5;
    opacity: 0.2;
}

.noclicks {
    pointer-events: none;
}

.bubble {
    -webkit-transition: stroke 250ms linear;
    -ms-transition: stroke 250ms linear;
    transition: stroke 250ms linear;
}

    .bubble.invalid {
        stroke: #07091a;
        stroke-linejoin: round;
        stroke-width: .5;
        fill: #3a4166;
        opacity: .75;
    }

        .bubble.invalid:hover {
            stroke: #f4f6ff;
            stroke-linejoin: round;
            stroke-width: 1.5;
            fill: #3a4166;
            opacity: .75;
        }

    .bubble.valid {
        stroke: #07091a;
        stroke-linejoin: round;
        stroke-width: .5;
        fill: #39ff88;
        opacity: .75;
    }

        .bubble.valid:hover {
            stroke: #f4f6ff;
            stroke-linejoin: round;
            stroke-width: 1.5;
            fill: #39ff88;
            opacity: .75;
        }

.arc {
    stroke-width: 0.5;
    stroke-linecap: round;
    fill: none;
    stroke: #3bc7ff;
}

.d3-tip, .countryTip {
    transition: opacity .25s linear .25s;
    -webkit-transition: opacity .25s linear .25s;
    z-index: 10000;
}

.d3-tip, .countryTip {
    line-height: 1;
    font-weight: normal;
    padding: 12px;
    background: rgba(7, 9, 26, 0.94);
    border: 1px solid rgba(59, 199, 255, 0.28);
    color: #fff;
    border-radius: 5px;
    pointer-events: none;
}

    /* Creates a small triangle extender for the tooltip */
    .d3-tip:after, .countryTip:after {
        box-sizing: border-box;
        display: inline;
        font-size: 12px;
        width: 100%;
        line-height: 1;
        color: rgba(0, 0, 0, 0.8);
        position: absolute;
        pointer-events: none;
    }

    /* Northward tooltips */
    .d3-tip.n:after, .countryTip:after {
        content: "\25BC";
        margin: -1px 0 0 0;
        top: 100%;
        left: 0;
        text-align: center;
    }

    /* Eastward tooltips */
    .d3-tip.e:after {
        content: "\25C0";
        margin: -4px 0 0 0;
        top: 50%;
        left: -8px;
    }

    /* Southward tooltips */
    .d3-tip.s:after {
        content: "\25B2";
        margin: 0 0 1px 0;
        top: -8px;
        left: 0;
        text-align: center;
    }

    /* Westward tooltips */
    .d3-tip.w:after {
        content: "\25B6";
        margin: -4px 0 0 -1px;
        top: 50%;
        left: 100%;
    }

.divTableCell {
    display: table-cell;
    vertical-align: top;
    padding-right: 8px;
}

.divTableRow {
    display: table-row;
}

.divTableBody {
    display: table-row-group;
}

.divTable {
    display: table;
    width: 100%;
}

#statsNodeList {
    margin: 0 10px 20px 10px;
}

#statsNodeList .list-group-item {
    cursor: pointer;
}

#statsNodeList .node-meta {
    font-size: 12px;
    opacity: 0.85;
}

#nodeInfo {
    white-space: normal;
    font-family: inherit;
}

#statsConnectionList {
    margin: 0 10px 20px 10px;
}

#statsConnectionList .list-group-item {
    cursor: pointer;
}

#statsConnectionsHeading {
    margin-top: 8px;
}

.node-connections {
    margin: 10px 0 0 0;
}

.node-ok {
    color: #39ff88;
}

.node-lag {
    color: #ffc107;
}

.node-down {
    color: #888;
}

.node-ok-label {
    color: #39ff88;
    font-weight: 600;
    margin-left: 6px;
}

#info {
    padding: 12px 16px 24px 10px;
    overflow: auto;
}

.bubble.synced {
    stroke: #39ff88 !important;
}


body, html {
    color: #f4f6ff;
    font-family: "Inter", "Segoe UI", sans-serif;
}

.navbar,
.navbar.bg-dark {
    background-color: #07091a !important;
    border-bottom: 1px solid rgba(59, 199, 255, 0.28);
}

.navbar-brand {
    color: #f4f6ff !important;
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.btn-outline-success {
    color: #3bc7ff;
    border-color: #3bc7ff;
}

.btn-outline-success:hover,
.btn-outline-success:focus,
.btn-outline-success.active,
.btn-outline-success:not(:disabled):not(.disabled).active {
    color: #fff;
    background-color: #1e30f3;
    border-color: #1e30f3;
}

.nav-tabs {
    border-bottom-color: rgba(59, 199, 255, 0.18);
}

.nav-tabs .nav-link {
    color: #d5daf2;
}

.nav-tabs .nav-link:hover {
    color: #3bc7ff;
    border-color: rgba(59, 199, 255, 0.28);
}

.nav-tabs .nav-link.active {
    color: #3bc7ff;
    background-color: #10132b;
    border-color: rgba(59, 199, 255, 0.28);
}

.list-group-item {
    background-color: #10132b;
    color: #f4f6ff;
    border-color: rgba(59, 199, 255, 0.18);
}

.list-group-item:hover {
    background-color: #14183a;
}

.form-control,
#searchInput {
    background-color: #10132b;
    color: #f4f6ff;
    border-color: rgba(59, 199, 255, 0.28);
}

.statsDiv,
#nodeInfo,
#nodeInfoIntro {
    color: #f4f6ff;
}

.node-lag {
    color: #e21e80;
}


.pdc-nav {
    flex-wrap: nowrap;
    min-height: 56px;
    padding: 8px 12px;
    z-index: 20;
}

.pdc-nav .navbar-brand {
    min-width: 0;
}

@media (max-width: 700px) {
    .pdc-nav {
        padding: 6px 8px;
        padding-top: calc(6px + env(safe-area-inset-top, 0px));
        padding-left: calc(8px + env(safe-area-inset-left, 0px));
        padding-right: calc(8px + env(safe-area-inset-right, 0px));
    }

    #logo {
        width: 32px;
        height: 28px;
        margin-right: 6px;
        flex-shrink: 0;
    }

    .navbar-brand {
        font-size: 0.95rem;
        margin-right: 8px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .pdc-nav .btn {
        min-width: 40px;
        min-height: 40px;
        padding: 6px 8px;
    }

    .pdc-nav .btn-group.mr-2 {
        margin-right: 6px !important;
    }

    #map-container {
        height: calc(100dvh - 56px - env(safe-area-inset-top, 0px));
    }

    #slider {
        max-width: 100vw;
    }

    .nav-tabs {
        display: flex;
        width: 100%;
    }

    .nav-tabs .nav-item {
        flex: 1 1 0;
        text-align: center;
    }

    .nav-tabs .nav-link {
        width: 100%;
        padding: 10px 6px;
        font-size: 0.95rem;
    }

    .tab-pane.container {
        max-width: 100%;
        width: 100%;
        padding-left: 8px;
        padding-right: 8px;
    }

    .chartDiv {
        max-width: 100%;
        width: 100%;
        margin: 0;
    }

    #regionDonut,
    #countryDonut {
        width: 100% !important;
        max-width: 100%;
    }

    #regionDonut {
        height: 220px !important;
    }

    #countryDonut {
        height: 300px !important;
    }

    .statsDiv {
        margin: 12px 12px 0 12px;
    }

    #statsNodeList,
    #statsConnectionList {
        margin-left: 8px;
        margin-right: 8px;
    }

    .list-group-item {
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    #info {
        padding: 12px;
    }

    #stats,
    #info,
    #searchResultsContainer {
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 380px) {
    .navbar-brand {
        font-size: 0.9rem;
    }
}
