/* =========================================
   HEADER IZNAD MAPE
========================================= */

.header {
    position: relative;
    z-index: 2000;
}

.language {
    position: relative;
    z-index: 2100;
}

.language-menu {
    z-index: 2200;
}
/* =========================================
   MAPA
========================================= */

.map-wrapper {
    position: absolute;
    top: 65px;
    bottom: 78px;
    left: 0;
    right: 0;

    overflow: hidden;

    background: #070a0f;
}


/* =========================================
   LEAFLET MAP
========================================= */

#map {
    width: 100%;
    height: 100%;

    background:
        radial-gradient(
            circle at 50% 35%,
            rgba(0,229,255,.05),
            transparent 45%
        ),
        #070a0f;
}

.leaflet-container {
    width: 100%;
    height: 100%;

    font-family: 'Rajdhani', sans-serif;

    background: #070a0f;
}


/* =========================================
   LEAFLET ATTRIBUTION
========================================= */

.leaflet-control-attribution {
    background: rgba(7,10,15,.78) !important;

    color: #65717e !important;

    font-family: 'Rajdhani', sans-serif;
    font-size: 9px;

    border-radius: 7px 0 0 0;

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.leaflet-control-attribution a {
    color: #00e5ff !important;
}


/* =========================================
   ZOOM
========================================= */

.leaflet-control-zoom {
    margin-top: 12px !important;
    margin-left: 12px !important;

    overflow: hidden;

    border: 1px solid rgba(255,255,255,.08) !important;
    border-radius: 11px !important;

    box-shadow:
        0 10px 25px rgba(0,0,0,.35) !important;
}

.leaflet-control-zoom a {
    width: 36px !important;
    height: 36px !important;

    line-height: 36px !important;

    color: #dce5ec !important;

    background: rgba(8,11,16,.92) !important;

    border: none !important;

    font-family: 'Rajdhani', sans-serif;
    font-size: 20px !important;

    transition:
        background .18s ease,
        color .18s ease;
}

.leaflet-control-zoom a + a {
    border-top:
        1px solid rgba(255,255,255,.07) !important;
}

@media (hover:hover) {

    .leaflet-control-zoom a:hover {
        color: #00e5ff !important;

        background:
            rgba(0,229,255,.08) !important;
    }

}


/* =========================================
   COUNTRY POPUP
========================================= */

.country-popup {

    position: absolute;

    left: 50%;
    bottom: 14px;

    transform:
        translate(-50%, 20px)
        scale(.96);

    width: calc(100% - 24px);
    max-width: 390px;

    max-height: calc(100% - 28px);

    overflow-y: auto;
    overflow-x: hidden;

    padding: 15px;

    z-index: 1000;

    color: #fff;

    background:
        linear-gradient(
            145deg,
            rgba(17,24,33,.97),
            rgba(7,11,17,.98)
        );

    border:
        1px solid rgba(0,229,255,.15);

    border-radius: 18px;

    box-shadow:
        0 25px 70px rgba(0,0,0,.70),
        0 0 35px rgba(0,229,255,.07);

    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

    transition:
        opacity .2s ease,
        transform .2s ease,
        visibility .2s ease;

    font-family: 'Rajdhani', sans-serif;

    scrollbar-width: none;
}

.country-popup::-webkit-scrollbar {
    display: none;
}


/* =========================================
   POPUP SHOW
========================================= */

.country-popup.show {

    opacity: 1;

    visibility: visible;

    pointer-events: auto;

    transform:
        translate(-50%, 0)
        scale(1);
}


/* =========================================
   POPUP TOP
========================================= */

.popup-top {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 10px;

    padding-bottom: 11px;

    border-bottom:
        1px solid rgba(255,255,255,.07);
}


/* =========================================
   POPUP TITLE
========================================= */

.popup-title {

    display: flex;

    align-items: center;

    gap: 11px;

    min-width: 0;
}


/* =========================================
   POPUP FLAG / ICON
========================================= */

.popup-flag {

    width: 40px;
    height: 40px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background:
        linear-gradient(
            145deg,
            rgba(0,229,255,.12),
            rgba(0,229,255,.035)
        );

    border:
        1px solid rgba(0,229,255,.22);

    color: #00e5ff;

    font-size: 17px;

    box-shadow:
        0 0 18px rgba(0,229,255,.08),
        inset 0 0 15px rgba(0,229,255,.03);
}


/* =========================================
   POPUP COUNTRY INFO
========================================= */

.popup-country-info {
    min-width: 0;
}


/* =========================================
   POPUP NAME
========================================= */

.popup-name {

    color: #ffffff;

    font-size: 20px;

    font-weight: 700;

    line-height: 1;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


/* =========================================
   POPUP CODE LINE
========================================= */

.popup-code-line {

    display: flex;

    align-items: center;

    gap: 5px;

    margin-top: 4px;
}

.popup-code {

    color: #00e5ff;

    font-size: 9px;

    font-weight: 700;

    letter-spacing: 1.5px;
}

.popup-dot {

    color: #3e4853;

    font-size: 9px;
}

.popup-territory {

    color: #697481;

    font-size: 8px;

    font-weight: 600;

    letter-spacing: 1.2px;
}


/* =========================================
   POPUP CLOSE
========================================= */

.popup-close {

    width: 31px;
    height: 31px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border: 1px solid rgba(255,255,255,.06);

    border-radius: 9px;

    color: #697481;

    background:
        rgba(255,255,255,.035);

    cursor: pointer;

    transition:
        color .18s ease,
        background .18s ease,
        border-color .18s ease,
        transform .12s ease;
}

.popup-close i {
    font-size: 14px;
}

@media (hover:hover) {

    .popup-close:hover {

        color: #00e5ff;

        background:
            rgba(0,229,255,.08);

        border-color:
            rgba(0,229,255,.18);
    }

}

.popup-close:active {
    transform: scale(.9);
}


/* =========================================
   POPUP STATUS
========================================= */

.popup-status {

    position: relative;

    display: flex;

    align-items: center;

    gap: 9px;

    margin-top: 11px;

    padding: 9px 10px;

    overflow: hidden;

    border-radius: 10px;

    color: #00e676;

    background:
        linear-gradient(
            90deg,
            rgba(0,230,118,.075),
            rgba(0,230,118,.025)
        );

    border:
        1px solid rgba(0,230,118,.13);
}

.popup-status-icon {

    width: 27px;
    height: 27px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 8px;

    background:
        rgba(0,230,118,.09);

    color: #00e676;
}

.popup-status-icon i {
    font-size: 12px;
}

.popup-status-content {
    min-width: 0;
}

.popup-status-small {

    color: #65717e;

    font-size: 7px;

    font-weight: 700;

    letter-spacing: 1.2px;

    line-height: 1;
}

.popup-status-content > span {

    display: block;

    margin-top: 3px;

    color: #00e676;

    font-size: 11px;

    font-weight: 700;

    letter-spacing: .5px;
}

.popup-status-scan {

    position: absolute;

    top: 0;
    bottom: 0;
    right: -30px;

    width: 45px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(0,230,118,.09),
            transparent
        );

    transform: skewX(-20deg);

    animation:
        statusScan 3s ease-in-out infinite;
}

@keyframes statusScan {

    0% {
        right: -60px;
    }

    45% {
        right: 110%;
    }

    100% {
        right: 110%;
    }

}


/* =========================================
   STATUS - ATTACKED
========================================= */

.popup-status.attacked {

    color: #ff1744;

    background:
        linear-gradient(
            90deg,
            rgba(255,23,68,.10),
            rgba(255,23,68,.025)
        );

    border-color:
        rgba(255,23,68,.20);
}

.popup-status.attacked .popup-status-icon {

    color: #ff1744;

    background:
        rgba(255,23,68,.10);
}

.popup-status.attacked .popup-status-content > span {
    color: #ff1744;
}

.popup-status.attacked .popup-status-scan {

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255,23,68,.10),
            transparent
        );
}


/* =========================================
   STATUS - OCCUPIED
========================================= */

.popup-status.occupied {

    color: #ffd84a;

    background:
        linear-gradient(
            90deg,
            rgba(255,216,74,.085),
            rgba(255,216,74,.025)
        );

    border-color:
        rgba(255,216,74,.16);
}

.popup-status.occupied .popup-status-icon {

    color: #ffd84a;

    background:
        rgba(255,216,74,.09);
}

.popup-status.occupied .popup-status-content > span {
    color: #ffd84a;
}

.popup-status.occupied .popup-status-scan {

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255,216,74,.09),
            transparent
        );
}


/* =========================================
   STATUS - INACTIVE
========================================= */

.popup-status.inactive {

    color: #697481;

    background:
        linear-gradient(
            90deg,
            rgba(105,116,129,.07),
            rgba(105,116,129,.025)
        );

    border-color:
        rgba(105,116,129,.12);
}

.popup-status.inactive .popup-status-icon {

    color: #697481;

    background:
        rgba(105,116,129,.08);
}

.popup-status.inactive .popup-status-content > span {
    color: #87919c;
}


/* =========================================
   POPUP CLUB
========================================= */

.popup-club {

    display: none;

    align-items: center;

    gap: 10px;

    margin-top: 9px;

    padding: 9px 10px;

    border-radius: 10px;

    background:
        linear-gradient(
            90deg,
            rgba(0,229,255,.055),
            rgba(255,255,255,.018)
        );

    border:
        1px solid rgba(0,229,255,.10);
}

.popup-club.show {
    display: flex;
}


/* =========================================
   CLUB COLOR
========================================= */

.club-color {

    width: 30px;
    height: 30px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 8px;

    background: #00e5ff;

    color: #070a0f;

    box-shadow:
        0 0 12px currentColor;
}

.club-color i {
    font-size: 13px;
}


/* =========================================
   CLUB INFO
========================================= */

.club-info {

    min-width: 0;

    flex: 1;
}

.club-label {

    color: #65717e;

    font-size: 7px;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 1px;
}

.club-name {

    margin-top: 2px;

    color: #dce5ec;

    font-size: 13px;

    font-weight: 600;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


/* =========================================
   CLUB ARROW
========================================= */

.club-arrow {

    width: 25px;
    height: 25px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    color: #4e5965;

    border-radius: 7px;

    background:
        rgba(255,255,255,.035);
}

.club-arrow i {
    font-size: 9px;
}


/* =========================================
   POPUP SECTION TITLE
========================================= */

.popup-section-title {

    display: flex;

    align-items: center;

    gap: 7px;

    margin-top: 13px;

    color: #697481;

    font-size: 8px;

    font-weight: 700;

    letter-spacing: 1.2px;
}

.popup-section-title > i {

    color: #00e5ff;

    font-size: 10px;
}

.popup-section-line {

    flex: 1;

    height: 1px;

    margin-left: 3px;

    background:
        linear-gradient(
            90deg,
            rgba(0,229,255,.16),
            transparent
        );
}


/* =========================================
   POPUP GRID
========================================= */

.popup-grid {

    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 7px;

    margin-top: 8px;
}


/* =========================================
   POPUP STAT
========================================= */

.popup-stat {

    position: relative;

    display: flex;

    align-items: center;

    gap: 8px;

    min-height: 51px;

    padding: 8px 9px;

    border-radius: 10px;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.045),
            rgba(255,255,255,.018)
        );

    border:
        1px solid rgba(255,255,255,.055);

    overflow: hidden;

    transition:
        border-color .18s ease,
        background .18s ease;
}

.popup-stat::after {

    content: "";

    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(0,229,255,.10),
            transparent
        );
}


/* =========================================
   POPUP STAT ICON
========================================= */

.popup-stat-icon {

    width: 29px;
    height: 29px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 8px;

    font-size: 12px;
}

.popup-stat-icon.hospital {

    color: #ff4d6d;

    background:
        rgba(255,77,109,.09);
}

.popup-stat-icon.wall {

    color: #9c7cff;

    background:
        rgba(156,124,255,.09);
}

.popup-stat-icon.attacked {

    color: #ff1744;

    background:
        rgba(255,23,68,.09);
}

.popup-stat-icon.active {

    color: #00e676;

    background:
        rgba(0,230,118,.09);
}


/* =========================================
   POPUP STAT CONTENT
========================================= */

.popup-stat-content {

    min-width: 0;

    flex: 1;
}

.popup-stat-label {

    color: #697481;

    font-size: 7px;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: .8px;

    white-space: nowrap;
}

.popup-stat-value {

    margin-top: 2px;

    color: #dce5ec;

    font-size: 12px;

    font-weight: 700;

    line-height: 1.1;
}

.popup-stat-unit {

    align-self: flex-end;

    margin-bottom: 1px;

    color: #4f5a66;

    font-size: 7px;

    font-weight: 700;

    letter-spacing: .6px;
}


/* =========================================
   BATTLE INFO
========================================= */

.popup-battle-info {

    display: flex;

    align-items: center;

    gap: 9px;

    margin-top: 9px;

    padding: 9px 10px;

    border-radius: 10px;

    background:
        linear-gradient(
            90deg,
            rgba(255,23,68,.055),
            rgba(255,216,74,.025)
        );

    border:
        1px solid rgba(255,23,68,.09);
}

.battle-icon {

    width: 28px;
    height: 28px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 8px;

    color: #ff1744;

    background:
        rgba(255,23,68,.09);

    box-shadow:
        0 0 10px rgba(255,23,68,.05);
}

.battle-icon i {
    font-size: 12px;
}

.battle-content {
    min-width: 0;
}

.battle-title {

    color: #697481;

    font-size: 7px;

    font-weight: 700;

    letter-spacing: 1px;
}

.battle-text {

    margin-top: 2px;

    color: #c5ced7;

    font-size: 10px;

    font-weight: 500;

    line-height: 1.25;
}


/* =========================================
   POPUP DESCRIPTION
========================================= */

.popup-description-wrap {

    display: flex;

    align-items: flex-start;

    gap: 9px;

    margin-top: 10px;

    padding-top: 10px;

    border-top:
        1px solid rgba(255,255,255,.06);
}

.popup-description-icon {

    width: 26px;
    height: 26px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 7px;

    color: #00e5ff;

    background:
        rgba(0,229,255,.06);
}

.popup-description-icon i {
    font-size: 11px;
}

.popup-description {

    margin: 0;

    color: #7e8996;

    font-size: 10px;

    line-height: 1.4;
}


/* =========================================
   POPUP FOOTER
========================================= */

.popup-footer {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 10px;

    margin-top: 11px;

    padding-top: 9px;

    border-top:
        1px solid rgba(255,255,255,.05);

    color: #4f5a66;

    font-size: 7px;

    font-weight: 700;

    letter-spacing: 1px;
}

.popup-footer-left {

    display: flex;

    align-items: center;

    gap: 5px;
}

.popup-footer-left i {

    color: #00e5ff;

    font-size: 9px;
}

.popup-footer-right {

    display: flex;

    align-items: center;

    gap: 5px;

    color: #65717e;
}

.intel-dot {

    width: 5px;
    height: 5px;

    border-radius: 50%;

    background: #00e676;

    box-shadow:
        0 0 7px rgba(0,230,118,.7);
}


/* =========================================
   INACTIVE POPUP
========================================= */

.country-popup.inactive-popup {

    border-color:
        rgba(105,116,129,.16);

    box-shadow:
        0 25px 70px rgba(0,0,0,.70);
}

.country-popup.inactive-popup .popup-flag {

    color: #697481 !important;

    background:
        rgba(105,116,129,.07);

    border-color:
        rgba(105,116,129,.16);

    box-shadow: none;
}

.country-popup.inactive-popup .popup-name {

    color: #a0a9b3;
}

.country-popup.inactive-popup .popup-code {

    color: #697481;
}


/* =========================================
   MAP LEGEND
========================================= */

.map-legend {

    position: absolute;

    left: 12px;
    bottom: 12px;

    z-index: 400;

    padding: 9px 11px;

    display: flex;

    flex-direction: column;

    gap: 6px;

    background:
        rgba(8,11,16,.88);

    border:
        1px solid rgba(255,255,255,.07);

    border-radius: 11px;

    box-shadow:
        0 10px 25px rgba(0,0,0,.3);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.map-legend-item {

    display: flex;

    align-items: center;

    gap: 7px;

    color: #8d99a6;

    font-size: 9px;
}

.map-legend-color {

    width: 9px;
    height: 9px;

    flex-shrink: 0;

    border-radius: 3px;
}

.map-legend-color.active {

    background: #00e5ff;

    box-shadow:
        0 0 7px rgba(0,229,255,.35);
}

.map-legend-color.occupied {

    background: #ffd84a;

    box-shadow:
        0 0 7px rgba(255,216,74,.3);
}

.map-legend-color.inactive {

    background: #343b40;
}


/* =========================================
   LOADING
========================================= */

.map-loading {

    position: absolute;

    inset: 0;

    z-index: 500;

    display: flex;

    align-items: center;
    justify-content: center;

    background:
        rgba(7,10,15,.82);

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    pointer-events: none;

    opacity: 0;

    transition:
        opacity .2s ease;
}

.map-loading.show {
    opacity: 1;
}

.map-loading-inner {

    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 10px;

    color: #697481;

    font-size: 11px;

    text-transform: uppercase;

    letter-spacing: 1.5px;
}

.map-loading-inner i {

    color: #00e5ff;

    font-size: 24px;

    filter:
        drop-shadow(
            0 0 8px
            rgba(0,229,255,.55)
        );

    animation:
        mapLoadingSpin 1s linear infinite;
}

@keyframes mapLoadingSpin {

    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }

}


/* =========================================
   MOBILE SAFE AREA
========================================= */

@supports (padding-bottom: env(safe-area-inset-bottom)) {

    .map-wrapper {

        bottom:
            calc(
                78px +
                env(safe-area-inset-bottom)
            );
    }

}


/* =========================================
   SMALL PHONES
========================================= */

@media (max-width: 420px) {

    .country-popup {

        width:
            calc(100% - 20px);

        max-width: 390px;

        padding: 13px;

        bottom: 10px;
    }

    .popup-flag {

        width: 37px;
        height: 37px;
    }

    .popup-name {
        font-size: 18px;
    }

    .popup-grid {
        gap: 5px;
    }

    .popup-stat {
        min-height: 48px;
        padding: 7px;
    }

    .popup-stat-icon {

        width: 27px;
        height: 27px;

        font-size: 11px;
    }

    .popup-stat-label {
        font-size: 6.5px;
    }

    .popup-stat-value {
        font-size: 11px;
    }

    .popup-stat-unit {
        display: none;
    }

    .popup-battle-info {
        padding: 8px;
    }

    .battle-text {
        font-size: 9px;
    }

    .popup-description {
        font-size: 9px;
    }

    .popup-footer {
        font-size: 6px;
    }

}


/* =========================================
   VERY SMALL PHONES
========================================= */

@media (max-width: 350px) {

    .country-popup {

        padding: 11px;
    }

    .popup-title {
        gap: 8px;
    }

    .popup-flag {

        width: 34px;
        height: 34px;

        border-radius: 9px;
    }

    .popup-name {
        font-size: 17px;
    }

    .popup-code-line {
        margin-top: 3px;
    }

    .popup-status {
        padding: 7px 8px;
    }

    .popup-grid {
        grid-template-columns: 1fr;
    }

    .popup-stat {
        min-height: 43px;
    }

    .popup-footer-left span {
        display: none;
    }

}