:root {
    --global-color-primary: #0c1a96;
    --global-color-secondary: #424242;
    --global-color-tertiary: #686560;
    --global-color-quaternary: #DFD0B8;
    --global-color-text: #7A7A7A;
    --global-color-accent: #61CE70;
    --global-color-black-main: #000000;
    --global-color-red-main: #ED2424;
    --global-color-red-main-dark: #b71c1c;
    --global-color-yellow-main: #FFF100;
    --global-color-green-main: #26A44E;
    --global-color-green-dark: #1c7a3a;
    --global-color-light-blue-main: #0AABF2;
    --global-color-purple-main: #6F3B92;
    --global-color-pink-main: #F61792;
    --global-color-orange-main: #ff5b00;
    --global-color-orange-main-dark: #cc4a00;
    --global-color-white: #ffffff;
    --global-color-grey-main: #444444;
}
/* For Tomtom Map */

.pulsing-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: var(--dot-color, red);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.pulsing-dot::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid var(--dot-color, red);
    border-radius: 50%;
    animation: pulse 2s infinite ease-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.marker-popup {
    min-width: 240px;
    max-width: min(340px, calc(100vw - 32px));
    font-family:
        system-ui,
        -apple-system,
        Segoe UI,
        Roboto,
        Arial,
        sans-serif;
    border-radius: 12px;
    padding: 12px;
    background: rgba(17, 18, 23, 0.96);
    color: #fff;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.marker-popup--connections {
    width: 320px;
}

.marker-popup__title-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 10px;
}

.marker-popup__top-actions {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.marker-popup__title {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.25;
    letter-spacing: 0;
    padding-top: 3px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.marker-popup__health {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.15;
    border: 1px solid rgba(255, 255, 255, 0.16);
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.marker-popup--connections .marker-popup__title-row {
    margin-bottom: 6px;
}

.marker-popup--connections .marker-popup__health {
    margin-bottom: 10px;
}

.marker-popup__health--ok {
    color: #bbf7d0;
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(34, 197, 94, 0.34);
}

.marker-popup__health--full {
    color: #ccfbf1;
    background: rgba(20, 184, 166, 0.2);
    border-color: rgba(20, 184, 166, 0.38);
}

.marker-popup__health--rooms {
    color: #bbf7d0;
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(34, 197, 94, 0.34);
}

.marker-popup__health--agent {
    color: #bae6fd;
    background: rgba(56, 189, 248, 0.18);
    border-color: rgba(56, 189, 248, 0.34);
}

.marker-popup__health--mixed-partial {
    color: #ddd6fe;
    background: rgba(167, 139, 250, 0.18);
    border-color: rgba(167, 139, 250, 0.34);
}

.marker-popup__health--all-rooms-devices-partial {
    color: #ede9fe;
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.38);
}

.marker-popup__health--desks {
    color: #fed7aa;
    background: rgba(249, 115, 22, 0.18);
    border-color: rgba(249, 115, 22, 0.34);
}

.marker-popup__health--partial {
    color: #fde68a;
    background: rgba(245, 158, 11, 0.18);
    border-color: rgba(245, 158, 11, 0.34);
}

.marker-popup__health--fail {
    color: #fecaca;
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.34);
}

.marker-popup__meta {
    font-size: 12px;
    opacity: 0.92;
    line-height: 1.35;
    display: grid;
    gap: 4px;
    padding: 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.marker-popup__stat {
    display: grid;
    grid-template-columns: minmax(96px, 0.78fr) minmax(0, 1fr);
    align-items: baseline;
    gap: 10px;
}

.marker-popup__stat-label {
    color: rgba(255, 255, 255, 0.62);
}

.marker-popup__stat-value {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 700;
    text-align: right;
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
}

.marker-popup__label {
    opacity: 0.75;
    margin-right: 6px;
}

.marker-popup__section {
    margin-top: 10px;
}

.marker-popup__section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.marker-popup__section-title {
    font-size: 12px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.92);
    text-transform: uppercase;
}

.marker-popup__section-summary {
    flex: 0 0 auto;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.66);
    font-variant-numeric: tabular-nums;
}

.marker-popup__summary-ok {
    color: #86efac;
    font-weight: 800;
}

.marker-popup__empty {
    color: rgba(255, 255, 255, 0.62);
    font-size: 12px;
    padding: 8px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.045);
}

.marker-popup__iplist {
    display: grid;
    gap: 5px;
    max-height: 150px;
    overflow-y: auto;
    padding-right: 2px;
}

.marker-popup__device-types {
    display: grid;
    gap: 6px;
}

.marker-popup__device-type {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 30px;
    padding: 6px 8px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.055);
    font-size: 12px;
}

.marker-popup__device-type--ok {
    background: rgba(34, 197, 94, 0.105);
    border-color: rgba(34, 197, 94, 0.18);
}

.marker-popup__device-type--partial {
    background: rgba(245, 158, 11, 0.105);
    border-color: rgba(245, 158, 11, 0.2);
}

.marker-popup__device-type--fail {
    background: rgba(239, 68, 68, 0.105);
    border-color: rgba(239, 68, 68, 0.18);
}

.marker-popup__device-label {
    min-width: 0;
    overflow-wrap: anywhere;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.9);
}

.marker-popup__device-count {
    flex: 0 0 auto;
    color: rgba(255, 255, 255, 0.72);
    font-variant-numeric: tabular-nums;
}

.marker-popup__device-count strong {
    color: #86efac;
}

.marker-popup__ip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 28px;
    padding: 5px 7px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.055);
    color: rgba(255, 255, 255, 0.92);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.marker-popup__ip--ok {
    background: rgba(34, 197, 94, 0.105);
}

.marker-popup__ip--fail {
    background: rgba(239, 68, 68, 0.105);
}

.marker-popup__ip--missing {
    background: rgba(148, 163, 184, 0.105);
}

.marker-popup__ip--stale {
    background: rgba(245, 158, 11, 0.105);
}

.marker-popup__ip-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.marker-popup__latency {
    color: rgba(255, 255, 255, 0.62);
    font-size: 11px;
}

.marker-popup__ipbadge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.marker-popup__ipbadge--ok {
    color: #052e16;
    background: #86efac;
}

.marker-popup__ipbadge--fail {
    color: #450a0a;
    background: #fca5a5;
}

.marker-popup__ipbadge--missing {
    color: #111827;
    background: #cbd5e1;
}

.marker-popup__ipbadge--stale {
    color: #451a03;
    background: #fcd34d;
}

.tt-refresh-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    font-size: 12.5px;
    user-select: none;
}

.tt-refresh-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.22);
}

.tt-refresh-btn:active {
    transform: translateY(0px) scale(0.98);
}

.tt-refresh-btn:focus {
    outline: none;
}

.tt-refresh-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.mapboxgl-popup-content {
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.tt-refresh-btn--icon {
    min-width: 28px;
    width: 28px;
    height: 28px;
    padding: 0;
    justify-content: center;
    gap: 0;
    border-radius: 9px;
}

.mapboxgl-popup-tip {
    border-top-color: rgba(17, 18, 23, 0.96) !important;
    border-bottom-color: rgba(17, 18, 23, 0.96) !important;
}

