body {
    margin: 0;
    padding: 0;
}

#map {
    position: absolute;
    top: 50px;
    bottom: 0;
    right: 0;
    left: 0;
}

body.wg-ticker-open #map {
    bottom: 40px;
}

h1 {
    text-align: center;
    margin-top: 10px;
    font-family: Arial, sans-serif;
}

#ticker {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    display: none;
    background-color: #f5f5f5;
    overflow: hidden;
    border-top: 1px solid #ccc;
}

body.wg-ticker-open #ticker {
    display: block;
}

#news-ticker {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    box-sizing: border-box;
}

#news-content {
    display: inline-block;
    padding-left: 100%;
    animation: none;
}

#news-ticker:hover #news-content {
    animation-play-state: paused;
}

#news-content a {
    margin-right: 10px;
    text-decoration: none;
    color: #333;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

#news-content a:hover {
    text-decoration: underline;
}

#news-content span.separator {
    margin-right: 10px;
    color: #666;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

#loading-counter {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-family: Arial, sans-serif;
    font-size: 16px;
    z-index: 1000;
    display: none;
}

.leaflet-control-layers-expanded {
    width: min(340px, calc(100vw - 80px));
    max-height: calc(100vh - 108px);
    overflow-y: auto;
    box-sizing: border-box;
}

.wg-layer-section {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #d8dadd;
    color: #202124;
    font-family: Arial, sans-serif;
}

.wg-layer-section-heading {
    padding: 2px 8px 8px;
    font-size: 14px;
    font-weight: 700;
}

.wg-layer-current {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}


.wg-layer-current-title {
    display: block;
    font-size: 15px;
    line-height: 1.25;
}

.wg-layer-current-description {
    margin: 5px 0 0;
    color: #5f6368;
    font-size: 12px;
    line-height: 1.4;
}

.wg-layer-groups {
    padding: 4px 0;
}

.wg-layer-group {
    border-bottom: 1px solid #edf0f2;
}

.wg-layer-group:last-child {
    border-bottom: 0;
}

.wg-layer-group > summary {
    position: relative;
    padding: 10px 32px 10px 12px;
    color: #34373b;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.wg-layer-group > summary::-webkit-details-marker {
    display: none;
}

.wg-layer-group > summary::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 14px;
    width: 7px;
    height: 7px;
    border-right: 1.5px solid #6b7280;
    border-bottom: 1.5px solid #6b7280;
    transform: translateY(-65%) rotate(45deg);
}

.wg-layer-group[open] > summary::after {
    transform: translateY(-25%) rotate(225deg);
}

.wg-layer-group > summary:hover,
.wg-layer-group > summary:focus-visible {
    background: #f7f8f9;
}

.wg-layer-list {
    padding: 0 8px 8px;
}

.wg-layer-option {
    min-height: 34px;
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    padding: 5px 6px;
    border-radius: 5px;
    font-size: 13px;
    line-height: 1.25;
    cursor: pointer;
}

.wg-layer-option:hover {
    background: #f3f4f5;
}

.wg-layer-option-checkbox {
    position: static;
    width: 16px;
    height: 16px;
    margin: 0;
    opacity: 1;
    pointer-events: auto;
    accent-color: #2f343a;
}

.wg-layer-option-label {
    min-width: 0;
}

.wg-legend {
    padding: 12px;
    border-top: 1px solid #e5e7eb;
}

.wg-legend-title {
    margin-bottom: 9px;
    color: #34373b;
    font-size: 12px;
    font-weight: 700;
}

.wg-legend-content {
    color: #4b5563;
    font-size: 12px;
}

.wg-legend-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 10px;
}

.wg-legend-item {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 7px;
}

.wg-legend-item > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wg-legend-swatch {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 2px;
    box-sizing: border-box;
}

.wg-legend-scale {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.wg-legend-gradient {
    height: 12px;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 3px;
}

.wg-legend-scale-labels {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-variant-numeric: tabular-nums;
}

.wg-legend-unit {
    margin-top: 3px;
    color: #7b8086;
    font-size: 10px;
    line-height: 1.3;
}

.wg-legend-palette {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 3px;
}

.wg-legend-palette-swatch {
    aspect-ratio: 1.65;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 2px;
}

.wg-live-control {
    margin-bottom: 10px;
}

.wg-live-control-button {
    min-width: 52px;
    height: 34px;
    padding: 0 10px;
    border: 0;
    background: #ffffff;
    color: #333333;
    font: 700 13px/34px Arial, sans-serif;
    cursor: pointer;
}

.wg-live-control-button:hover,
.wg-live-control-button:focus-visible {
    background: #f2f2f2;
    outline: none;
}

.wg-live-control-button.is-active {
    background: #333333;
    color: #ffffff;
}

.wg-strategic-network-overlay {
    pointer-events: none;
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

.leaflet-tile-pane .wg-satellite-tiles img {
    filter: grayscale(100%) brightness(90%);
}

@media (max-width: 720px) {
    .leaflet-control-layers-expanded {
        width: min(340px, calc(100vw - 72px));
        max-height: calc(100vh - 118px);
    }

    .wg-layer-current-description {
        font-size: 11px;
    }
}

@media (max-width: 460px) {
    .leaflet-control-layers-expanded {
        width: calc(100vw - 64px);
    }

    .wg-legend-list {
        grid-template-columns: 1fr;
    }
}

.wg-country-panel {
    position: absolute;
    top: 66px;
    left: 92px;
    z-index: 900;
    width: 320px;
    max-width: calc(100vw - 472px);
    max-height: calc(100vh - 124px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #b7b9bc;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    font-family: Arial, sans-serif;
    color: #202124;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-14px);
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.wg-country-panel.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
}

.wg-country-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 16px 14px;
    border-bottom: 1px solid #e1e3e6;
}

.wg-country-panel-heading {
    min-width: 0;
}

.wg-country-panel-title {
    margin: 0;
    font-size: 19px;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.wg-country-panel-capital {
    margin-top: 6px;
    color: #5f6368;
    font-size: 11px;
    line-height: 1.35;
}

.wg-country-panel-close {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: grid;
    place-items: center;
    margin: -5px -5px 0 0;
    padding: 0;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #4c5157;
    font: 28px/1 Arial, sans-serif;
    cursor: pointer;
}

.wg-country-panel-close:hover,
.wg-country-panel-close:focus-visible {
    background: #eef0f2;
    outline: none;
}

.wg-country-panel-content {
    min-height: 0;
    overflow-y: auto;
    padding: 4px 16px 16px;
}

.wg-country-panel-section {
    padding-top: 12px;
}

.wg-country-panel-section + .wg-country-panel-section {
    margin-top: 12px;
    border-top: 1px solid #eceef0;
}

.wg-country-panel-section-title {
    margin: 0 0 8px;
    color: #34373b;
    font-size: 13px;
    line-height: 1.3;
}

.wg-country-panel-data {
    margin: 0;
}

.wg-country-panel-row {
    display: grid;
    grid-template-columns: minmax(0, 44fr) minmax(0, 56fr);
    gap: 10px;
    padding: 4px 0;
}

.wg-country-panel-row dt,
.wg-country-panel-row dd {
    margin: 0;
    font-size: 10px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.wg-country-panel-row dt {
    color: #6b7076;
}

.wg-country-panel-row dd {
    color: #202124;
    font-weight: 600;
}

@media (max-width: 720px) {
    .wg-country-panel {
        top: auto;
        right: 0;
        bottom: 40px;
        left: 0;
        width: auto;
        max-width: none;
        max-height: min(52vh, 500px);
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 12px 12px 0 0;
        transform: translateY(calc(100% + 12px));
    }

    .wg-country-panel.is-open {
        transform: translateY(0);
    }

    .wg-country-panel-header {
        padding: 14px 16px 12px;
    }

    .wg-country-panel-title {
        font-size: 18px;
    }

    .wg-country-panel-content {
        padding-bottom: 14px;
    }
}


.wg-overlay-section {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #dddddd;
}

.wg-overlay-section-heading {
    margin: 0 0 10px;
    font: 700 16px/1.25 Arial, sans-serif;
    color: #222222;
}

.wg-overlay-group {
    border-top: 1px solid #e2e2e2;
}

.wg-overlay-group:last-child {
    border-bottom: 1px solid #e2e2e2;
}

.wg-overlay-group summary {
    padding: 10px 0;
    cursor: pointer;
    font: 700 14px/1.25 Arial, sans-serif;
    color: #333333;
}

.wg-overlay-list {
    display: grid;
    gap: 7px;
    padding: 0 0 10px;
}

.wg-overlay-option {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-height: 24px;
    font: 400 14px/1.25 Arial, sans-serif;
    color: #333333;
    cursor: pointer;
}

.wg-overlay-option-checkbox {
    width: 16px;
    height: 16px;
    margin: 0;
}

.wg-overlay-option-count {
    color: #777777;
    font-size: 12px;
}

.wg-overlay-icon-wrap {
    background: transparent;
    border: 0;
}

.wg-overlay-icon {
    display: flex;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border: 1px solid #222222;
    border-radius: 50%;
    font: 700 13px/1 Arial, sans-serif;
    color: #111111;
}

.wg-overlay-icon-light {
    background: #ffffff;
}

.wg-overlay-icon-red {
    background: #ff0000;
}

.wg-overlay-icon-green {
    background: #8cc63f;
}

@media (max-width: 460px) {
    h1 {
        font-size: clamp(22px, 7vw, 30px);
    }
}

.wg-base-tiles {
    filter: saturate(0.25) contrast(0.92) brightness(1.06);
}

.wg-country-panel-content {
    overscroll-behavior: contain;
}

.wg-country-panel-row dt::after {
    content: ":";
}


body.wg-embedded {
    overflow: hidden;
}

.wg-embedded #map {
    inset: 0;
}

.wg-embedded .wg-country-panel,
.wg-embedded .wg-country-panel.is-open {
    transform: none;
}

.wg-embedded .wg-country-panel {
    position: fixed;
    top: 12px;
    left: 54px;
    width: 225px;
    max-width: none;
    max-height: calc(100vh - 36px);
}

.wg-show-country-panel {
    position: absolute;
    z-index: 850;
    top: 12px;
    left: 54px;
    padding: 7px 10px;
    background: #fff;
    border: 1px solid #a3a3a3;
    border-radius: 4px;
    color: #202124;
    cursor: pointer;
}

@media (max-width: 600px) {
    .wg-embedded .wg-country-panel {
        top: auto;
        bottom: 18px;
        left: 0;
        width: auto;
        max-height: min(42vh, 230px);
    }
}

@media (min-width: 601px) and (max-width: 720px) {
    .wg-embedded .wg-country-panel {
        right: auto;
        bottom: auto;
        transform: none;
    }
}
