/* 거리 재기 버튼 */
#btn-measure {
    position: absolute; bottom: 30px; right: 20px; z-index: 1000;
    background: white; color: #333; border: 1px solid #ccc; padding: 10px 15px;
    border-radius: 20px; font-size: 13px; font-weight: bold; cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2); transition: all 0.2s;
    display: flex; align-items: center; gap: 5px;
}
#btn-measure:hover { background: #f0f0f0; }

/* 상단 검색바 */
.search-container {
    position: absolute; z-index: 1200; display: flex; align-items: center; gap: 8px;
    top: 16px; left: 20px; width: 380px;
}
.search-wrapper { position: relative; display: flex; flex: 1; }
.search-input-box {
    width: 100%; height: 38px; padding: 0 15px; 
    border-radius: 19px; border: 1px solid #ccc; 
    background-color: #fff; outline: none; 
    font-family: 'Noto Sans KR', sans-serif; font-size: 14px;
}
.advanced-search-btn {
    height: 38px; padding: 0 15px;
    background: #00427a; color: white; border: none; border-radius: 19px;
    cursor: pointer; font-size: 13px; font-weight: bold; white-space: nowrap;
}

/* 검색 드롭다운 결과 */
.search-results-list { 
    position: absolute; top: 45px; left: 0; width: 100%;
    background: white; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); 
    max-height: 300px; overflow-y: auto; display: none; z-index: 5000; 
}
.search-item {
    padding: 10px 15px; cursor: pointer; border-bottom: 1px solid #f1f1f1; 
    font-size: 13px; color: #333; display: flex; justify-content: space-between; align-items: center;
}
.search-item:hover { background: #f0f7ff; color: #00427a; font-weight: bold; }

/* 하단 토글 스위치 */
.boundary-toggle-container {
    position: absolute; bottom: 30px; left: 20px; z-index: 1000;
    display: flex; align-items: center; background: rgba(255, 255, 255, 0.9);
    padding: 8px 15px; border-radius: 20px; box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    backdrop-filter: blur(2px);
}
.control-row { display: flex; align-items: center; }
.toggle-switch { position: relative; display: inline-block; width: 34px; height: 20px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: #ccc; transition: .4s; border-radius: 20px; }
.slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 3px; bottom: 3px; background: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background: #4A90E2; }
input:checked + .slider:before { transform: translateX(14px); }
.switch-label { font-size: 12px; font-weight: bold; margin-right: 5px; }

/* 범례 */
.legend-floating-box { position: absolute; top: 150px; left: 20px; z-index: 1000; background: rgba(255, 255, 255, 0.9); padding: 12px 15px; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); display: flex; flex-direction: column; gap: 8px; backdrop-filter: blur(2px); }
.legend-item { font-size: 12px; cursor: pointer; display: flex; align-items: center; gap: 8px; color: #555; }

/* 반응형 */
@media (max-width: 768px) {
    .search-container { top: 90px; width: 94%; left: 50%; transform: translateX(-50%); }
    .search-input-box { height: 46px; border-radius: 8px; font-size: 15px; }
    .advanced-search-btn { height: 46px; border-radius: 8px; font-size: 14px; }
    .boundary-toggle-container { bottom: 80px; left: 15px; }
    #btn-measure { bottom: 80px; right: 15px; }
}