/* Session-plan breadcrumb — match coverage map clickability */
#map-navigator.breadcrumb {
    gap: 0.15rem;
}

#map-navigator .navigator-home-link,
#map-navigator .navigator-link {
    color: var(--theme-color, #0289bd) !important;
    cursor: pointer !important;
    text-decoration: none !important;
    pointer-events: auto !important;
}

#map-navigator .navigator-home-link:hover,
#map-navigator .navigator-link:hover {
    text-decoration: underline !important;
}

#map-navigator .breadcrumb-item.active {
    color: #6c757d;
}

/* Remove click/focus outline box from map elements */
        .leaflet-container {
            outline: none !important;
        }

        .leaflet-container:focus {
            outline: none !important;
        }

        /* Remove focus outline from all map interactive elements */
        .leaflet-interactive {
            outline: none !important;
        }

        .leaflet-interactive:focus {
            outline: none !important;
        }

        /* Remove focus outline from map container and all child elements */
        .leaflet-container,
        .leaflet-container * {
            outline: none !important;
            -webkit-tap-highlight-color: transparent !important;
        }

        /* Remove any selection highlighting */
        .leaflet-container {
            -webkit-user-select: none !important;
            -moz-user-select: none !important;
            -ms-user-select: none !important;
            user-select: none !important;
        }

        /*    responsive for 1300px width*/
        @media screen and (max-width: 1300px) {
            #vaccine-selection-dropdown {
                display: block !important;
            }

            #vaccine-selection-radio {
                display: none !important;
            }
        }

        /* HTML: <div class="loader"></div> */
        .loader {
            width: 120px;
            height: 20px;
            background: linear-gradient(90deg, #0000, orange) left -50px top 0/50px 20px no-repeat lightblue;
            animation: l2 1s infinite linear;
        }

        @keyframes l2 {
            100% {
                background-position: right -50px top 0
            }
        }

        /* Responsive Ward Label Styles */
        .permanent-ward-label-marker {
            background: none !important;
            border: none !important;
            transition: opacity 0.3s ease, transform 0.2s ease;
        }

        .permanent-ward-label-marker .label-content {
            background: rgba(255, 255, 255, 0.7) !important;
            border: 1px solid rgba(0, 0, 0, 0.3) !important;
            border-radius: 4px !important;
            padding: 1px 3px !important;
            font-size: 11px !important;
            font-weight: bold !important;
            color: #333 !important;
            text-align: center !important;
            white-space: nowrap !important;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
            pointer-events: none !important;
            line-height: 1.2 !important;
        }

        .permanent-ward-label-marker:hover .label-content {
            background: rgba(255, 255, 255, 1) !important;
            transform: scale(1.1);
        }

        /* Hide labels on very low zoom for better performance */
        .leaflet-zoom-anim .permanent-ward-label-marker {
            transition: none !important;
        }

        /* Enhanced Map Label Styles */
        .map-label {
            background: none !important;
            border: none !important;
            box-shadow: none !important;
            font-size: 11px !important;
            color: #000000 !important;
            pointer-events: none !important;
            z-index: 1000 !important;
        }

        /* Epicenter Styles */
        .custom-map-pin {
            background: none !important;
            border: none !important;
        }

        .pin-container {
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: 0.2s ease;
        }

        .pin-container svg {
            width: 32px;
            height: 32px;
            min-height: 55px;
            min-width: 55px;
        }

        /* Fallback if MarkerCluster CDN CSS fails to load */
        .marker-cluster {
            background-clip: padding-box;
            border-radius: 50%;
        }
        .marker-cluster div {
            width: 30px;
            height: 30px;
            margin-left: 5px;
            margin-top: 5px;
            text-align: center;
            border-radius: 50%;
            font: 12px/30px "Helvetica Neue", Arial, Helvetica, sans-serif;
            color: #fff;
            background-color: #1976d2;
        }
        .marker-cluster-small {
            background-color: rgba(25, 118, 210, 0.55);
        }
        .marker-cluster-small div {
            background-color: rgba(25, 118, 210, 0.9);
        }
        .marker-cluster-medium {
            background-color: rgba(241, 140, 0, 0.55);
        }
        .marker-cluster-medium div {
            background-color: rgba(241, 140, 0, 0.9);
        }
        .marker-cluster-large {
            background-color: rgba(211, 47, 47, 0.55);
        }
        .marker-cluster-large div {
            background-color: rgba(211, 47, 47, 0.9);
        }

        /* Tooltip Styles */
        .epi-tooltip {
            background: white !important;
            border: 2px solid #0dcaf0 !important;
            border-radius: 8px !important;
            padding: 10px !important;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
            font-size: 14px !important;
        }

        .epi-popup {
            text-align: center;
            min-width: 150px;
        }

        .epi-type {
            font-weight: bold;
            font-size: 16px;
            color: #0dcaf0;
            margin-bottom: 5px;
            padding-bottom: 5px;
            border-bottom: 1px solid #eee;
        }

        .epi-name {
            color: #333;
            font-size: 14px;
        }

        .epicenter-popup {
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }

        .epicenter-info {
            padding: 8px;
            line-height: 1.4;
        }

        .epicenter-tooltip {
            background: rgba(5, 202, 107, 0.9);
            color: white;
            border: none;
            border-radius: 4px;
            padding: 4px 8px;
            font-weight: bold;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        }

        .epicenter-tooltip::before {
            border-top-color: rgba(5, 202, 107, 0.9) !important;
        }

        .epicenter-detailed-tooltip {
            background: rgba(255, 255, 255, 0.95);
            color: #333;
            border: 2px solid #05ca6b;
            border-radius: 8px;
            padding: 8px 12px;
            font-size: 12px;
            line-height: 1.4;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
            max-width: 250px;
            z-index: 9999;
        }

        .epicenter-detailed-tooltip .epicenter-info {
            margin: 0;
            padding: 0;
        }

        .epicenter-detailed-tooltip::before {
            border-top-color: #05ca6b !important;
        }

        /* Coverage Tooltip Styles */
        .coverage-tooltip {
            background: rgba(255, 255, 255, 0.95);
            color: #333;
            border: 1px solid #ccc;
            border-radius: 6px;
            padding: 8px 10px;
            font-size: 12px;
            line-height: 1.4;
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
            max-width: 300px;
            z-index: 9999;
        }

        .coverage-tooltip strong {
            color: #2c3e50;
            font-weight: 600;
        }

        .coverage-tooltip em {
            color: #7f8c8d;
            font-style: italic;
            text-transform: capitalize;
        }

        /* Map Control Styles */
        .map-control-button {
            background: rgba(255, 255, 255, 0.9);
            border: 1px solid #ccc;
            border-radius: 4px;
            padding: 8px 12px;
            margin: 2px;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.2s ease;
        }

        .map-control-button:hover {
            background: rgba(255, 255, 255, 1);
            border-color: #05ca6b;
            color: #05ca6b;
        }

        /* Vaccine Stats Styles */
        .vaccine-stats {
            background: rgba(255, 255, 255, 0.95);
            border: 1px solid #ddd;
            border-radius: 6px;
            padding: 10px;
            margin: 10px 0;
            font-size: 12px;
        }

        .vaccine-stats h4 {
            margin: 0 0 8px 0;
            color: #2c3e50;
            font-size: 14px;
        }

        .vaccine-stats .stat-item {
            display: flex;
            justify-content: space-between;
            margin: 4px 0;
            padding: 2px 0;
            border-bottom: 1px solid #eee;
        }

        .vaccine-stats .stat-item:last-child {
            border-bottom: none;
        }

        .vaccine-stats .stat-label {
            font-weight: 500;
            color: #34495e;
        }

        .vaccine-stats .stat-value {
            font-weight: 600;
            color: #27ae60;
        }

        /* Coverage Legend Styles */
        .coverage-legend {
            background: rgba(255, 255, 255, 0.95);
            border: 1px solid #ccc;
            border-radius: 6px;
            padding: 10px;
            font-size: 12px;
            line-height: 1.4;
        }

        .coverage-legend h4 {
            margin: 0 0 8px 0;
            font-size: 14px;
            color: #2c3e50;
        }

        .legend-item {
            display: flex;
            align-items: center;
            margin: 4px 0;
        }

        .legend-color {
            width: 20px;
            height: 15px;
            margin-right: 8px;
            border: 1px solid #999;
            border-radius: 2px;
        }

        .legend-label {
            color: #34495e;
            font-weight: 500;
        }

        /* Loader Styles */
        #loader {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            z-index: 10000;
            background: rgba(255, 255, 255, 0.95);
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            border: 1px solid #ddd;
        }

        #loader::after {
            content: '';
            display: block;
            width: 40px;
            height: 40px;
            margin: 8px auto;
            border-radius: 50%;
            border: 4px solid #f3f3f3;
            border-top-color: #05ca6b;
            animation: spin 1s ease-in-out infinite;
        }

        @keyframes spin {
            to {
                transform: rotate(360deg);
            }
        }

        #coverageChartHome {
            max-height: 322px !important;
            height: 322px !important;
        }

        .total-session-label {
            padding: 5px;
            text-align: center;
            background: #24a7ff;
            border-radius: 5px;
            color: white;
            font-weight: bold;
        }

        /* Responsive Design */
        @media (max-width: 768px) {
            .permanent-ward-label-marker .label-content {
                font-size: 10px !important;
                padding: 1px 4px !important;
            }

            .coverage-tooltip {
                font-size: 11px;
                max-width: 250px;
            }

            .epicenter-detailed-tooltip {
                font-size: 11px;
                max-width: 200px;
            }

            .map-control-button {
                padding: 6px 10px;
                font-size: 12px;
            }
        }

        table {
            border: #000000 !important;
        }

        td,
        th {
            border: #000000 !important;
        }

        .card-header {
            background-color: #0389bd;
            color: #ffffff
        }

        .print-btn {
            background-color: var(--theme-color);
            color: #fff;
            border-color: var(--theme-color);
            background-position: -100%;
            padding: 10px 15px;
            text-decoration: none;
            border-radius: 5px;
            grid-column: span 2;
            text-align: center
        }

        .print-footer {
            display: none;
        }

        /* Print Summary Styles - Hidden on screen, shown on print */
        .print-summary {
            display: none;
        }

        .print-info-panel {
            display: none;
        }

        /* hide on print  */
        @media print {
            @page {
                size: A4 portrait;
                margin: 5mm;
            }

            /* Hide elements */
            .page-sidebar,
            .header-button,
            .sidebar-filter-area,
            .map-controller,
            .map-type-selection,
            #map-expand-trigger,
            #map-preloader,
            .hideOnPrint,
            .print-summary {
                display: none !important;
            }

            /* Show print info panel */
            .print-info-panel {
                display: block !important;
                page-break-inside: avoid;
            }

            /* Layout adjustments */
            .page-content {
                margin: 0 !important;
                padding: 0 !important;
                width: 100% !important;
            }

            .page-map {
                display: flex;
                flex-direction: column;
                height: 100vh;
                width: 100%;
            }

            .homepage-wrapper {
                background: #ffffff !important;
            }

            html, body {
                background: #ffffff !important;
                height: 100%;
                margin: 0;
                padding: 0;
                overflow: hidden;
            }

            * {
                -webkit-print-color-adjust: exact !important;
                print-color-adjust: exact !important;
            }

            /* Hide breadcrumb on print */
            #map-navigator {
                display: none !important;
            }

            /* Map container - large at top */
            .coverage-map-wrapper {
                flex: 1;
                position: relative;
                border: 2px solid #333 !important;
                width: 100% !important;
                max-width: 100% !important;
                overflow: hidden !important;
            }

            /* Hide snapshot - use live map instead */
            #map-print-snapshot {
                display: none !important;
            }

            #map {
                width: 100% !important;
                height: 100% !important;
                max-width: 100% !important;
                overflow: hidden !important;
                position: relative !important;
            }

            .leaflet-container {
                width: 100% !important;
                height: 100% !important;
                max-width: 100% !important;
                overflow: hidden !important;
            }

            /* Print Info Panel - Bottom section - REDUCED HEIGHT */
            .print-info-panel {
                margin-top: 3mm !important;
                padding: 5px !important;
                background: white !important;
                border: 2px solid #333 !important;
                page-break-inside: avoid;
                display: grid !important;
                grid-template-columns: 1fr 1fr 1fr !important;
                gap: 6px !important;
                min-height: 60mm !important; /* Reduced from 80mm */
                max-height: 60mm !important;
            }

            /* Left section - Logo and Title */
            .print-info-left {
                display: flex !important;
                flex-direction: column !important;
                align-items: center !important;
                justify-content: flex-start !important;
                padding: 5px !important;
                border-right: 1px solid #ddd !important;
            }

            .print-logo {
                width: auto !important; /* Reduced from 60px */
                height: 45px !important;
                margin-bottom: 4px !important;
            }

            .print-title {
                font-size: 10px !important; /* Reduced from 11px */
                font-weight: bold !important;
                text-align: center !important;
                margin-bottom: 6px !important;
                line-height: 1.2 !important;
            }

            .print-metadata-table {
                width: 100% !important;
                font-size: 8px !important; /* Reduced from 9px */
                border-collapse: collapse !important;
            }

            .print-metadata-table td {
                padding: 2px 4px !important; /* Reduced padding */
                border: 1px solid #ddd !important;
            }

            .print-metadata-table td:first-child {
                font-weight: bold !important;
                background: #f5f5f5 !important;
                width: 40% !important;
            }

            .print-tech-info {
                margin-top: 4px !important;
                font-size: 6px !important; /* Reduced from 7px */
                line-height: 1.3 !important;
                color: #666 !important;
            }

            /* Center section - Location Map */
            .print-info-center {
                display: flex !important;
                flex-direction: column !important;
                align-items: center !important;
                padding: 5px !important;
                border-right: 1px solid #ddd !important;
            }

            .print-location-title {
                font-size: 10px !important; /* Reduced from 12px */
                font-weight: bold !important;
                margin-bottom: 4px !important;
            }

            .print-location-map {
                width: 80% !important;
                max-width: 70px !important; /* Reduced from 150px */
                height: auto !important;
                border: 1px solid #333 !important;
                margin-bottom: 4px !important;
            }

            .print-compass {
                margin: 4px 0 !important;
            }

            .print-scale {
                font-size: 7px !important; /* Reduced from 8px */
                text-align: center !important;
            }

            /* Right section - Legend */
            .print-info-right {
                display: flex !important;
                flex-direction: column !important;
                padding: 5px !important;
            }

            .print-legend-title {
                font-size: 10px !important; /* Reduced from 12px */
                font-weight: bold !important;
                margin-bottom: 4px !important;
            }

            .print-legend-item {
                display: flex !important;
                align-items: center !important;
                margin: 3px 0 !important; /* Reduced from 4px */
                font-size: 8px !important; /* Reduced from 9px */
            }

            .print-legend-icon {
                width: 16px !important; /* Reduced from 20px */
                height: 12px !important; /* Reduced from 15px */
                margin-right: 5px !important;
                border: 1px solid #666 !important;
                flex-shrink: 0 !important;
            }

            /* EPI marker icon - pin shape */
            .print-legend-icon.epi-marker {
                width: 12px !important;
                height: 16px !important;
                background: #ff0000 !important;
                border-radius: 50% 50% 50% 0 !important;
                transform: rotate(-45deg) !important;
                border: none !important;
                position: relative !important;
            }

            .print-legend-icon.epi-marker::after {
                content: '' !important;
                width: 6px !important;
                height: 6px !important;
                background: white !important;
                border-radius: 50% !important;
                position: absolute !important;
                top: 3px !important;
                left: 3px !important;
            }

            .print-coord-info {
                margin-top: auto !important;
                padding-top: 4px !important;
                border-top: 1px solid #ddd !important;
                font-size: 6px !important; /* Reduced from 7px */
                line-height: 1.3 !important;
            }

            .print-partners {
                display: flex !important;
                justify-content: space-around !important;
                align-items: center !important;
                margin-top: 4px !important;
                padding-top: 4px !important;
                border-top: 1px solid #ddd !important;
            }

            .print-partner-logo {
                height: 20px !important; /* Reduced from 25px */
                width: auto !important;
            }

            /* Print footer */
            .print-footer {
                display: none !important;
            }
        }

        #performance_table .perf-threshold {
            font-weight: 500;
            margin-left: 6px;
            opacity: 0.75;
            white-space: nowrap;
        }

.sidebar-filter-area .export-map-btn,
.sidebar-filter-area .export-map-btn.active {
    grid-column: span 2;
    background: var(--theme-color) !important;
    background-image: none !important;
    color: #fff !important;
    border-color: var(--theme-color) !important;
}

.export-map-popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(15, 23, 42, 0.55);
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    overflow: hidden;
}

.export-map-popup.is-open {
    display: flex !important;
}

.export-map-toolbar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0;
    padding: 10px 16px;
    background: #fff;
    border-bottom: 1px solid #d0d5dd;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    z-index: 2;
}

.export-map-actions,
.export-map-view-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.export-map-grid-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    background: #f8fafc;
    font-size: 13px;
    color: #334155;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.export-map-grid-toggle input {
    margin: 0;
}

.export-map-action {
    background: var(--theme-color, #0389bd);
    color: #fff;
    border: 0;
    border-radius: 5px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
}

.export-map-action-close {
    background: #64748b;
}

.export-map-zoom-btn {
    min-width: 34px;
    padding: 8px 10px;
    font-size: 16px;
    line-height: 1;
    font-weight: 600;
}

.export-map-zoom-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.export-map-frame-adjustable {
    cursor: grab;
}

.export-map-frame-adjustable:active {
    cursor: grabbing;
}

.export-map-stage {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5px;
    background: #c5c9d1;
}

.export-map-paper {
    flex-shrink: 0;
    width: 210mm;
    height: 297mm;
    overflow: hidden;
    background: transparent;
}

.export-map-sheet {
    width: 210mm;
    height: 297mm;
    background: #fff;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: none;
    padding: 5px;
    transform-origin: top left;
}

.export-map-inner {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #111;
    padding: 10px;
    gap: 5px;
    box-sizing: border-box;
}

.export-map-map-box,
.export-map-info-box {
    box-sizing: border-box;
    border: 1px solid #111;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.export-map-map-box {
    flex: 5 1 0;
    position: relative;
    background: #fff;
}

.export-map-info-box {
    flex: 1 1 0;
    overflow: hidden;
}

.export-map-map-inset {
    flex: 1 1 auto;
    min-height: 0;
    position: relative;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
}

.export-map-frame {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #c5c5c5;
}

#export-map-canvas,
#export-index-map {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
}

.export-map-graticule {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    font-size: 9px;
    color: #111;
    font-family: Arial, sans-serif;
}

.export-map-graticule.is-hidden {
    display: none;
}

.export-map-tick {
    position: absolute;
    background: #111;
}

.export-map-tick-h {
    width: 8px;
    height: 1px;
}

.export-map-tick-v {
    width: 1px;
    height: 8px;
}

.export-map-tick-label {
    position: absolute;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.85);
    padding: 2px 3px;
    line-height: 1.2;
}

.export-map-footer {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
}

.export-map-box {
    border-right: 1px solid #111;
    padding: 6px 8px;
    overflow: hidden;
    box-sizing: border-box;
    font-size: 8px;
    color: #111;
}

.export-map-box:last-child {
    border-right: 0;
}

.export-map-box-id {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.export-map-gov-logo {
    display: block;
    width: 34px;
    height: auto;
    margin: 0 auto 3px;
}

.export-map-title {
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 6px;
    line-height: 1.2;
    white-space: normal;
    word-break: break-word;
}

.export-map-subtitle {
    font-size: 7px;
    line-height: 1.25;
    text-align: center;
    margin: 0 0 4px;
    color: #333;
}

.export-map-box-id.export-meta-compact .export-map-gov-logo {
    width: 24px;
    margin: 0 auto 1px;
}

.export-map-box-id.export-meta-compact .export-map-title {
    font-size: 11px;
    margin-bottom: 1px;
    line-height: 1.1;
}

.export-map-box-id.export-meta-compact .export-map-subtitle {
    font-size: 6px;
    margin: 0 0 1px;
}

.export-map-meta {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 6px;
}

.export-map-meta th,
.export-map-meta td {
    border: 1px solid #333 !important;
    padding: 2px 4px;
    font-size: 8px;
    text-align: left;
}

.export-map-meta th {
    width: 38%;
    background: #f3f3f3;
    font-weight: 700;
}

.export-map-box-heading {
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 4px;
}

.export-map-box-locator .export-map-box-heading {
    width: 78%;
    align-self: flex-end;
    text-align: right;
    margin-bottom: 2px;
}

.export-map-box-locator {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-height: 0;
    padding: 5px 8px;
}

.export-index-map-wrap {
    position: relative;
    width: 78%;
    align-self: flex-end;
    margin-left: auto;
    margin-right: 0;
    flex: 1 1 auto;
    min-height: 0;
    background: transparent !important;
}

#export-index-map.leaflet-container,
#export-index-map .leaflet-container,
#export-index-map .leaflet-pane,
#export-index-map .leaflet-map-pane,
#export-index-map .leaflet-overlay-pane,
#export-index-map canvas,
#export-index-map svg {
    background: transparent !important;
}

#export-index-map svg path {
    shape-rendering: geometricPrecision;
    vector-effect: non-scaling-stroke;
}

.export-index-static-map {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
    background: transparent !important;
}

.export-index-static-map path {
    fill: #eef3f7;
    fill-opacity: 0.9;
    stroke: #5d7180;
    stroke-width: 0.95;
    stroke-linejoin: round;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
    shape-rendering: geometricPrecision;
}

.export-map-box-scale {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 2px;
    padding: 4px 9px 5px;
}

.export-map-compass {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 60px;
    height: 60px;
    margin: 0;
    overflow: visible;
}

.export-map-compass canvas {
    display: block;
    width: 42px;
    height: 42px;
    margin: 0 auto;
}

.export-map-scale {
    width: 100%;
    text-align: center;
    margin: 3px 0 0;
    flex: 0 0 auto;
}

.export-map-scale-bar {
    display: none;
}

.export-map-scale-line {
    width: 78%;
    margin: 0 auto;
    position: relative;
    height: 19px;
}

.export-map-scale-line .scale-baseline {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: #333;
}

.export-map-scale-line .scale-tick {
    position: absolute;
    bottom: 0;
    width: 1px;
    height: 5px;
    background: #333;
}

.export-map-scale-line .scale-tick-label {
    position: absolute;
    bottom: 4px;
    font-size: 7px;
    color: #333;
    transform: translateX(-50%);
    white-space: nowrap;
}

.export-map-scale-line .scale-km {
    position: absolute;
    bottom: -2px;
    right: -12px;
    font-size: 7px;
    color: #333;
    font-style: italic;
}

.export-map-scale-label {
    font-size: 7px;
    min-height: 20px;
}

.export-map-scale-ratio {
    font-size: 8px;
    margin-top: 1px;
}

.export-map-partners,
.export-map-developed-by {
    display: flex;
    align-items: center;
    justify-content: center;
}

.export-map-partners {
    gap: 8px;
    margin-top: auto;
    flex: 0 0 31px;
}

.export-map-partners img {
    width: 30px;
    height: auto;
    max-height: 30px;
    object-fit: contain;
}

.export-map-partners img:last-child {
    width: 48px;
    max-height: 31px;
}

.export-map-developed-by {
    gap: 4px;
    margin-top: 1px;
    font-size: 7px;
    color: #555;
    flex: 0 0 12px;
}

.export-map-developed-by img {
    width: 32px;
    height: auto;
    object-fit: contain;
}

.export-map-box.export-map-box-legend {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.export-map-legend-items {
    margin-bottom: 2px;
}

.export-map-legend-items small {
    display: block;
    margin: 1px 0 2px;
    font-size: 7px;
    font-weight: 600;
}

.export-map-legend-items .legend-outreach,
.export-map-legend-items .fixed-center-logo {
    display: flex !important;
    align-items: center;
    gap: 3px;
    margin: 0 0 1px !important;
    font-size: 6.5px;
}

.export-map-legend-items .legend-outreach img,
.export-map-legend-items .fixed-center-logo img {
    width: 9px !important;
    height: 9px !important;
    object-fit: contain !important;
}

.export-map-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 3px 0;
    font-size: 8px;
}

.export-map-legend-item span,
.export-map-legend-items .map-legend-item span {
    display: block;
    width: 10px;
    height: 10px;
    border: 1px solid #333;
    flex: 0 0 auto;
}

.export-map-legend-boundary span {
    width: 12px !important;
    height: 10px !important;
    border: 1.5px solid #111 !important;
    background: rgba(242, 244, 246, 0.45) !important;
    clip-path: polygon(12% 20%, 78% 8%, 94% 48%, 68% 92%, 18% 78%);
}

.export-map-legend-polygon {
    display: block;
    width: 24px;
    height: 18px;
    flex: 0 0 24px;
    overflow: visible;
}

.export-map-legend-polygon path {
    fill: #f8fafc;
    stroke: #111;
    stroke-width: 2.6;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.export-map-legend-empty {
    font-size: 7px;
    color: #555;
    line-height: 1.25;
}

.export-map-tech {
    margin-top: 3px;
    padding-top: 2px;
    border-top: 1px solid #ccc;
    font-size: 6.5px;
    line-height: 1.25;
}

body.export-map-open {
    overflow: hidden;
}

.export-map-stats-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 600;
    display: flex;
    flex-direction: column;
    gap: 1mm;
    width: 58mm;
    max-width: calc(100% - 40px);
    pointer-events: none;
}

.export-stats-card {
    background-color: var(--theme-color, #0289bd);
    color: #fff;
    min-height: 16mm;
    padding: 2.2mm 3mm;
    display: block;
    box-sizing: border-box;
    border-radius: 2px;
}

.export-stats-title {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.15;
    margin-bottom: 0.8mm;
    white-space: nowrap;
}

.export-stats-value {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1mm;
}

.export-stats-gender {
    display: flex;
    align-items: center;
    gap: 3mm;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

@media print {
    @page {
        size: A4 portrait;
        margin: 0;
    }

    html {
        width: 210mm !important;
        height: 297mm !important;
        min-height: 297mm !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        background: #fff !important;
    }

    body {
        width: 210mm !important;
        height: 297mm !important;
        min-height: 297mm !important;
        max-height: 297mm !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        background: #fff !important;
        position: static !important;
    }

    body > *:not(#export-map-popup) {
        display: none !important;
        height: 0 !important;
        width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -99999px !important;
    }

    #export-map-popup {
        display: block !important;
        position: static !important;
        top: 0 !important;
        left: 0 !important;
        right: auto !important;
        bottom: auto !important;
        inset: auto !important;
        width: 210mm !important;
        height: calc(297mm - 1px) !important;
        max-height: calc(297mm - 1px) !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        background: #fff !important;
        opacity: 1 !important;
        page-break-after: avoid !important;
        break-after: avoid !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    .export-map-toolbar {
        display: none !important;
    }

    .export-map-stage,
    .export-map-paper {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 210mm !important;
        height: calc(297mm - 1px) !important;
        max-height: calc(297mm - 1px) !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        background: #fff !important;
        box-shadow: none !important;
        border: 0 !important;
    }

    .export-map-sheet {
        width: 200mm !important;
        height: 287mm !important;
        max-height: 287mm !important;
        margin: 0 !important;
        padding: 4px !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
        transform: none !important;
        border: none !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        page-break-after: avoid !important;
        break-after: avoid !important;
    }

    .leaflet-control-container {
        display: none !important;
    }

    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}
