.section-main__content:has(.eco-map),
.section-main__content:has(.eco-map--full) {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
}

.eco-map {
    --eco-map-coral: #ff6969;
    --eco-map-blue: #5f7ed9;
    --eco-map-blue-dark: #4869c8;
    --eco-map-ink: #17212f;
    --eco-map-muted: #657386;
    color: #17212f;
    margin-bottom: 32px;
}

.eco-map__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 18px 0 18px;
}

.eco-map__title {
    font-size: 34px;
    line-height: 1.15;
    font-weight: 800;
    margin: 0 0 8px;
}

.eco-map__lead {
    max-width: 820px;
    margin: 0;
    color: #526172;
    line-height: 1.55;
}

.eco-map__stats {
    display: grid;
    grid-template-columns: repeat(3, max-content);
    gap: 10px;
    justify-content: flex-end;
    align-items: stretch;
}

.eco-map__stat {
    min-width: 96px;
    padding: 9px 12px;
    border: 1px solid #dce5ef;
    background: #fff;
    border-radius: 8px;
}

.eco-map__stat strong {
    display: block;
    font-size: 19px;
    line-height: 1.1;
    white-space: nowrap;
}

.eco-map__stat span {
    display: block;
    color: #657386;
    font-size: 12px;
    margin-top: 4px;
}

.eco-map__toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
    padding: 12px;
    background: #f5f8fb;
    border: 1px solid #dce5ef;
    border-radius: 8px 8px 0 0;
}

.eco-map__control {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 0;
    min-width: 0;
    flex: 0 1 170px;
}

.eco-map__control:first-child {
    flex: 1 1 280px;
}

.eco-map__control span {
    color: #657386;
    font-size: 12px;
    font-weight: 700;
}

.eco-map__control input,
.eco-map__control select,
.eco-map-modal input,
.eco-map-modal select,
.eco-map-modal textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid #cfd9e5;
    border-radius: 6px;
    background: #fff;
    color: #17212f;
    padding: 9px 11px;
    font-size: 14px;
}

.eco-map__control textarea,
.eco-map-modal textarea {
    resize: vertical;
}

.eco-map__actions {
    display: flex;
    gap: 8px;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    margin-left: auto;
    align-items: end;
}

.eco-map__button {
    min-height: 42px;
    border: 0;
    border-radius: 6px;
    padding: 9px 14px;
    background: var(--eco-map-blue);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    transition: background-color .2s ease, transform .2s ease;
    white-space: nowrap;
}

.eco-map__actions .eco-map__button {
    min-width: 118px;
}

.eco-map__actions .eco-map__button[data-map-add] {
    min-width: 170px;
}

.eco-map__button:hover {
    background: var(--eco-map-blue-dark);
}

.eco-map__button:active {
    transform: translateY(1px);
}

.eco-map__button--secondary {
    background: #fff;
    color: var(--eco-map-blue-dark);
    border: 1px solid rgba(95, 126, 217, .35);
}

.eco-map__button--secondary:hover {
    background: rgba(95, 126, 217, .08);
}

.eco-map__actions .eco-map__button[data-map-add] {
    background: var(--eco-map-coral);
}

.eco-map__actions .eco-map__button[data-map-add]:hover {
    background: #f05555;
}

.eco-map__workspace {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border: 1px solid #dce5ef;
    border-top: 0;
    background: #fff;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.eco-map__canvas {
    position: relative;
    height: clamp(560px, 62vh, 760px);
    min-height: 0;
    z-index: 1;
    overflow: hidden;
    flex: 0 0 auto;
}

.eco-map__canvas-inner {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.eco-map .leaflet-container {
    width: 100%;
    height: 100%;
    background: #dcecf1;
    font-family: inherit;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.eco-map .leaflet-map-pane {
    z-index: 1;
}

.eco-map .leaflet-tile-pane {
    z-index: 200;
}

.eco-map .leaflet-overlay-pane {
    z-index: 400;
}

.eco-map .leaflet-marker-pane {
    z-index: 600;
}

.eco-map .leaflet-tooltip-pane {
    z-index: 650;
}

.eco-map .leaflet-popup-pane {
    z-index: 700;
}

.eco-map .leaflet-control {
    position: relative;
    z-index: 800;
    pointer-events: auto;
}

.eco-map .leaflet-top,
.eco-map .leaflet-bottom {
    position: absolute;
    z-index: 900;
    pointer-events: none;
}

.eco-map .leaflet-top {
    top: 12px;
}

.eco-map .leaflet-right {
    right: 12px;
}

.eco-map .leaflet-bottom {
    bottom: 12px;
}

.eco-map .leaflet-left {
    left: 12px;
}

.eco-map .leaflet-control-zoom {
    display: none;
}

.eco-map .leaflet-control-zoom a {
    display: block;
    width: 34px;
    height: 34px;
    line-height: 34px;
    text-align: center;
    background: #fff;
    color: var(--eco-map-blue-dark);
    font-size: 20px;
    font-weight: 800;
    text-decoration: none;
}

.eco-map .leaflet-control-zoom a + a {
    border-top: 1px solid #dce5ef;
}

.eco-map .leaflet-control-zoom a:hover {
    background: rgba(95, 126, 217, .08);
}

.eco-map .leaflet-control-attribution {
    margin: 0 10px 10px 0 !important;
    background: rgba(255, 255, 255, .72);
    color: var(--eco-map-muted);
    font-size: 11px;
    line-height: 1.4;
    padding: 2px 8px;
    border-radius: 999px;
    box-shadow: none;
    opacity: .7;
    transition: opacity .2s ease, background-color .2s ease;
}

.eco-map .leaflet-control-attribution:hover {
    background: rgba(255, 255, 255, .94);
    opacity: 1;
}

.eco-map .leaflet-control-attribution a {
    color: var(--eco-map-blue-dark);
}

.eco-map .leaflet-attribution-flag {
    display: none !important;
}

.eco-map .marker-cluster-small,
.eco-map .marker-cluster-medium,
.eco-map .marker-cluster-large {
    background: rgba(255, 105, 105, .25);
}

.eco-map .marker-cluster-small div,
.eco-map .marker-cluster-medium div,
.eco-map .marker-cluster-large div {
    background: var(--eco-map-coral);
    color: #fff;
    font-weight: 800;
}

.eco-map .leaflet-pane,
.eco-map .leaflet-tile,
.eco-map .leaflet-marker-icon,
.eco-map .leaflet-marker-shadow,
.eco-map .leaflet-tile-container,
.eco-map .leaflet-pane > svg,
.eco-map .leaflet-pane > canvas,
.eco-map .leaflet-zoom-box,
.eco-map .leaflet-image-layer,
.eco-map .leaflet-layer {
    position: absolute;
}

.eco-map .leaflet-tile,
.eco-map .leaflet-marker-icon,
.eco-map .leaflet-marker-shadow {
    max-width: none !important;
    max-height: none !important;
}

.eco-map__notice {
    position: absolute;
    z-index: 500;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 28px);
    padding: 10px 14px;
    border-radius: 6px;
    background: #17212f;
    color: #fff;
    box-shadow: 0 12px 28px rgba(23, 33, 47, .18);
}

.eco-map__panel {
    display: flex;
    flex-direction: column;
    border-top: 1px solid #dce5ef;
    border-left: 0;
    min-height: 0;
    background: #fbfcfe;
    overflow: hidden;
    position: relative;
    z-index: 3;
}

.eco-map__panel-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px 10px;
    border-bottom: 1px solid #dce5ef;
    flex: 0 0 auto;
}

.eco-map__panel-head strong,
.eco-map__panel-head span {
    display: inline-block;
}

.eco-map__panel-head span {
    margin-top: 0;
    margin-left: 12px;
    color: #657386;
    font-size: 13px;
}

.eco-map__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 18px 14px;
    border-bottom: 0;
    background: #fbfcfe;
    flex: 0 0 auto;
    max-height: 76px;
    overflow: auto;
}

.eco-map__legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #526172;
    font-size: 12px;
}

.eco-map__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.eco-map__list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 12px;
    max-height: 560px;
    overflow-y: auto;
    padding: 16px 18px 18px;
    overscroll-behavior: contain;
}

.eco-map-card {
    display: block;
    width: 100%;
    min-height: 196px;
    text-align: left;
    border: 1px solid #dce5ef;
    border-radius: 8px;
    background: #fff;
    padding: 14px;
    margin-bottom: 0;
    cursor: pointer;
}

.eco-map-card:hover,
.eco-map-card.is-active {
    border-color: var(--eco-map-blue);
    box-shadow: 0 8px 20px rgba(95, 126, 217, .14);
}

.eco-map-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.eco-map-card__title {
    font-weight: 800;
    line-height: 1.25;
    font-size: 16px;
}

.eco-map-card__date {
    white-space: nowrap;
    color: #657386;
    font-size: 12px;
}

.eco-map-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.eco-map-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 22px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #eef3f7;
    color: #526172;
    font-size: 12px;
    font-weight: 700;
}

.eco-map-card__text {
    margin: 8px 0 0;
    color: #526172;
    font-size: 13px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.eco-map-marker-wrap {
    --marker-color: var(--eco-map-coral);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
}

.eco-map-marker-wrap::before {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--marker-color) 25%, transparent);
    animation: ecoMapPulse 2.4s ease-out infinite;
}

.eco-map-marker {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 3px solid #fff;
    border-radius: 50% 50% 50% 0;
    background: var(--marker-color);
    color: #fff;
    box-shadow: 0 8px 18px rgba(23, 33, 47, .28);
    font-size: 16px;
    line-height: 1;
    transform: rotate(-45deg);
}

.eco-map-marker::after {
    content: "";
    position: absolute;
    right: 2px;
    top: 2px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .9);
}

.eco-map-marker span {
    position: relative;
    z-index: 1;
    transform: rotate(45deg);
}

.eco-map-marker-wrap .eco-map-marker {
    text-shadow: 0 1px 1px rgba(23, 33, 47, .2);
}

@keyframes ecoMapPulse {
    0% {
        opacity: .65;
        transform: scale(.85);
    }
    75%,
    100% {
        opacity: 0;
        transform: scale(1.8);
    }
}

.eco-map .leaflet-popup-content-wrapper {
    padding: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, .94);
    color: var(--eco-map-ink);
    box-shadow: 0 18px 45px rgba(23, 33, 47, .22);
    backdrop-filter: blur(10px);
}

.eco-map .leaflet-popup-content {
    width: min(360px, 78vw) !important;
    margin: 0;
}

.eco-map .leaflet-popup-tip {
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 8px 20px rgba(23, 33, 47, .12);
}

.eco-map .leaflet-popup-close-button {
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(95, 126, 217, .1);
    color: var(--eco-map-blue-dark) !important;
    font-size: 20px;
    line-height: 26px;
    text-align: center;
}

.eco-map-point-overlay {
    position: absolute;
    inset: 0;
    z-index: 950;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    pointer-events: none;
}

.eco-map-point-overlay[hidden] {
    display: none;
}

.eco-map-point-overlay__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(220, 236, 241, .16);
    pointer-events: auto;
}

.eco-map-point-overlay__card {
    position: relative;
    width: min(430px, calc(100% - 24px));
    max-height: min(560px, calc(100% - 48px));
    overflow-y: auto;
    border-radius: 14px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 24px 70px rgba(23, 33, 47, .24);
    backdrop-filter: blur(12px);
    pointer-events: auto;
}

.eco-map-point-overlay__close {
    position: sticky;
    top: 10px;
    float: right;
    z-index: 2;
    width: 30px;
    height: 30px;
    margin: 10px 10px -40px 0;
    border: 0;
    border-radius: 50%;
    background: rgba(95, 126, 217, .12);
    color: var(--eco-map-blue-dark);
    font-size: 22px;
    line-height: 28px;
    cursor: pointer;
}

.eco-map-popup {
    padding: 15px;
}

.eco-map-popup__head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding-right: 24px;
}

.eco-map-popup__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 10px;
    color: #fff;
    box-shadow: 0 8px 18px rgba(23, 33, 47, .16);
}

.eco-map-popup h3 {
    margin: 0 0 4px;
    font-size: 17px;
    line-height: 1.25;
    color: var(--eco-map-ink);
}

.eco-map-popup p {
    margin: 7px 0;
    color: #526172;
    font-size: 14px;
    line-height: 1.45;
}

.eco-map-popup__head p {
    margin: 0;
    font-weight: 700;
    color: var(--eco-map-blue-dark);
}

.eco-map-popup__severity {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(95, 126, 217, .1);
}

.eco-map-popup img {
    display: block;
    width: 100%;
    max-height: 190px;
    object-fit: cover;
    border-radius: 10px;
    margin: 10px 0;
}

.eco-map-popup a {
    color: var(--eco-map-blue-dark);
    font-weight: 700;
}

.eco-map-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.eco-map-modal[hidden] {
    display: none;
}

.eco-map-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 16, 36, .72);
}

.eco-map-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(760px, 100%);
    max-height: calc(100vh - 36px);
    overflow: auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 24px 80px rgba(8, 16, 36, .35);
}

.eco-map-modal__head,
.eco-map-modal__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid #dce5ef;
}

.eco-map-modal__head strong,
.eco-map-modal__head span {
    display: block;
}

.eco-map-modal__head span {
    color: #657386;
    font-size: 13px;
    margin-top: 4px;
}

.eco-map-modal__head button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: #eef3f7;
    color: #17212f;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.eco-map-modal__body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 16px;
}

.eco-map-modal__body label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 0;
}

.eco-map-modal__body span,
.eco-map-modal__foot span {
    color: #657386;
    font-size: 12px;
    font-weight: 700;
}

.eco-map-modal__wide {
    grid-column: 1 / -1;
}

.eco-map-modal__foot {
    border-top: 1px solid #dce5ef;
    border-bottom: 0;
}

@media (max-width: 1100px) {
    .eco-map__actions {
        justify-content: flex-start;
        margin-left: 0;
    }

    .eco-map__canvas {
        min-height: 560px;
    }

    .eco-map__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: 620px;
    }

    .eco-map__panel {
        min-height: 0;
    }
}

@media (max-width: 700px) {
    .eco-map__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .eco-map__stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
    }

    .eco-map__stat {
        min-width: 0;
    }

    .eco-map__title {
        font-size: 27px;
    }

    .eco-map-modal__body {
        grid-template-columns: 1fr;
    }

    .eco-map__control {
        flex-basis: 100%;
    }

    .eco-map__workspace {
        min-height: 0;
    }

    .eco-map__canvas {
        height: calc(100vh - 138px);
        min-height: 620px;
        max-height: 860px;
    }

    .eco-map__list {
        grid-template-columns: 1fr;
        max-height: 680px;
    }

    .eco-map-point-overlay {
        align-items: stretch;
        padding: 12px;
    }

    .eco-map-point-overlay__card {
        width: 100%;
        max-height: 100%;
    }

    .eco-map__panel-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .eco-map__panel-head span {
        display: block;
        margin-left: 0;
        margin-top: 4px;
    }

    .eco-map__actions {
        flex-wrap: wrap;
    }

    .eco-map__actions,
    .eco-map__actions .eco-map__button {
        width: 100%;
    }
}
