.map-legend-restriction i {
    height: 6px;
}

.map-overlay-content > p:last-of-type {
    margin: 0;
    color: var(--muted);
    font-size: .88rem;
    line-height: 1.55;
}

.map-legend-permanent.is-ready i {
    background: #a32638;
}

.map-legend-temporary.is-ready i {
    background: repeating-linear-gradient(
        90deg,
        #e56b2f 0,
        #e56b2f 8px,
        transparent 8px,
        transparent 12px
    );
}

.restriction-layer-control {
    width: 244px;
    padding: 11px 12px;
    border: 1px solid rgba(23, 34, 27, .18);
    border-radius: 8px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 2px 12px rgba(23, 34, 27, .16);
    color: #17221b;
    font: 13px/1.35 "DM Sans", sans-serif;
}

.restriction-layer-control label {
    display: flex;
    grid-template-columns: none;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.map-layer-toggle,
.map-info-toggle {
    display: none;
}

.map-layer-title {
    margin: 0 0 9px;
    color: #637068;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.map-layer-section {
    padding: 2px 0;
}

.map-layer-option {
    font-weight: 700;
}

.restriction-layer-section {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #dfe3dc;
}

.restriction-layer-control input {
    width: 15px;
    height: 15px;
    margin: 0;
    padding: 0;
    accent-color: #1f5d3c;
}

.hectometer-swatch {
    display: block;
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    margin-inline: 7px;
    border: 1px solid #9a4312;
    border-radius: 50%;
    background: #f28c28;
}

.restriction-layer-parent {
    font-weight: 800;
}

.restriction-layer-children {
    display: grid;
    gap: 8px;
    margin: 9px 0 0 7px;
    padding: 9px 0 1px 12px;
    border-left: 2px solid #dfe3dc;
}

.restriction-swatch {
    display: block;
    width: 24px;
    height: 5px;
    border-radius: 4px;
}

.restriction-swatch.permanent {
    background: #a32638;
}

.restriction-swatch.temporary {
    background: repeating-linear-gradient(
        90deg,
        #e56b2f 0,
        #e56b2f 7px,
        transparent 7px,
        transparent 11px
    );
}

.restriction-popup {
    display: grid;
    gap: 5px;
    min-width: 210px;
}

.restriction-popup strong {
    color: #123a27;
    font-size: 1rem;
}

.restriction-popup b {
    width: max-content;
    padding: 3px 7px;
    border-radius: 5px;
    background: #f3e1d8;
    color: #8d321c;
}

@media (max-width: 800px) {
    .map-overlay {
        top: 12px;
        left: 12px;
        width: auto;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
    }

    .map-info-toggle {
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 1px solid rgba(23, 34, 27, .18);
        border-radius: 12px;
        background: rgba(255, 255, 255, .97);
        box-shadow: 0 3px 14px rgba(23, 34, 27, .18);
        color: #123a27;
        font: 800 1.15rem "Manrope", sans-serif;
        cursor: pointer;
    }

    .map-info-toggle:focus-visible,
    .map-layer-toggle:focus-visible {
        outline: 3px solid rgba(31, 93, 60, .24);
        outline-offset: 2px;
    }

    .map-overlay-content {
        display: none;
        width: min(300px, calc(100vw - 24px));
        max-height: calc(100vh - 150px);
        margin-top: 8px;
        padding: 16px 18px;
        overflow-y: auto;
        border: 1px solid rgba(223, 227, 220, .9);
        border-radius: 14px;
        background: rgba(255, 255, 255, .97);
        box-shadow: var(--shadow);
        backdrop-filter: blur(10px);
    }

    .map-overlay.is-open .map-overlay-content {
        display: block;
    }

    .map-overlay-content h1 {
        font-size: 1.65rem;
    }

    .restriction-layer-control {
        width: auto;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
        font-size: 12px;
    }

    .map-layer-toggle {
        display: flex;
        align-items: center;
        gap: 7px;
        min-height: 44px;
        margin-left: auto;
        padding: 0 13px;
        border: 1px solid rgba(23, 34, 27, .18);
        border-radius: 12px;
        background: rgba(255, 255, 255, .97);
        box-shadow: 0 3px 14px rgba(23, 34, 27, .18);
        color: #123a27;
        font: 800 12px "DM Sans", sans-serif;
        cursor: pointer;
    }

    .map-layer-toggle > span:first-child {
        font-size: 18px;
        line-height: 1;
    }

    .map-layer-panel {
        display: none;
        width: min(240px, calc(100vw - 24px));
        max-height: calc(100vh - 150px);
        margin-top: 8px;
        padding: 11px 12px;
        overflow-y: auto;
        border: 1px solid rgba(23, 34, 27, .18);
        border-radius: 10px;
        background: rgba(255, 255, 255, .97);
        box-shadow: 0 3px 14px rgba(23, 34, 27, .18);
    }

    .restriction-layer-control.is-open .map-layer-panel {
        display: block;
    }
}
