/* ==========================================================================
   Transport Tycoon / Transport Empire Manager
   Leaflet Google Maps Integration, Road Network Radar & Tactical Markers
   ========================================================================== */

/* Leaflet Canvas Container */
.leaflet-map-canvas {
    width: 100%;
    height: 640px;
    background: #0f1224;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
}

@media (max-width: 900px) {
    .leaflet-map-canvas {
        height: 520px;
    }
}

@media (max-width: 640px) {
    .leaflet-map-canvas {
        height: clamp(470px, 62vh, 560px);
    }
}

/* ==========================================================================
   Map Control Overlay Toolbar (Fully Responsive: Mobile, Tablet & Desktop)
   ========================================================================== */
.map-control-overlay {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 800;
    pointer-events: none;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    max-width: calc(100% - 24px);
}

/* Mobile Toggle Bar */
.map-mobile-toggle-wrap {
    display: none;
    pointer-events: auto;
}

.btn-map-control-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(13, 17, 34, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 210, 255, 0.45);
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), 0 0 10px rgba(0, 210, 255, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.btn-map-control-toggle:hover {
    background: rgba(20, 26, 52, 0.98);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.btn-map-control-toggle .toggle-indicator {
    font-size: 0.85rem;
    color: var(--primary);
    transition: transform 0.25s ease;
}

/* Toolbar & Rows */
.map-control-toolbar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    width: 100%;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.map-controls-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    max-width: 100%;
}

.map-btn-group {
    display: inline-flex;
    align-items: center;
    background: rgba(13, 17, 34, 0.90);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 3px;
    gap: 3px;
    pointer-events: auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    max-width: 100%;
    user-select: none;
}

.map-filter-btn, .map-layer-btn, .map-city-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    line-height: 1.2;
    -webkit-tap-highlight-color: transparent;
}

.map-filter-btn span, .map-layer-btn span, .map-city-btn span {
    pointer-events: none;
}

.map-filter-btn:hover, .map-layer-btn:hover, .map-city-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.map-filter-btn.active, .map-layer-btn.active, .map-city-btn.active {
    background: var(--primary);
    color: #0b0e1b;
    font-weight: 700;
    box-shadow: 0 0 12px rgba(0, 210, 255, 0.45);
}

.btn-hq-jump {
    background: rgba(0, 210, 255, 0.16) !important;
    border: 1px solid rgba(0, 210, 255, 0.45) !important;
    color: #00d2ff !important;
    font-weight: 700 !important;
}

.btn-hq-jump:hover, .btn-hq-jump.active {
    background: var(--primary) !important;
    color: #0b0e1b !important;
    box-shadow: 0 0 14px rgba(0, 210, 255, 0.6) !important;
}

.btn-fullscreen-map {
    background: rgba(0, 210, 255, 0.12) !important;
    border: 1px solid rgba(0, 210, 255, 0.35) !important;
    color: #00d2ff !important;
    font-weight: 700 !important;
}

.btn-fullscreen-map:hover {
    background: rgba(0, 210, 255, 0.28) !important;
    color: #ffffff !important;
    box-shadow: 0 0 12px rgba(0, 210, 255, 0.5) !important;
}

/* Full vs Short text labels */
.btn-txt-full {
    display: inline;
}
.btn-txt-short {
    display: none;
}

/* ==========================================================================
   Responsive Breakpoints for Map Toolbar
   ========================================================================== */

/* Tablet & Medium screens (<= 1100px) */
@media (max-width: 1100px) {
    .map-controls-row {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 2px;
        pointer-events: auto;
    }

    .map-controls-row::-webkit-scrollbar {
        display: none;
    }

    .map-btn-group {
        flex-shrink: 0;
    }
}

/* Tablet & Smaller Laptops (<= 900px) */
@media (max-width: 900px) {
    .map-control-overlay {
        top: 10px;
        left: 10px;
        right: 10px;
        max-width: calc(100% - 20px);
        gap: 6px;
    }

    .btn-txt-full {
        display: none;
    }
    .btn-txt-short {
        display: inline;
    }

    .map-filter-btn, .map-layer-btn, .map-city-btn {
        font-size: 0.74rem;
        padding: 5px 8px;
    }
}

/* Mobile Screens (<= 768px) */
@media (max-width: 768px) {
    .map-control-overlay {
        top: 8px;
        left: 8px;
        right: 8px;
        max-width: calc(100% - 16px);
        gap: 6px;
    }

    .map-mobile-toggle-wrap {
        display: block;
        margin-bottom: 2px;
        pointer-events: auto;
    }

    .btn-map-control-toggle {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: rgba(13, 17, 34, 0.95);
        border: 1px solid rgba(0, 210, 255, 0.55);
        color: #ffffff;
        font-size: 0.76rem;
        font-weight: 700;
        padding: 6px 13px;
        border-radius: var(--radius-full);
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), 0 0 10px rgba(0, 210, 255, 0.3);
        cursor: pointer;
    }

    .map-control-toolbar {
        background: rgba(10, 14, 30, 0.96);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border: 1px solid rgba(0, 210, 255, 0.35);
        border-radius: 12px;
        padding: 7px 6px;
        box-shadow: 0 8px 28px rgba(0, 0, 0, 0.8), 0 0 18px rgba(0, 210, 255, 0.15);
        display: flex;
        flex-direction: column;
        gap: 6px;
        pointer-events: auto;
        max-width: 100%;
        animation: slideDownToolbar 0.22s ease-out;
    }

    .map-control-toolbar.collapsed {
        display: none !important;
    }

    .map-controls-row {
        display: flex;
        flex-direction: column;
        gap: 6px;
        width: 100%;
        pointer-events: auto;
    }

    .map-btn-group {
        display: flex;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 3px 4px;
        gap: 4px;
        background: rgba(18, 23, 46, 0.88);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        box-sizing: border-box;
    }

    .map-btn-group::-webkit-scrollbar {
        display: none;
    }

    .map-filter-btn, .map-layer-btn, .map-city-btn {
        flex-shrink: 0;
        font-size: 0.72rem;
        padding: 5px 8px;
        white-space: nowrap;
        border-radius: 6px;
    }

    .btn-txt-full {
        display: none !important;
    }
    .btn-txt-short {
        display: inline !important;
    }

    /* 2-column compact zoom cluster at bottom-right */
    .map-zoom-overlay {
        bottom: 12px;
        right: 10px;
        display: grid;
        grid-template-columns: repeat(2, 32px);
        gap: 5px;
        z-index: 800;
    }

    .zoom-btn {
        width: 32px;
        height: 32px;
        font-size: 0.95rem;
        border-radius: 8px;
        background: rgba(13, 17, 34, 0.92);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border: 1px solid rgba(255, 255, 255, 0.18);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    }

    /* Active county floating badge */
    .map-county-active-hud {
        bottom: 12px;
        left: 10px;
        padding: 5px 10px;
        gap: 6px;
        font-size: 0.72rem;
        max-width: calc(100% - 88px);
        z-index: 850;
    }

    .mcab-badge-info strong {
        font-size: 0.75rem;
    }

    .btn-mcab-all {
        padding: 3px 6px;
        font-size: 0.68rem;
    }
}

@keyframes slideDownToolbar {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Small mobile (<= 400px) */
@media (max-width: 400px) {
    .map-filter-btn, .map-layer-btn, .map-city-btn {
        font-size: 0.68rem;
        padding: 4px 6px;
    }

    .btn-map-control-toggle {
        font-size: 0.72rem;
        padding: 5px 10px;
    }
}

/* Zoom Overlay */
.map-zoom-overlay {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 800;
}

.zoom-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: rgba(15, 18, 36, 0.9);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: all 0.2s;
}

.zoom-btn:hover {
    background: var(--primary);
    color: #0b0e1b;
    transform: scale(1.05);
}

.zoom-btn.active {
    background: var(--primary);
    color: #0b0e1b;
    box-shadow: 0 0 12px rgba(0, 210, 255, 0.6);
}

.zoom-btn-flag {
    font-size: 1.1rem;
}

/* ==========================================================================
   CUSTOM CITY DIVICONS
   ========================================================================== */
.custom-city-divicon {
    background: transparent;
    border: none;
}

.city-map-node {
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    user-select: none;
    transition: transform 0.15s ease;
}

.city-map-node:hover {
    transform: scale(1.15);
    z-index: 1000 !important;
}

/* Major Metropolis styling */
.node-major .dot-major {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffb703;
    border: 2px solid #0f1224;
    box-shadow: 0 0 10px rgba(255, 183, 3, 0.8);
    flex-shrink: 0;
}

.node-major .city-name-label {
    background: rgba(15, 18, 36, 0.94);
    border: 1px solid rgba(255, 183, 3, 0.4);
    padding: 2px 7px;
    border-radius: 6px;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Small City styling */
.node-small .dot-small {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #38bdf8;
    border: 1.5px solid #0f1224;
    box-shadow: 0 0 6px rgba(56, 189, 248, 0.6);
    flex-shrink: 0;
}

.node-small .city-name-label {
    background: rgba(15, 18, 36, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 1px 5px;
    border-radius: 4px;
    color: #cbd5e1;
    font-size: 0.72rem;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 3px;
}

/* Village styling (Falvak & Nagyközségek) */
.node-village .dot-village {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    border: 1.5px solid #064e3b;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
    flex-shrink: 0;
}

.node-village .city-name-label {
    background: rgba(6, 46, 32, 0.94);
    border: 1px solid rgba(16, 185, 129, 0.35);
    padding: 1px 5px;
    border-radius: 4px;
    color: #a7f3d0;
    font-size: 0.68rem;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 3px;
}

/* Owned Depot Pulse Aura */
.city-map-node.has-depot .dot-major,
.city-map-node.has-depot .dot-small,
.city-map-node.has-depot .dot-village {
    background: #00d2ff;
    box-shadow: 0 0 14px rgba(0, 210, 255, 1);
}

.dot-major,
.dot-small,
.dot-village {
    position: relative;
}

.depot-pulse-ring {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 26px;
    height: 26px;
    margin-left: -13px;
    margin-top: -13px;
    border: 2px solid #00d2ff;
    border-radius: 50%;
    animation: depotPulseAnim 2s ease-out infinite;
    pointer-events: none;
}

@keyframes depotPulseAnim {
    0% { transform: scale(0.6); opacity: 1; }
    100% { transform: scale(2.0); opacity: 0; }
}

/* 🏠 Central Headquarters (Saját Központi Telephely) High-Visibility Highlight */
.city-map-node.is-home-hq .dot-major,
.city-map-node.is-home-hq .dot-small,
.city-map-node.is-home-hq .dot-village {
    background: #ffb703 !important;
    border-color: #ffffff !important;
    box-shadow: 0 0 16px rgba(255, 183, 3, 1), 0 0 5px #fff !important;
    transform: scale(1.3);
}

.city-map-node.is-home-hq .depot-pulse-ring {
    border-color: #ffb703;
    box-shadow: 0 0 14px rgba(255, 183, 3, 0.9);
    animation: homeHqPulseAnim 1.8s ease-out infinite;
}

@keyframes homeHqPulseAnim {
    0% { transform: scale(0.6); opacity: 1; }
    100% { transform: scale(2.4); opacity: 0; }
}

.city-map-node.is-home-hq .city-name-label {
    background: linear-gradient(135deg, rgba(14, 18, 38, 0.96), rgba(35, 28, 12, 0.96)) !important;
    border: 2px solid #ffb703 !important;
    box-shadow: 0 0 18px rgba(255, 183, 3, 0.7), 0 4px 12px rgba(0, 0, 0, 0.9) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    padding: 2px 7px !important;
    z-index: 9999;
}

.badge-home-tag {
    background: linear-gradient(135deg, #ffb703, #f59e0b);
    color: #0b0e1e;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 4px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    display: inline-flex;
    align-items: center;
}

.badge-branch-tag {
    background: #00d2ff;
    color: #0b0e1e;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 4px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
}

/* Quick Telephely Jump Button */
.btn-hq-jump {
    background: linear-gradient(135deg, rgba(255, 183, 3, 0.18), rgba(255, 183, 3, 0.06)) !important;
    border-color: rgba(255, 183, 3, 0.55) !important;
    color: #ffb703 !important;
    font-weight: 600 !important;
    cursor: pointer !important;
}

.btn-hq-jump:hover,
.btn-hq-jump.active {
    background: linear-gradient(135deg, #ffb703, #f59e0b) !important;
    color: #0b0e1e !important;
    box-shadow: 0 0 14px rgba(255, 183, 3, 0.6) !important;
}

/* ==========================================================================
   ACTIVE VEHICLE MARKERS
   ========================================================================== */
.custom-vehicle-divicon {
    background: transparent;
    border: none;
    transition: transform 0.95s linear;
    will-change: transform;
}

.active-vehicle-marker {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(14, 18, 38, 0.94);
    border: 2px solid #ffb703;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 14px rgba(0, 0, 0, 0.8), 0 0 10px rgba(255, 183, 3, 0.4);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
}

.active-vehicle-marker:hover {
    transform: scale(1.25);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.95), 0 0 14px rgba(255, 183, 3, 0.7);
    z-index: 2000 !important;
}

.active-vehicle-marker .v-heading-indicator {
    position: absolute;
    top: -7px;
    left: 50%;
    margin-left: -5px;
    width: 10px;
    height: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    line-height: 1;
    color: #00d2ff;
    text-shadow: 0 0 5px #00d2ff, 0 0 8px rgba(0, 210, 255, 0.8);
    pointer-events: none;
    transform-origin: 5px 25px;
    transition: transform 0.35s ease-out;
    z-index: 5;
}

.active-vehicle-marker .v-emoji {
    font-size: 14px;
    line-height: 1;
    z-index: 2;
}

.active-vehicle-marker .v-pct {
    font-size: 7.5px;
    font-weight: 800;
    line-height: 1;
    margin-top: 1px;
    letter-spacing: -0.2px;
    z-index: 2;
}

.active-vehicle-marker .v-speed-badge {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(14, 18, 38, 0.96);
    border: 1px solid rgba(255, 183, 3, 0.8);
    color: #ffd700;
    font-size: 8px;
    font-weight: 800;
    line-height: 1;
    padding: 2px 4px;
    border-radius: 4px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.95);
    pointer-events: none;
    z-index: 6;
    letter-spacing: -0.2px;
}

/* Active Transport Route Dash Travel */
.active-transport-line {
    animation: dashTravel 1s linear infinite;
}

@keyframes dashTravel {
    from { stroke-dashoffset: 16; }
    to { stroke-dashoffset: 0; }
}

/* Destination Facility Waypoint Marker on Map */
.custom-dest-company-divicon {
    background: transparent !important;
    border: none !important;
}

.company-dest-marker {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    z-index: 1000;
}

.dest-marker-pulse {
    position: absolute;
    top: 50%;
    left: 9px;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 183, 3, 0.45);
    box-shadow: 0 0 12px rgba(255, 183, 3, 0.9);
    animation: destPulseRing 1.8s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
    pointer-events: none;
}

@keyframes destPulseRing {
    0% { transform: translate(-50%, -50%) scale(0.6); opacity: 1; }
    70% { transform: translate(-50%, -50%) scale(2.2); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(2.4); opacity: 0; }
}

.dest-marker-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid #ffb703;
    padding: 1px 6px 1px 4px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7), 0 0 8px rgba(255, 183, 3, 0.35);
    white-space: nowrap;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.company-dest-marker:hover .dest-marker-badge {
    transform: scale(1.1);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.9), 0 0 14px rgba(255, 183, 3, 0.7);
    border-color: #ffd700;
}

.dest-marker-badge .d-icon {
    font-size: 10px;
    line-height: 1;
}

.dest-marker-badge .d-label {
    font-size: 8.5px;
    font-weight: 700;
    color: #ffd700;
    letter-spacing: 0.2px;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==========================================================================
   LEAFLET POPUPS & TOOLTIPS
   ========================================================================== */
.leaflet-popup-pane {
    z-index: 950 !important;
}

.custom-leaflet-popup {
    z-index: 950 !important;
}

.custom-leaflet-popup .leaflet-popup-content-wrapper {
    background: rgba(17, 22, 45, 0.98);
    color: #f1f5f9;
    border: 1px solid rgba(0, 210, 255, 0.35);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    padding: 0;
}

.custom-leaflet-popup .leaflet-popup-content {
    margin: 12px 14px;
    line-height: 1.4;
}

.custom-leaflet-popup .leaflet-popup-tip {
    background: rgba(17, 22, 45, 0.98);
}

.city-leaflet-popup .popup-header {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.city-leaflet-popup .p-flag {
    font-size: 1.4rem;
}

.city-leaflet-popup h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.city-leaflet-popup .popup-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.city-leaflet-popup .popup-stats {
    font-size: 0.82rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
    background: rgba(0, 0, 0, 0.25);
    padding: 8px;
    border-radius: 6px;
}

.custom-vehicle-leaflet-tooltip {
    background: rgba(15, 18, 36, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #f1f5f9 !important;
    border-radius: 6px !important;
    font-size: 0.8rem !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6) !important;
    padding: 6px 10px !important;
}

/* ==========================================================================
   VÁRMEGYE HALVÁNY KÉK KÖRÖK (COUNTY PALE BLUE CIRCLE CLUSTER MARKERS)
   ========================================================================== */
.custom-county-divicon {
    background: transparent !important;
    border: none !important;
}

.county-circle-marker {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

.county-circle-marker:hover {
    transform: scale(1.18);
    z-index: 1500 !important;
}

/* Halvány kék kör (Pale Blue Circle) */
.county-circle-disk {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(186, 230, 253, 0.50) 0%, rgba(56, 189, 248, 0.32) 50%, rgba(14, 165, 233, 0.22) 100%);
    border: 2px solid rgba(125, 211, 252, 0.88);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.45), inset 0 0 10px rgba(186, 230, 253, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.22s ease;
}

.county-circle-marker:hover .county-circle-disk {
    background: radial-gradient(circle at 35% 35%, rgba(186, 230, 253, 0.70) 0%, rgba(56, 189, 248, 0.50) 50%, rgba(14, 165, 233, 0.35) 100%);
    border-color: #38bdf8;
    box-shadow: 0 0 28px rgba(56, 189, 248, 0.9), inset 0 0 14px rgba(186, 230, 253, 0.6);
}

/* A szám a kör belsejében (települések száma) */
.county-count-number {
    color: #f0f9ff;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.3px;
    font-family: 'Outfit', 'Inter', -apple-system, sans-serif;
    text-shadow: 0 1px 4px rgba(11, 14, 27, 0.9), 0 0 8px rgba(56, 189, 248, 0.6);
}

/* Vármegye neve a kör alatt kis modern kapszulában */
.county-name-pill {
    margin-top: 4px;
    background: rgba(11, 15, 30, 0.90);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(56, 189, 248, 0.45);
    border-radius: 12px;
    padding: 2px 8px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    transition: all 0.2s ease;
}

.county-circle-marker:hover .county-name-pill {
    background: rgba(14, 165, 233, 0.95);
    border-color: #7dd3fc;
    box-shadow: 0 2px 14px rgba(56, 189, 248, 0.7);
}

.county-pill-name {
    color: #e0f2fe;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.county-circle-marker:hover .county-pill-name {
    color: #0b0e1b;
}

/* Finom pulzáló gyűrű a kék kör körül */
.county-pulse-ring {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1.5px solid rgba(56, 189, 248, 0.6);
    pointer-events: none;
    animation: countyPulseAnim 3s infinite ease-out;
}

@keyframes countyPulseAnim {
    0% {
        transform: translateX(-50%) scale(1);
        opacity: 0.85;
    }
    60% {
        transform: translateX(-50%) scale(1.45);
        opacity: 0;
    }
    100% {
        transform: translateX(-50%) scale(1.45);
        opacity: 0;
    }
}

/* ==========================================================================
   AKTÍV VÁRMEGYE HUD SÁV (FLOATING ACTIVE COUNTY BADGE ON MAP)
   ========================================================================== */
.map-county-active-hud {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 850;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(13, 17, 34, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(56, 189, 248, 0.55);
    border-radius: var(--radius-full);
    padding: 6px 14px 6px 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 15px rgba(56, 189, 248, 0.25);
    animation: fadeInHud 0.25s ease-out;
    pointer-events: auto;
    user-select: none;
}

@keyframes fadeInHud {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mcab-badge-icon {
    font-size: 1.15rem;
    line-height: 1;
}

.mcab-badge-info {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #f1f5f9;
    font-size: 0.84rem;
}

.mcab-badge-info strong {
    color: #38bdf8;
    font-weight: 700;
}

.mcab-badge-count {
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 500;
}

.btn-mcab-all {
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.45);
    color: #7dd3fc;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-mcab-all:hover {
    background: #38bdf8;
    color: #0b0e1b;
    border-color: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
    transform: scale(1.04);
}

@media (max-width: 600px) {
    .map-county-active-hud {
        bottom: 12px;
        left: 12px;
        padding: 5px 10px;
        gap: 6px;
    }
    .mcab-badge-info {
        font-size: 0.75rem;
    }
    .mcab-badge-count {
        display: none;
    }
    .btn-mcab-all {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
}

/* ==========================================================================
   ZOOM LOD RULE FOR SINGLE COUNTY VILLAGES & TOWNS
   (Megszünteti a vármegyei zöld gomolyagot, csak a lényeges csomópontok látszanak)
   ========================================================================== */
.leaflet-container.zoom-under-11 .node-village:not(.has-depot):not(.is-home-hq):not(.is-active-transport-city) .city-name-label,
.leaflet-container.zoom-under-10 .node-small:not(.has-depot):not(.is-home-hq):not(.is-active-transport-city) .city-name-label {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.85);
    transition: opacity 0.18s cubic-bezier(0.4, 0, 0.2, 1), transform 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.leaflet-container.zoom-under-11 .node-village:hover .city-name-label,
.leaflet-container.zoom-under-10 .node-small:hover .city-name-label {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: scale(1.05) !important;
    z-index: 99999 !important;
}

.leaflet-container.zoom-under-11 .node-village:not(.has-depot):not(.is-home-hq):not(.is-active-transport-city) .dot-village {
    width: 6px;
    height: 6px;
    border-width: 1px;
}

/* Kiemelt csomópontok (Saját telephely, depó, aktív fuvar úti cél) mindig maximálisan láthatóak maradnak */
.city-map-node.is-home-hq .city-name-label,
.city-map-node.has-depot .city-name-label,
.city-map-node.is-active-transport-city .city-name-label {
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 5000 !important;
}



/* Teljesítmény: a címkék/jelölők saját rétegre kerülnek, a mozgatás nem rajzolja újra az egészet */
.custom-city-divicon, .co-pin-wrap { will-change: transform; contain: layout style; }
@media (max-width: 900px) {
    .city-map-node .city-name-label { box-shadow: none !important; }
    .depot-pulse-ring, .county-pulse-ring { animation: none !important; }
}
