/* ============================================================
   THE ANOMALOUS ZONE
   Custom squaremap theme
   ============================================================ */

:root {
    /* Base */
    --az-bg: #0d1117;
    --az-surface: #161b22;

    /* Map control colors */
    --az-blue: #0d98ba;
    --az-blue-dark: #08677d;
    --az-blue-deep: #064b5c;
    --az-blue-bright: #11b5dc;

    /* Header colors */
    --az-header: #075985;
    --az-header-dark: #0c4a6e;
    --az-header-deep: #083b59;

    /* Text */
    --az-link: #58a6ff;
    --az-text: #c9d1d9;
    --az-text-bright: #f2f2f2;
    --az-text-muted: #8b949e;

    --az-border: #30363d;

    --az-header-height: 58px;
}


/* ============================================================
   PAGE
   ============================================================ */

html,
body {
    margin: 0;
    padding: 0;

    width: 100%;
    height: 100%;

    background: var(--az-bg);

    font-family: Arial, sans-serif;

    overflow: hidden;
}


/* ============================================================
   TOP BAR
   ============================================================ */

#az-header {
    position: fixed;

    top: 0;
    left: 0;
    right: 0;

    height: var(--az-header-height);

    display: flex;
    align-items: center;

    background: var(--az-header);

    border-bottom: 4px solid var(--az-header-dark);

    box-shadow:
        0 2px 0 var(--az-bg),
        0 5px 14px rgba(0, 0, 0, 0.45);

    z-index: 20000;
}


/* ============================================================
   LOGO
   ============================================================ */

#az-header .az-brand {
    height: 100%;

    display: flex;
    align-items: center;

    gap: 10px;

    padding: 0 18px;

    color: var(--az-text-bright);

    text-decoration: none;

    font-size: 18px;
    font-weight: bold;

    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}

#az-header .az-brand:hover {
    background: var(--az-header-dark);
}


#az-header .az-logo {
    width: 38px;
    height: 38px;

    object-fit: contain;

    border-radius: 8px;
}

.az-name {
    display: flex;
    align-items: center;

    gap: 0;

    white-space: nowrap;

    font-size: 18px;
    font-weight: bold;
}

.az-the {
    color: #ff0000;
}


/* ANOMALOUS */

.az-a1 {
    color: #00226b;
}

.az-n1 {
    color: #003f9b;
}

.az-o1 {
    color: #0057ca;
}

.az-m {
    color: #006fe6;
}

.az-a2 {
    color: #0091ff;
}

.az-l {
    color: #00aaff;
}

.az-o2 {
    color: #00c5ff;
}

.az-u {
    color: #00e1ff;
}

.az-s {
    color: #00ffff;
}


/* ZONE */

.az-z {
    color: #00e1ff;
}

.az-o3 {
    color: #00c5ff;
}

.az-n2 {
    color: #00aaff;
}

.az-e {
    color: #0091ff;
}

#sidebar fieldset#players a.server-owner {
    color: #0d98ba !important;

    font-weight: 900 !important;

    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.9),
        0 0 3px rgba(0, 0, 0, 0.7);
}


/* Player nameplate on map */
div.leaflet-nameplate-pane > div.server-owner-nameplate {
    color: #0d98ba !important;

    font-weight: 900 !important;

    text-shadow:
        0 1px 2px rgba(0, 0, 0, 1),
        0 0 3px rgba(0, 0, 0, 0.8);
}


/* ============================================================
   NAVIGATION
   ============================================================ */

#az-header nav {
    display: flex;

    align-self: stretch;

    margin-left: 12px;
}

#az-header nav a {
    display: flex;
    align-items: center;

    padding: 0 18px;

    color: var(--az-text-bright);

    text-decoration: none;

    font-size: 15px;
    font-weight: bold;

    border-left:
        1px solid rgba(255, 255, 255, 0.15);

    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}

#az-header nav a:hover {
    background: var(--az-header-dark);
}

#az-header nav a.active {
    background: var(--az-header-deep);
}


/* ============================================================
   SERVER IP BUTTON
   ============================================================ */

.server-ip {
    margin-left: auto;
    margin-right: 16px;

    min-width: 165px;

    padding: 5px 14px;

    background: var(--az-header-deep);

    color: var(--az-text-bright);

    border: 2px solid var(--az-header-dark);
    border-radius: 10px;

    box-shadow:
        0 0 0 2px rgba(13, 17, 23, 0.45),
        0 3px 7px rgba(0, 0, 0, 0.25);

    font-family: Arial, sans-serif;

    cursor: pointer;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.1s ease;
}


.server-ip:hover {
    background: var(--az-header-dark);

    border-color: var(--az-blue-bright);

    box-shadow:
        0 0 0 2px rgba(13, 17, 23, 0.55),
        0 4px 9px rgba(0, 0, 0, 0.35);
}


.server-ip:active {
    background: var(--az-header-deep);

    transform: translateY(1px);
}


.server-ip.copied {
    background: var(--az-blue-dark);

    border-color: var(--az-blue-bright);
}


.server-label {
    display: block;

    color: var(--az-text-bright);

    font-size: 12px;
    font-weight: bold;

    line-height: 17px;

    text-align: center;

    white-space: nowrap;
}
.server-label br + * {
    font-size: 13px;
}


/* ============================================================
   MAP
   ============================================================ */

#map {
    position: absolute;

    top: var(--az-header-height);
    left: 0;

    width: 100%;
    height: calc(100vh - var(--az-header-height));

    background: #000;
}

.leaflet-bar,
.leaflet-control-layers {
    background: var(--az-blue) !important;

    border:
        3px solid var(--az-blue-dark) !important;

    border-radius: 12px !important;

    box-shadow:
        0 0 0 2px var(--az-bg),
        0 4px 10px rgba(0, 0, 0, 0.45) !important;

    overflow: hidden;
}


/* ============================================================
   ZOOM BUTTONS
   ============================================================ */

.leaflet-bar a {
    width: 36px !important;
    height: 36px !important;

    line-height: 36px !important;

    background: var(--az-blue) !important;

    color: var(--az-text-bright) !important;

    border: none !important;

    border-bottom:
        2px solid var(--az-blue-dark) !important;

    font-family: Arial, sans-serif !important;

    font-weight: bold;

    transition:
        background-color 0.15s ease,
        color 0.15s ease,
        transform 0.1s ease;
}

.leaflet-bar a:hover,
.leaflet-bar a:focus {
    background: var(--az-blue-dark) !important;

    color: #ffffff !important;
}

.leaflet-bar a:active {
    background: var(--az-blue-deep) !important;
}

.leaflet-bar a:last-child {
    border-bottom: none !important;
}


/* ============================================================
   LAYER BUTTON
   ============================================================ */

.leaflet-control-layers-toggle {
    width: 40px !important;
    height: 40px !important;

    background-color: var(--az-blue) !important;

    transition:
        background-color 0.15s ease;
}

.leaflet-control-layers-toggle:hover {
    background-color:
        var(--az-blue-dark) !important;
}


.leaflet-control-layers-expanded {
    background:
        rgba(13, 17, 23, 0.96) !important;

    color:
        var(--az-text) !important;

    border:
        3px solid var(--az-blue-dark) !important;

    border-radius:
        12px !important;

    padding:
        10px !important;

    box-shadow:
        0 0 0 2px var(--az-bg),
        0 5px 15px rgba(0, 0, 0, 0.5) !important;
}


.leaflet-control-layers-separator {
    border-top-color:
        var(--az-border) !important;
}


/* ============================================================
   RIGHT SIDEBAR
   ============================================================ */

#sidebar {
    top:
        var(--az-header-height) !important;

    height:
        calc(100vh - var(--az-header-height)) !important;

    background:
        rgba(8, 55, 85, 0.62) !important;

    color:
        var(--az-text-bright) !important;

    border-left:
        4px solid rgba(13, 100, 160, 0.88) !important;

    box-shadow:
        -2px 0 0 rgba(13, 17, 23, 0.75),
        -6px 0 16px rgba(0, 0, 0, 0.35);

    backdrop-filter:
        blur(3px);

    -webkit-backdrop-filter:
        blur(3px);

    font-family:
        Arial, sans-serif !important;
}


#sidebar.show {
    width:
        240px !important;
}


#sidebar fieldset {
    border:
        none !important;

    border-top:
        2px solid rgba(242, 242, 242, 0.25) !important;
}


#sidebar fieldset#worlds {
    margin-top:
        -15px !important;
}


#sidebar legend {
    color:
        var(--az-text-bright);

    font-size:
        13px;

    font-weight:
        bold;

    padding:
        0 5px;

    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.5);
}


#sidebar fieldset a,
#sidebar fieldset a:visited {
    color:
        var(--az-text-bright) !important;

    margin:
        2px 0 2px 6px;

    border-radius:
        10px 0 0 10px;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease;
}


#sidebar fieldset a:hover {
    background:
        rgba(12, 74, 110, 0.85) !important;
}


#sidebar fieldset a.following {
    background:
        rgba(8, 59, 89, 0.9) !important;

    border-left:
        4px solid var(--az-blue-bright);

    padding-left:
        6px !important;
}


#sidebar fieldset a.following:hover {
    background:
        rgba(6, 75, 92, 0.95) !important;
}


#sidebar fieldset a .other-world {
    opacity:
        0.55;
}


/* ============================================================
   SIDEBAR PIN BUTTON
   ============================================================ */

#sidebar #pin {
    border-radius:
        8px;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease;
}


#sidebar #pin.pinned:hover,
#sidebar #pin.unpinned:hover {
    background:
        var(--az-header-dark) !important;

    border:
        1px solid var(--az-blue-bright) !important;
}


/* ============================================================
   COORDINATES + LINK CONTROLS
   ============================================================ */

.leaflet-bottom.leaflet-left .coordinates,
.leaflet-bottom.leaflet-left .link {
    background:
        var(--az-blue) !important;

    color:
        var(--az-text-bright) !important;

    border:
        3px solid var(--az-blue-dark) !important;

    border-radius:
        10px !important;

    box-shadow:
        0 0 0 2px var(--az-bg),
        0 3px 8px rgba(0, 0, 0, 0.4) !important;
}


div.leaflet-control-layers.coordinates {
    height:
        auto !important;

    padding:
        5px 8px !important;

    line-height:
        14px;

    font-family:
        Arial, sans-serif;
}


/* ============================================================
   POPUPS
   ============================================================ */

.leaflet-popup-content-wrapper {
    background:
        var(--az-bg) !important;

    color:
        var(--az-text) !important;

    border:
        3px solid var(--az-blue-dark);

    border-radius:
        15px !important;

    box-shadow:
        0 0 0 2px rgba(13, 152, 186, 0.25),
        0 5px 18px rgba(0, 0, 0, 0.55) !important;
}


.leaflet-popup-tip {
    background:
        var(--az-bg) !important;
}


.leaflet-popup-content a {
    color:
        var(--az-link) !important;
}


.leaflet-container a.leaflet-popup-close-button {
    color:
        var(--az-text-muted) !important;
}


.leaflet-container a.leaflet-popup-close-button:hover {
    color:
        var(--az-blue-bright) !important;
}


/* ============================================================
   PLAYER NAMEPLATES
   ============================================================ */

div.leaflet-nameplate-pane > div {
    background:
        rgba(13, 17, 23, 0.9) !important;

    color:
        var(--az-text-bright) !important;

    border:
        2px solid var(--az-blue-dark) !important;

    border-radius:
        8px !important;

    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.45);
}


/* ============================================================
   SIDEBAR SCROLLBAR
   ============================================================ */

#sidebar fieldset#players::-webkit-scrollbar {
    width:
        8px;
}


#sidebar fieldset#players::-webkit-scrollbar-track {
    background:
        transparent;
}


#sidebar fieldset#players::-webkit-scrollbar-thumb {
    background:
        rgba(13, 152, 186, 0.75);

    border:
        none;

    border-radius:
        10px;
}


#sidebar fieldset#players::-webkit-scrollbar-thumb:hover {
    background:
        var(--az-blue-dark);
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 650px) {

    :root {
        --az-header-height: 52px;
    }


    #az-header .az-brand {
        padding:
            0 10px;

        font-size:
            15px;
    }


    #az-header .az-logo {
        width:
            32px;

        height:
            32px;
    }


.az-name {
    display: flex;
    align-items: center;
    gap: 0;
    white-space: nowrap;

    font-size: 18px;
    font-weight: bold;

    -webkit-text-stroke: 0.5px white;
}


    #az-header nav {
        margin-left:
            auto;
    }


    #az-header nav a {
        padding:
            0 10px;

        font-size:
            13px;
    }


    .server-ip {
        min-width:
            auto;

        margin-right:
            8px;

        padding:
            4px 8px;
    }


    .server-label {
        font-size:
            10px;

        line-height:
            14px;
    }


    #sidebar.show {
        width:
            210px !important;
    }
}

/* ============================================================
   SQUAREMARKER CAPITAL HOVER TOOLTIPS
   ============================================================ */

.leaflet-pane.leaflet-tooltip-pane .leaflet-tooltip {
    background: rgba(8, 55, 85, 0.95) !important;
    color: #ffffff !important;

    border: 1px solid #0d98ba !important;
    border-radius: 4px !important;

    padding: 4px 7px !important;

    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 12px !important;
    font-weight: 700 !important;

    line-height: 1.25 !important;
    text-align: center !important;

    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.9),
        0 0 3px rgba(0, 0, 0, 0.7) !important;
}

.leaflet-pane.leaflet-tooltip-pane .leaflet-tooltip-top::before {
    border-top-color: #0d98ba !important;
}

.leaflet-pane.leaflet-tooltip-pane .leaflet-tooltip-bottom::before {
    border-bottom-color: #0d98ba !important;
}

.leaflet-pane.leaflet-tooltip-pane .leaflet-tooltip-left::before {
    border-left-color: #0d98ba !important;
}

.leaflet-pane.leaflet-tooltip-pane .leaflet-tooltip-right::before {
    border-right-color: #0d98ba !important;
}

.leaflet-pane.leaflet-tooltip-pane .leaflet-tooltip * {
    color: inherit !important;
}
