.ov-rm-frontend-wrap {
    display: grid;
    gap: 12px;
}

.ov-rm-map-shell {
    display: grid;
    gap: 0;
    padding: 0;
    border: 1px solid #d8dde3;
    border-radius: 22px;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 30%),
        linear-gradient(180deg, #fbfdff 0%, #f2f7fb 100%);
    box-shadow: 0 12px 30px rgba(31, 52, 74, 0.08);
}

.ov-rm-filter-bar {
    display: grid;
    gap: 16px;
    padding: 22px 22px 18px;
    border-radius: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.56) 0%, rgba(255, 255, 255, 0) 100%);
    border-bottom: 1px solid rgba(201, 212, 223, 0.9);
}

.ov-rm-filter-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.ov-rm-filter-copy {
    display: grid;
    gap: 8px;
}

.ov-rm-filter-title {
    margin: 0;
    font-size: 28px;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.ov-rm-filter-description,
.ov-rm-filter-count,
.ov-rm-filter-empty {
    margin: 0;
    color: #566171;
}

.ov-rm-filter-count {
    white-space: nowrap;
    font-weight: 600;
}

.ov-rm-filter-controls {
    display: grid;
    grid-template-columns: minmax(260px, 1.8fr) repeat(2, minmax(220px, 1fr)) auto;
    align-items: end;
    gap: 14px;
}

.ov-rm-search-field,
.ov-rm-filter-group {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.ov-rm-search-field {
    grid-column: auto;
}

.ov-rm-search-field input,
.ov-rm-filter-group select {
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid #c9d4df;
    border-radius: 999px;
    background: #fff;
    box-sizing: border-box;
    font-size: 15px;
    color: #203040;
}

.ov-rm-filter-group {
    grid-column: auto;
}

.ov-rm-filter-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #667385;
}

.ov-rm-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.ov-rm-filter-chip,
.ov-rm-filter-reset {
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid #c9d4df;
    border-radius: 999px;
    background: #fff;
    color: #203040;
    cursor: pointer;
    transition: 0.2s ease;
}

.ov-rm-filter-reset {
    grid-column: auto;
    align-self: end;
    justify-self: end;
    padding: 0 18px;
    white-space: nowrap;
}

.ov-rm-filter-chip:hover,
.ov-rm-filter-reset:hover {
    border-color: #90a8bd;
}

.ov-rm-filter-chip.is-active {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
}

.ov-rm-frontend-map {
    min-height: 480px;
    border: 0;
    border-radius: 0;
    overflow: hidden;
    background: #dfe8f0;
}

.ov-rm-map-shell.has-filter-bar .ov-rm-frontend-map {
    min-height: 500px;
}

.ov-rm-map-shell.no-filter-bar .ov-rm-frontend-map {
    min-height: 500px;
}

.ov-rm-message {
    margin: 0;
    color: #5b6572;
}

.ov-rm-popup {
    max-width: 240px;
}

.ov-rm-popup-image-wrap {
    margin: 0 0 10px;
    border-radius: 10px;
    overflow: hidden;
    background: #eef2f5;
}

.ov-rm-popup-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.ov-rm-popup h3 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.3;
}

.ov-rm-popup p {
    margin: 0 0 6px;
}

.ov-rm-popup a {
    color: #005c97;
    font-weight: 600;
    text-decoration: none;
}

.ov-rm-marker-icon {
    background: transparent;
    border: 0;
}

.ov-rm-marker-pin {
    --ov-rm-marker-color: #2563eb;
    position: relative;
    display: block;
    width: 24px;
    height: 24px;
    border-radius: 50% 50% 50% 0;
    background: var(--ov-rm-marker-color);
    transform: rotate(-45deg);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.24);
}

.ov-rm-marker-pin.is-current {
    width: 30px;
    height: 30px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

.ov-rm-marker-pin::after {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    background: #fff;
}

.ov-rm-marker-pin.is-current::after {
    inset: 7px;
}

@media (max-width: 782px) {
    .ov-rm-map-shell {
        border-radius: 18px;
    }

    .ov-rm-filter-bar {
        gap: 14px;
        padding: 18px 16px 16px;
    }

    .ov-rm-filter-top {
        flex-direction: column;
    }

    .ov-rm-filter-title {
        font-size: 23px;
    }

    .ov-rm-filter-count {
        white-space: normal;
    }

    .ov-rm-filter-controls {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .ov-rm-search-field,
    .ov-rm-filter-group {
        width: 100%;
        grid-column: auto;
    }

    .ov-rm-search-field input,
    .ov-rm-filter-group select {
        min-height: 48px;
        font-size: 16px;
    }

    .ov-rm-filter-group {
        padding: 12px;
        border: 1px solid rgba(201, 212, 223, 0.92);
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.72);
    }

    .ov-rm-filter-chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        margin: 0 -2px;
        scrollbar-width: thin;
    }

    .ov-rm-filter-chip {
        flex: 0 0 auto;
    }

    .ov-rm-filter-reset {
        grid-column: auto;
        width: 100%;
        min-height: 46px;
        justify-self: stretch;
    }

    .ov-rm-map-shell.has-filter-bar .ov-rm-frontend-map,
    .ov-rm-map-shell.no-filter-bar .ov-rm-frontend-map {
        min-height: 440px;
    }
}

@media (min-width: 783px) and (max-width: 1080px) {
    .ov-rm-filter-bar {
        padding: 20px 18px 18px;
    }

    .ov-rm-filter-top {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .ov-rm-filter-count {
        white-space: normal;
    }

    .ov-rm-filter-controls {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .ov-rm-search-field {
        grid-column: 1 / -1;
    }

    .ov-rm-filter-group {
        grid-column: span 3;
    }

    .ov-rm-filter-reset {
        grid-column: 1 / -1;
        justify-self: start;
    }
}
