/* Контракты в оболочке search-exact (как dumps.php): саджесты, чипы, карта */
.gse-page--contracts .gse-btn.is-active {
    border-color: var(--gse-primary);
    color: var(--gse-primary-dark);
    box-shadow: inset 0 0 0 1px rgba(106, 27, 154, 0.18);
    background: #f7f2fc;
}

.gse-suggest-wrap {
    position: relative;
}
.gse-suggest {
    position: absolute;
    z-index: 40;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    max-height: 240px;
    overflow: auto;
    background: #fff;
    border: 1px solid var(--gse-border, #e8e4f0);
    border-radius: 12px;
    box-shadow: 0 14px 28px rgba(91, 33, 182, 0.12);
    padding: 0.35rem;
}
.gse-suggest button {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    border-radius: 8px;
    padding: 0.55rem 0.7rem;
    font-size: 0.88rem;
    color: var(--gse-text, #1f1937);
    cursor: pointer;
}
.gse-suggest button:hover,
.gse-suggest button.is-active {
    background: #f3eef8;
    color: var(--gse-primary-dark, #5b21b6);
}

.gse-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.gse-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    border: 1px solid var(--gse-border, #e8e4f0);
    background: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--gse-muted, #7a7490);
    cursor: pointer;
    margin: 0;
}
.gse-chip input {
    margin: 0;
    accent-color: var(--gse-primary, #6a1b9a);
}
.gse-chip:has(input:checked) {
    border-color: rgba(106, 27, 154, 0.45);
    color: var(--gse-primary-dark, #5b21b6);
    background: #f7f2fc;
}

.gse-contracts-map.gdi-ctr__map-wrap,
.gse-page--contracts .gdi-ctr__map-wrap {
    border-radius: var(--gse-radius, 16px);
    border: 1px solid var(--gse-border, #e8e4f0);
    background: #fff;
    overflow: hidden;
    box-shadow: var(--gse-shadow, 0 10px 28px rgba(91, 33, 182, 0.07));
}
.gse-page--contracts .gdi-ctr__map-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    background: linear-gradient(90deg, #f7f2fc, #fbf9ff);
    border-bottom: 1px solid var(--gse-border, #e8e4f0);
}
.gse-page--contracts .gdi-ctr__map-bar-title {
    font-weight: 800;
    color: var(--gse-primary-dark, #5b21b6);
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
}
.gse-page--contracts .gdi-ctr__map-bar-note {
    font-size: 0.8rem;
    color: var(--gse-muted, #7a7490);
    font-weight: 600;
}
.gse-page--contracts .gdi-ctr__map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.1rem;
    padding: 0.55rem 1rem;
    border-bottom: 1px solid var(--gse-border, #e8e4f0);
    background: #fcfbfe;
    font-size: 0.78rem;
    color: var(--gse-muted, #7a7490);
    font-weight: 600;
}
.gse-page--contracts .gdi-ctr__map-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.gdi-ctr-legend__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}
.gdi-ctr-legend__dot--default { background: #7c3aed; }
.gdi-ctr-legend__dot--estimate { background: #0f766e; }
.gdi-ctr-legend__dot--done { background: #64748b; }

.gse-page--contracts .gdi-ctr__map {
    height: min(74vh, 720px);
    min-height: 420px;
    background:
        radial-gradient(circle at 20% 20%, rgba(106, 27, 154, 0.12), transparent 40%),
        #ebe4f5;
    position: relative;
}
.gse-page--contracts .gdi-ctr__map-state {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem;
    text-align: center;
    color: var(--gse-muted, #7a7490);
    background: rgba(252, 251, 254, 0.94);
    z-index: 500;
    font-weight: 600;
}
.gse-page--contracts .gdi-ctr__map-spinner {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 3px solid #ddd0ef;
    border-top-color: var(--gse-primary, #6a1b9a);
    animation: gse-ctr-spin 0.8s linear infinite;
}
@keyframes gse-ctr-spin {
    to { transform: rotate(360deg); }
}
@media (max-width: 700px) {
    .gse-page--contracts .gdi-ctr__map {
        height: min(62vh, 480px);
        min-height: 300px;
    }
}

.gdi-ctr-marker {
    background: transparent !important;
    border: 0 !important;
}
.gdi-ctr-marker__pin {
    display: block;
    width: 22px;
    height: 22px;
    margin: 4px auto 0;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    background: linear-gradient(180deg, #8b5cf6 0%, #6a1b9a 100%);
    border: 2px solid #fff;
    box-shadow: 0 8px 18px rgba(106, 27, 154, 0.42);
}
.gdi-ctr-marker__dot {
    display: block;
    width: 7px;
    height: 7px;
    margin: -16px auto 0;
    border-radius: 50%;
    background: #fff;
    position: relative;
    z-index: 1;
}
.gdi-ctr-marker--estimate .gdi-ctr-marker__pin {
    background: linear-gradient(180deg, #14b8a6 0%, #0f766e 100%);
}
.gdi-ctr-marker--done .gdi-ctr-marker__pin {
    background: linear-gradient(180deg, #94a3b8 0%, #64748b 100%);
}
.gdi-ctr-marker--bad .gdi-ctr-marker__pin {
    background: linear-gradient(180deg, #f87171 0%, #b91c1c 100%);
}

.gdi-ctr-cluster {
    background: transparent !important;
    border: 0 !important;
}
.gdi-ctr-cluster div {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    color: #fff;
    font-weight: 800;
    font-size: 0.82rem;
    border: 3px solid rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 22px rgba(91, 33, 182, 0.22);
    background: linear-gradient(160deg, #8b5cf6 0%, #6a1b9a 100%);
}
.gdi-ctr-cluster--md div {
    font-size: 0.9rem;
    background: linear-gradient(160deg, #7c3aed 0%, #5b21b6 100%);
}
.gdi-ctr-cluster--lg div {
    font-size: 1rem;
    background: linear-gradient(160deg, #6a1b9a 0%, #4c1d95 100%);
}

.gdi-ctr-popup-wrap .leaflet-popup-content-wrapper {
    border-radius: 16px;
    border: 1px solid var(--gse-border, #e8e4f0);
    box-shadow: 0 16px 36px rgba(91, 33, 182, 0.18);
    padding: 0;
    overflow: hidden;
}
.gdi-ctr-popup-wrap .leaflet-popup-content {
    margin: 0;
    min-width: 240px;
    line-height: 1.35;
}
.gdi-ctr-popup-wrap .leaflet-popup-tip {
    background: #fff;
    border: 1px solid var(--gse-border, #e8e4f0);
}
.gdi-ctr-popup {
    padding: 0.95rem 1rem 1rem;
}
.gdi-ctr-popup__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.45rem;
    padding-right: 1.6rem;
}
.gdi-ctr-popup__badge {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gse-primary-dark, #5b21b6);
    background: #f3eef8;
    border: 1px solid #ddd0ef;
}
.gdi-ctr-popup__badge--ok {
    color: #0f5f58;
    background: #e7f8f5;
    border-color: #b7e5de;
}
.gdi-ctr-popup__title {
    font-weight: 800;
    color: var(--gse-text, #1f1937);
    line-height: 1.35;
    margin-bottom: 0.35rem;
    font-size: 0.95rem;
}
.gdi-ctr-popup__reestr {
    font-size: 0.75rem;
    color: var(--gse-muted, #7a7490);
    font-weight: 600;
    margin-bottom: 0.35rem;
}
.gdi-ctr-popup__price {
    font-weight: 800;
    color: var(--gse-primary-dark, #5b21b6);
    margin-bottom: 0.4rem;
    font-size: 1.05rem;
}
.gdi-ctr-popup__place {
    font-size: 0.82rem;
    color: var(--gse-primary, #6a1b9a);
    margin-bottom: 0.25rem;
    font-weight: 600;
    display: flex;
    gap: 0.35rem;
}
.gdi-ctr-popup__addr {
    font-size: 0.78rem;
    color: var(--gse-muted, #7a7490);
    line-height: 1.4;
    margin-bottom: 0.7rem;
}
.gdi-ctr-popup__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0.45rem 0.9rem;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 700;
    color: #fff !important;
    background: linear-gradient(135deg, #6a1b9a 0%, #5b21b6 100%);
    text-decoration: none !important;
    box-shadow: 0 8px 16px rgba(91, 33, 182, 0.25);
}
.gdi-ctr-popup__btn:hover {
    filter: brightness(1.05);
}
