/* Fullscreen public map layout, embed mode and editor interaction states. */
.map-transform-proportions,
.map-center-coordinates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.map-transform-control input:disabled,
.map-transform-proportions input:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.settings-inline-card {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
    padding: 16px;
    border-radius: 14px;
    background: #f7f8f7;
}

html:has(body.public-map-view),
body.public-map-view {
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
}

.public-map-view .public-map-topbar {
    display: none;
}

.public-map-view .public-container {
    width: 100%;
    max-width: none;
    height: 100dvh;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
}

.public-map-view .land-map-page,
.public-map-view .land-map-shell,
.public-map-view .land-leaflet-map {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    margin: 0;
}

.public-map-view .land-map-shell {
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #d9dfd4;
    box-shadow: none;
}

.land-map-brandbar {
    position: absolute;
    z-index: 805;
    top: 16px;
    left: 16px;
    max-width: calc(100% - 230px);
    min-height: 54px;
    padding: 9px 15px 9px 11px;
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 16px;
    background: rgba(255,255,255,.9);
    box-shadow: 0 14px 38px rgba(16,59,45,.17);
    -webkit-backdrop-filter: blur(14px) saturate(120%);
    backdrop-filter: blur(14px) saturate(120%);
}

.land-map-brand-home {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #103b2d;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: .025em;
    text-decoration: none;
    white-space: nowrap;
}

.land-map-brand-home img {
    width: 44px;
    height: 30px;
    display: block;
    object-fit: contain;
}

.land-map-brand-divider {
    align-self: stretch;
    width: 1px;
    min-height: 32px;
    background: rgba(16,59,45,.16);
}

.land-map-brandbar h1 {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: #17231b;
    font-family: var(--zf-font-display);
    font-size: clamp(17px, 2vw, 24px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -.025em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Final public-map placement. Tool geometry/order lives in 20-map-tools.css. */
.public-map-view .map-controls-left.map-controls-right {
    top: 14px;
    right: 14px;
    left: auto;
    z-index: 980;
    width: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.public-map-view .map-align-toggle {
    top: 84px;
    right: auto;
    left: 16px;
}

.public-map-view .map-align-panel {
    top: 84px;
    right: auto;
    left: 16px;
    width: min(330px, calc(100% - 32px));
    max-height: calc(100dvh - 100px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(91,33,182,.35) transparent;
}

.public-map-view .map-align-panel::-webkit-scrollbar {
    width: 7px;
}

.public-map-view .map-align-panel::-webkit-scrollbar-track {
    background: transparent;
}

.public-map-view .map-align-panel::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(91,33,182,.28);
}

.public-map-view .map-align-panel-head {
    position: sticky;
    z-index: 2;
    top: -14px;
    margin: -14px -14px 0;
    padding: 14px;
    border-bottom: 1px solid rgba(109,40,217,.12);
    background: rgba(255,255,255,.96);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.public-map-embed .public-map-topbar,
.public-map-embed .land-map-intro,
.public-map-embed .public-footer,
.public-map-embed .map-legend,
.public-map-embed .map-hover-card,
.public-map-embed .map-provider-error,
.public-map-embed .yandex-map-brand,
.public-map-embed .land-map-brandbar {
    display: none;
}

.public-map-embed,
.public-map-embed body,
.public-map-embed .public-container,
.public-map-embed .land-map-page,
.public-map-embed .land-map-shell,
.public-map-embed .land-leaflet-map,
.public-map-embed .leaflet-container {
    background: #fff;
}

.public-map-embed .public-container,
.public-map-embed .land-map-page,
.public-map-embed .land-map-shell {
    width: 100%;
    max-width: none;
    height: 100vh;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.public-map-embed .land-leaflet-map {
    width: 100%;
    height: 100vh;
    min-height: 0;
}

/* Imported SVG/GeoJSON plot styling may contain inline presentation attributes. */
.zf-map-plot.is-current-plot > polygon,
.zf-map-plot.is-current-plot > path,
.zf-map-plot.is-current-plot > polyline {
    fill: #9bf23f !important;
    fill-opacity: 1 !important;
    stroke: #2d7d15 !important;
    stroke-width: 2.4 !important;
    filter: drop-shadow(0 0 7px rgba(155,242,63,.78)) !important;
}

.land-plot-shape.is-current-plot,
.is-current-plot .land-plot-shape {
    fill: #d6a92f !important;
    stroke: #fff1a6 !important;
    stroke-width: 3 !important;
    filter: drop-shadow(0 0 7px rgba(255,195,0,.9));
}

.land-map-shell.is-polygon-editing .land-svg-overlay.is-active-map-layer .zf-map-plot > polygon,
.land-map-shell.is-polygon-editing .land-svg-overlay.is-active-map-layer .zf-map-plot > path,
.land-map-shell.is-polygon-editing .land-svg-overlay.is-active-map-layer .zf-map-plot > polyline {
    cursor: move !important;
}

.land-map-shell.is-id-editing .land-svg-overlay.is-active-map-layer .zf-map-plot > polygon,
.land-map-shell.is-id-editing .land-svg-overlay.is-active-map-layer .zf-map-plot > path,
.land-map-shell.is-id-editing .land-svg-overlay.is-active-map-layer .zf-map-plot > polyline {
    cursor: text !important;
}

.land-map-shell .zf-map-plot.is-polygon-dragging > polygon,
.land-map-shell .zf-map-plot.is-polygon-dragging > path,
.land-map-shell .zf-map-plot.is-polygon-dragging > polyline {
    filter: brightness(1.15);
}

@media (max-width: 780px) {
    .land-map-brandbar {
        top: 8px;
        right: 8px;
        left: 8px;
        width: auto;
        max-width: none;
        gap: 9px;
        min-height: 48px;
        padding: 7px 10px 7px 8px;
        border-radius: 14px;
    }

    .land-map-brand-home {
        gap: 6px;
        font-size: 12px;
    }

    .land-map-brand-home img {
        width: 36px;
        height: 26px;
    }

    .land-map-brand-divider {
        min-height: 28px;
    }

    .land-map-brandbar h1 {
        font-size: 15px;
    }

    .public-map-view:not(.public-map-embed) .land-map-shell:not(.is-map-ui-hidden) .map-controls-left.map-controls-right {
        top: 62px;
        right: 8px;
        bottom: auto;
        left: auto;
        z-index: 1100;
        width: 43px;
        height: auto;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        visibility: visible;
        opacity: 1;
        gap: 6px;
    }

    .public-map-view .map-align-toggle {
        top: 66px;
        right: auto;
        left: 8px;
    }

    .public-map-view .map-align-panel {
        top: 66px;
        right: auto;
        left: 8px;
        width: min(330px, calc(100% - 16px));
        max-height: calc(100dvh - 74px);
    }
}

@media (max-width: 640px) {
    .map-transform-proportions,
    .map-center-coordinates {
        grid-template-columns: 1fr;
    }
}
