.parcel-map-section {
    margin: 30px 0;
}

.parcel-map-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.parcel-map-heading h2 {
    margin: 8px 0 0;
}

.parcel-map-wrapper {
    border: 1px solid #dce5de;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.parcel-map-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px;
    background: #f6f8f6;
    border-bottom: 1px solid #dce5de;
}

.parcel-map-types,
.parcel-map-actions {
    display: flex;
    gap: 6px;
}

.parcel-map-actions {
    margin-left: auto;
}

.map-button {
    padding: 9px 14px;
    border: 1px solid #d1ddd4;
    border-radius: 5px;
    background: #fff;
    color: #52655a;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.map-button:hover {
    background: #edf6ef;
}

.map-button.active {
    background: #28734d;
    border-color: #28734d;
    color: #fff;
}

.map-boundary-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #52655a;
}

#parcel-map {
    width: 100%;
    height: 480px;
    background: #e9ede8;
}

.parcel-map-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    color: #52655a;
    font-size: 13px;
}

.parcel-boundary-symbol {
    display: inline-block;
    width: 22px;
    height: 15px;
    background: rgba(255, 176, 0, 0.20);
    border: 2px solid #ffb000;
    border-radius: 2px;
}

.parcel-map-disclaimer {
    color: #78817b;
    font-size: 12px;
    line-height: 1.6;
    margin: 8px 0;
}

.parcel-map-wrapper:fullscreen {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0;
}

.parcel-map-wrapper:fullscreen #parcel-map {
    flex: 1;
    height: auto;
    min-height: 0;
}

@media (max-width: 700px) {

    #parcel-map {
        height: 360px;
    }

    .parcel-map-toolbar {
        gap: 8px;
        padding: 10px;
    }

    .parcel-map-actions {
        margin-left: 0;
    }

    .map-button {
        padding: 8px 10px;
        font-size: 12px;
    }
}


/* 지도 필지 검색 팝업 */

.map-search-popup {
    width: 320px;
    max-width: 80vw;
    padding: 16px;
    border: 1px solid #d3dfd6;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 5px 24px rgba(0, 0, 0, 0.18);
    color: #23392c;
}

.map-search-popup[hidden],
#map-open-form[hidden] {
    display: none;
}

.map-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    color: #28734d;
    font-size: 13px;
}

#map-popup-close {
    border: none;
    background: transparent;
    font-size: 23px;
    color: #758078;
    cursor: pointer;
    line-height: 1;
}

#map-popup-content h3 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.5;
}

.map-popup-pnu {
    font-size: 11px;
    color: #78817b;
    margin: 6px 0 12px;
}

.map-popup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 12px 0;
}

.map-popup-grid > div {
    background: #f3f7f4;
    border-radius: 5px;
    padding: 10px;
}

.map-popup-grid span {
    display: block;
    font-size: 11px;
    color: #728078;
    margin-bottom: 6px;
}

.map-popup-grid strong {
    display: block;
    font-size: 15px;
    color: #28734d;
}

.map-popup-detail-button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    background: #28734d;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.map-popup-detail-button:hover {
    background: #205e3f;
}

.map-popup-choice {
    display: block;
    width: 100%;
    padding: 10px;
    margin-top: 6px;
    border: 1px solid #d3dfd6;
    border-radius: 5px;
    background: #f3f7f4;
    text-align: left;
    cursor: pointer;
}

#parcel-map .ol-viewport {
    cursor: crosshair;
}

@media (max-width: 700px) {

    .map-search-popup {
        width: 260px;
        padding: 12px;
    }

    .map-popup-grid strong {
        font-size: 13px;
    }
}


/* 지도 팝업 잘림 방지 */

.map-search-popup {
    box-sizing: border-box;
    max-height: none;
    overflow-y: visible;
    overscroll-behavior: contain;
}

.map-popup-header {
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 2;
}

@media (max-width: 700px) {
    .map-search-popup {
        max-height: none;
    }
}


/* 메인페이지 지도 검색 */

.home-map-search {
    margin: 0 0 32px;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #dce5df;
    border-radius: 10px;
}

.home-map-search #parcel-map {
    height: 600px;
}

.home-map-search .parcel-map-section {
    margin: 0;
}

.home-map-search .parcel-boundary-symbol {
    background: rgba(22, 131, 77, 0.22);
    border-color: #16834d;
}

.home-map-search #parcel-map-wrapper:fullscreen #parcel-map {
    height: calc(100vh - 65px);
}

@media (max-width: 700px) {

    .home-map-search {
        padding: 12px;
    }

    .home-map-search #parcel-map {
        height: 420px;
    }
}
