.map-selector {
    flex: 1;
    padding: 8px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
}

.map-selector.active {
    border-width: 3px;
    font-weight: 700;
}

/* 기존(레거시) 지도 제공자 버튼: .map-selector 레이아웃을 쓸 때만 적용 */
#kakaoMapBtn.map-selector {
    color: #000;
}

#kakaoMapBtn.map-selector.active {
    background: #fee500;
    border-color: #fee500;
}

#naverMapBtn.map-selector {
    color: #03c75a;
}

#naverMapBtn.map-selector.active {
    background: #03c75a;
    color: white;
}

#googleMapBtn.map-selector {
    color: #4285f4;
}

#googleMapBtn.map-selector.active {
    background: #4285f4;
    color: white;
}

.map-type-selector {
    flex: 1;
    padding: 8px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
    color: #333;
}

.map-type-selector.active {
    background: #1976d2;
    border-color: #1976d2;
    color: white;
    border-width: 3px;
    font-weight: 700;
}

/* 툴바 컨테이너 - 배경 없음, 패딩 없음 */
.map-control-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 12;
    background: transparent;
    padding: 0;
    display: flex;
    flex-direction: column;
}
.map-control-panel.compact-controls {
    transform: scale(var(--ui-scale, 1));
    transform-origin: top right;
}

/* 툴바 행 */
.control-row-1,
.control-row-2 {
    display: flex;
}

.control-row-2 {
    /* 도구 행은 우측 정렬 */
    justify-content: flex-end;
}

.control-row-2.hidden {
    display: none;
}

/* 공통 툴바 버튼 - 직사각형, 간격 없음 */
.toolbar-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    background: #f5f5f5;
    color: #333;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
}

.toolbar-btn:hover {
    filter: brightness(0.95);
}

.toolbar-btn.active {
    background: #1976d2;
    color: white;
}

/* 지도 제공자 버튼 - 브랜드 컬러 */
.toolbar-btn.provider-btn[data-provider="kakao"] {
    background: #FEE500;
    color: #3C1E1E;
}
.toolbar-btn.provider-btn[data-provider="kakao"].active {
    background: #FEE500;
    box-shadow: inset 0 0 0 3px rgba(0,0,0,0.3);
}

.toolbar-btn.provider-btn[data-provider="naver"] {
    background: #03C75A;
    color: #fff;
}
.toolbar-btn.provider-btn[data-provider="naver"].active {
    background: #03C75A;
    box-shadow: inset 0 0 0 3px rgba(0,0,0,0.3);
}

.toolbar-btn.provider-btn[data-provider="google"] {
    background: #4285F4;
    color: #fff;
}
.toolbar-btn.provider-btn[data-provider="google"].active {
    background: #4285F4;
    box-shadow: inset 0 0 0 3px rgba(0,0,0,0.3);
}

/* 도구 토글 버튼 */
.tools-toggle {
    background: #666;
    color: white;
}
.tools-toggle.active {
    background: #333;
}

/* 아이콘 버튼 */
.icon-btn {
    padding: 6px;
}

.icon-btn img {
    height: 20px;
    width: auto;
    display: block;
}

.icon-btn svg {
    display: block;
}

.icon-btn.active img {
    filter: brightness(0) invert(1);
}

.icon-btn svg {
    width: 24px;
    height: 24px;
    display: block;
}

.icon-btn.active svg {
    filter: brightness(0) invert(1);
}

/* 설정 모달 */
.settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.settings-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.settings-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    min-width: 320px;
    max-width: 400px;
    animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.settings-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.settings-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.settings-modal-body {
    padding: 20px;
}

.settings-section {
    margin-bottom: 20px;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-section h4 {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    font-weight: 600;
}

.scale-control {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.scale-control input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #e0e0e0;
    appearance: none;
    cursor: pointer;
}

.scale-control input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1976d2;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.scale-control input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1976d2;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

#uiScaleValue {
    min-width: 45px;
    text-align: right;
    font-weight: 600;
    color: #1976d2;
    font-size: 14px;
}

.scale-presets {
    display: flex;
    gap: 8px;
}

.scale-preset-btn {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: #f5f5f5;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.scale-preset-btn:hover {
    background: #e8e8e8;
    border-color: #ccc;
}

.scale-preset-btn.active {
    background: #1976d2;
    color: white;
    border-color: #1976d2;
}
