/* 단축키 표시 스타일 */
.key-shortcut {
  font-size: 10px;
  font-weight: bold;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.9);
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  padding: 1px 3px;
  line-height: 1;
  text-transform: uppercase;
}

/* 마우스 호버 시 단축키 표시 강조 */
.map-button:hover .key-shortcut {
  background-color: rgba(0, 0, 0, 0.3);
}

/* 활성화된 버튼의 단축키 표시 */
.map-button.active .key-shortcut {
  background-color: rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
  /* 모바일에서는 단축키 숨기기 */
  .key-shortcut {
    display: none;
  }

  /* 모바일에서는 버튼 높이 원래대로 */
  .map-button {
    height: 48px;
  }

  /* 모바일에서 입력창에 포커스가 있을 때 스타일 */
  .mobile-note-code-container input:focus,
  .mobile-search-bar input:focus {
    outline: none;
    border-color: #2196f3;
    box-shadow: 0 0 5px rgba(33, 150, 243, 0.5);
  }

  /* 모바일 버튼 호버 스타일 */
  .mobile-note-code-container button:hover {
    background-color: #0d8aee;
  }

  .mobile-search-bar button:hover {
    background-color: #45a049;
  }
}
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;700&display=swap");

/* 스크린 리더 전용 요소 - 시각적으로는 숨기고 스크린 리더로는 접근 가능 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* PC 버전용 클래스 */
.desktop-only {
  display: flex;
}

/* 모바일 버전용 클래스 */
.mobile-only {
  display: none; /* 모바일이 아니면 경우 기본적으로 숨김 */
}

/* 모바일 전용 노트/검색 컨테이너 */
.mobile-search-note-container {
  display: none; /* 기본적으로 숨김 */
  justify-content: space-between;
  width: 100%;
  padding: 5px 8px;
  box-sizing: border-box;
  gap: 5px;
  background-color: #f8f9fa;
  border-top: 1px solid #ddd;
  /* border-bottom 제거 */
  margin-bottom: 5px;
}

/* 모바일 노트 코드 컨테이너 */
.mobile-note-code-container {
  display: flex;
  width: 30%;
}

.mobile-note-code-container input {
  width: 70%;
  padding: 8px;
  font-size: 14px;
  border: 1px solid #ddd;
  border-radius: 8px 0 0 8px;
  transition: box-shadow 0.3s;
}

.mobile-note-code-container button {
  width: 30%;
  padding: 8px 0;
  font-size: 14px;
  border: none;
  background-color: #2196f3;
  color: white;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
}

/* 모바일 검색창 */
.mobile-search-bar {
  display: flex;
  width: 70%;
}

.mobile-search-bar input {
  width: 80%;
  padding: 8px;
  font-size: 14px;
  border: 1px solid #ddd;
  border-radius: 8px 0 0 8px;
  transition: box-shadow 0.3s;
}

.mobile-search-bar button {
  width: 20%;
  padding: 8px 0;
  font-size: 14px;
  border: none;
  background-color: #4caf50;
  color: white;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
}

/* 모바일 버전 기능 버튼 스타일 */
.function-buttons {
  width: 100%;
  display: flex;
  justify-content: space-around;
  padding: 5px 0;
  margin: 0;
  background-color: #f8f9fa;
  /* 회색 선 제거 */
}

/* 위경도 표시 오버레이 스타일 */
.coord-label {
  font-family: "Noto Sans KR", sans-serif;
  font-size: 12px;
  font-weight: bold;
  background: rgba(255, 255, 255, 0.95);
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #0077cc;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
  text-align: center;
  position: relative; /* 추가: 위치 기준으로 설정 */
  z-index: 10000; /* 추가: 매우 높은 z-index 값 부여 */
  pointer-events: all !important; /* 추가: 클릭 이벤트 보장 */
  touch-action: manipulation; /* 터치 이벤트 조작 옵션 추가 */
}

.coord-value {
  margin-bottom: 4px;
  font-size: 13px;
}

.coord-button-container {
  display: flex;
  justify-content: space-between;
  gap: 4px;
}

.coord-copy-btn,
.coord-close-btn {
  flex: 1;
  padding: 3px 0;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 11px;
  font-weight: bold;
  transition: background-color 0.2s;
  position: relative;
  z-index: 10001; /* 오버레이보다 더 높은 z-index */
  pointer-events: all !important; /* 버튼 클릭 이벤트 보장 */
  touch-action: manipulation; /* 터치 조작 개선 */
  -webkit-tap-highlight-color: transparent; /* iOS 터치시 하이라이트 제거 */
  -webkit-touch-callout: none; /* iOS 롱터치 메뉴 제거 */
  user-select: none; /* 텍스트 선택 방지 */
}

.coord-copy-btn {
  background-color: #0077cc;
  color: white;
}

.coord-copy-btn:hover {
  background-color: #0066bb;
}

.coord-close-btn {
  background-color: #ff5722;
  color: white;
}

.coord-close-btn:hover {
  background-color: #f44336;
}

/* 기본 전체 레이아웃 */
body {
  margin: 0;
  font-family: "Noto Sans KR", sans-serif;
  background-color: #f8f9fa;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  position: relative; /* 모바일에서 위치 기준 설정 */
  overscroll-behavior: none; /* 스크롤 오버슈팅 방지 */
}

/* 검색창 및 버튼 컨테이너 스타일 */
.search-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  gap: 10px;
  flex-wrap: wrap;
}

/* 버튼 그룹 스타일 */
.button-group {
  display: flex;
  gap: 8px;
  min-width: 100px; /* 최소 너비 추가 */
}

/* 검색창 스타일 */
.search-bar {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 800px;
  margin: 0 auto;
  min-width: 300px; /* 최소 너비 추가 */
  order: 0; /* 중앙에 위치하도록 설정 */
}

/* 검색 도움말 스타일 */
.search-tips {
  width: 100%;
  text-align: center;
  margin-top: 5px;
  color: #666;
  font-size: 12px;
}
.search-bar input {
  width: 60%;
  padding: 12px 16px;
  font-size: 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  transition: box-shadow 0.3s;
}
.search-bar input:focus {
  outline: 3px solid #2196f3;
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.5);
}
.search-bar button {
  padding: 12px 20px;
  font-size: 16px;
  border: none;
  background-color: #4caf50;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  margin-left: 10px;
}

.search-bar button:focus-visible {
  outline: 3px solid #2196f3;
  outline-offset: 2px;
  position: relative;
  z-index: 1050;
}
.search-bar button:hover {
  background-color: #45a049;
  transform: scale(1.05);
}

/* 검색 결과 스타일 */
.search-results {
  margin-top: 5px;
  padding: 0;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  max-height: 145px;
  overflow-y: auto;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1050;
}
.result-item {
  padding: 12px;
  font-size: 14px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s;
  background-color: white;
}

.result-item:last-child {
  border-bottom: none;
}

.no-result {
  padding: 15px;
  text-align: center;
  color: #666;
  font-style: italic;
}
.result-item:hover {
  background-color: #f8f8f8;
}
.map-link {
  margin-left: 10px;
  font-size: 12px;
  color: white;
  text-decoration: none;
  background-color: #4caf50;
  padding: 6px 12px;
  border-radius: 4px;
  display: inline-block;
}
.map-link:hover {
  background-color: #45a049;
}

/* 지도와 로드뷰 컨테이너 */
/* #container 관련 스타일은 map-fix.css로 변경되었습니다 */

/* #mapWrapper 내부에 버튼들을 절대 위치로 배치하기 위해 상대 위치 지정 */
#mapWrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

#roadview {
  display: none;
  width: 0;
  height: 100%;
  overflow: hidden; /* 오버플로우 방지 */
  box-sizing: border-box; /* 패딩이 너비/높이를 초과하지 않도록 */
}

/* 지도 영역 */
#map {
  width: 100%;
  height: 100%;
  flex-grow: 1;
}

/* 지도 컨트롤 버튼 공통 스타일 */
.map-button {
  background-color: #4caf50;
  color: white;
  border: none;
  padding: 5px 10px 5px 10px; /* 상하 패딩 조정 - 단축키 표시를 위한 공간 확보 */
  font-size: 20px;
  border-radius: 8px;
  cursor: pointer;
  z-index: 1100;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: background-color 0.3s, transform 0.2s;
  width: 44px; /* 고정 너비 설정 */
  height: 48px; /* 단축키 표시를 위한 높이 증가 */
  display: flex; /* 내부 콘텐츠 중앙 정렬 */
  justify-content: center; /* 가로축 중앙 정렬 */
  align-items: center; /* 세로축 중앙 정렬 */
  flex-direction: column; /* 수직 배치로 변경 - 아이콘과 텍스트 수직 배치 */
  position: relative; /* keyShortcut 요소의 위치지정을 위한 설정 */
}

.map-button:hover {
  background-color: #45a049;
  transform: scale(1.1);
}

/* 키보드 포커스 스타일 */
.map-button:focus-visible {
  outline: 3px solid #2196f3;
  outline-offset: 2px;
  position: relative;
  z-index: 1200;
}

/* 버튼 활성화 상태 스타일 */
.map-button.active {
  background-color: #ff5722;
  box-shadow: 0 2px 8px rgba(255, 87, 34, 0.4);
}

.map-button.active:hover {
  background-color: #f44336;
}

/* 좌측/우측 버튼 그룹 스타일 구분 */
.left-buttons .map-button.active,
#skyviewToggle-mobile.active,
#roadviewControl-mobile.active,
#statsToggle-mobile.active {
  background-color: #ff5722;
}

.right-buttons .map-button.active,
#distanceToggle-mobile.active,
#coordToggle-mobile.active,
#radiusToggle-mobile.active,
#highlightToggle-mobile.active,
#penDrawToggle-mobile.active {
  background-color: #8e44ad;
  box-shadow: 0 2px 8px rgba(142, 68, 173, 0.4);
}

.right-buttons .map-button.active:hover,
#distanceToggle-mobile.active:hover,
#coordToggle-mobile.active:hover,
#radiusToggle-mobile.active:hover,
#highlightToggle-mobile.active:hover,
#penDrawToggle-mobile.active:hover {
  background-color: #7d3c98;
}

/* 통계 오버레이 */
.stats-overlay {
  position: absolute;
  top: 10px;
  left: 20px;
  max-width: 300px;
  padding: 10px;
  background-color: rgba(255, 255, 255, 0.98);
  border: 1px solid #ddd;
  border-radius: 8px;
  z-index: 1200;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: none;
  font-size: 14px;
  line-height: 1.5;
}

/* 커스텀 라벨 스타일 */
.label {
  padding: 1px 5px;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 13px;
  font-weight: bold;
  position: relative;
  z-index: 9999;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #333;
  /* 접근성 개선을 위한 터치 타격 크기 증가 */
  min-width: 24px;
  min-height: 24px;
}
.child-zone {
  background-color: #fff3f3;
  border: 1px solid #ff4444;
  color: #ff4444;
  /* 접근성 개선을 위한 컨트라스트 증가 */
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(255, 68, 68, 0.3);
}

/* 모바일 대응 (세로 및 가로 모드 공통) */
@media (max-width: 1024px) {
  /* 데스크톱 버전 버튼 그룹 숨기기 */
  .desktop-only {
    display: none !important;
  }

  /* 검색 컨테이너 모바일에서 완전히 숨기기 */
  .search-container {
    display: none !important;
  }

  /* 모바일 버전 버튼 그룹 표시 */
  .mobile-only {
    display: flex;
    flex-direction: column;
  }

  /* 모바일 노트/검색 컨테이너 표시 */
  .mobile-search-note-container {
    display: flex;
  }

  .search-results {
    max-height: 165px; /* 3개 가량의 항목이 보이도록 조정 */
    width: 95%;
    margin: 5px auto;
    z-index: 9999;
    position: absolute;
    display: block;
    left: 2.5%;
    right: 2.5%;
    top: 110px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
    border: 1px solid #999;
    background-color: rgba(255, 255, 255, 0.95);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
  }

  /* 모바일 가로 모드 대응 */
  @media (max-width: 1024px) and (orientation: landscape) {
    /* 데스크톱 버전 버튼 그룹 숨기기를 강제하여 버그 방지 */
    .search-container {
      display: none !important;
    }
    /* 모바일 가로 모드에서도 모바일 UI 요소 표시 유지 */
    .desktop-only {
      display: none !important;
    }

    .mobile-only {
      display: flex;
      flex-direction: column;
    }

    /* 모바일 노트/검색 컨테이너 표시 유지 */
    .mobile-search-note-container {
      display: flex;
      position: absolute;
      top: 0;
      width: 100%;
      z-index: 1000;
      background-color: rgba(248, 249, 250, 0.95);
    }

    /* 가로 모드에서 기능 버튼 위치 조정 */
    .function-buttons {
      position: absolute;
      top: 50px;
      left: 0;
      flex-direction: column;
      width: auto;
      height: auto;
      z-index: 1000;
      background-color: rgba(248, 249, 250, 0.8);
      padding: 8px 5px;
      border-radius: 0 8px 8px 0;
    }

    /* 가로 모드에서 버튼 간격 조정 */
    .function-buttons .map-button {
      margin-bottom: 8px;
    }

    /* 가로 모드에서 버튼 사이즈 조정 */
    .function-buttons .map-button {
      width: 40px;
      height: 40px;
      font-size: 16px;
    }

    /* 검색 결과 위치 조정 */
    .search-results {
      top: 50px;
    }

    /* 가로 모드에서 컨테이너 레이아웃 조정 */
    #container {
      padding-top: 50px; /* 검색/노트 컨테이너 높이만큼 패딩 추가 */
    }

    /* 가로 모드에서 로드뷰 활성화 시만 좌우 배치로 변경 - 중요! */
    #container.roadview-active {
      flex-direction: row !important; /* 로드뷰 활성화 시에만 적용 */
    }

    /* 가로 모드에서 로드뷰 활성화 시 레이아웃 */
    #container.roadview-active #roadview {
      width: 50% !important;
      height: 100% !important;
      border-top: none !important;
      border-left: 1px solid #ddd;
    }

    #container.roadview-active #mapWrapper {
      width: 50% !important;
      height: 100% !important;
    }

    /* 가로 모드에서도 단축키 숨기기 */
    .key-shortcut {
      display: none !important;
    }

    /* 가로 모드에서 통계 오버레이 위치 조정 - 삭제하고 자바스크립트로 처리 */
    /* 이부분은 자바스크립트에서 처리하도록 수정했습니다 */
  }

  /* 스크롤바 스타일 */
  .search-results::-webkit-scrollbar {
    width: 8px;
  }

  .search-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 8px;
  }

  .search-results::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 8px;
  }

  .search-results::-webkit-scrollbar-thumb:hover {
    background: #666;
  }

  .result-item {
    padding: 12px;
    font-size: 15px;
    border-bottom: 1px solid #e0e0e0;
  }

  /* 마지막 검색 결과 항목의 구분선 제거 */
  .result-item:last-child {
    border-bottom: none;
  }

  .map-link {
    padding: 8px 10px;
    font-size: 13px;
    font-weight: bold;
    background-color: #3498db;
  }

  #container {
    flex-direction: column;
  }

  .map-button {
    padding: 8px;
    font-size: 18px;
    width: 48px; /* 모바일용 고정 너비 증가 */
    height: 48px; /* 모바일용 고정 높이 증가 */
  }

  /* 로드뷰 모바일 스타일 */
  #roadview {
    overflow: hidden;
    box-sizing: border-box;
    border-top: 1px solid #ddd;
    margin-bottom: env(safe-area-inset-bottom, 0); /* iOS 하단 안전영역 고려 */
    padding-bottom: 30px; /* 추가 하단 여백 */
  }

  .stats-overlay {
    top: 10px; /* 상단으로 위치 변경 */
    bottom: auto; /* 하단 위치 제거 */
    right: auto;
    left: 10px;
    max-width: 260px;
    max-height: 80vh; /* 화면 높이의 40%로 제한 */
    overflow-y: auto; /* 내용이 많으면 스크롤 표시 */
    padding: 8px;
    font-size: 13px;
    z-index: 1200;
  }

  .color-picker-panel {
    right: 10px;
    top: auto;
    bottom: 80px;
    max-width: 180px;
  }

  /* 모바일 환경에서는 텍스트 상자 기능 패널 숨김 */
  .textbox-settings-panel {
    display: none !important;
  }

  /* 모바일 환경의 노트 오버레이 위치 수정 */
  .note-overlay {
    width: 90%;
    max-width: 320px;
    left: 5%;
    top: 100px;
    transform: none;
    max-height: 60vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* 모바일에서 더 큰 노트 에디터 */
  .note-editor {
    min-height: 120px;
    width: calc(100% - 12px);
    padding: 5px;
  }

  /* 모바일 환경에서 드래그 핸들 강조 */
  .note-header {
    background-color: #f0f7ff;
    padding: 8px 5px;
    border-radius: 5px;
    margin-bottom: 12px;
  }
}

/* ---------- MapWalker 스타일 (로드뷰 아이콘 회전용) ---------- */
.MapWalker {
  position: absolute;
  margin: -26px 0 0 -51px;
}
.MapWalker .figure {
  position: absolute;
  width: 25px;
  left: 38px;
  top: -2px;
  height: 39px;
  background: url(https://t1.daumcdn.net/localimg/localimages/07/2018/pc/roadview_minimap_wk_2018.png) -298px -114px
    no-repeat;
}
.MapWalker .angleBack {
  width: 102px;
  height: 52px;
  background: url(https://t1.daumcdn.net/localimg/localimages/07/2018/pc/roadview_minimap_wk_2018.png) -834px -2px
    no-repeat;
}
.MapWalker.m0 .figure {
  background-position: -298px -114px;
}
.MapWalker.m1 .figure {
  background-position: -335px -114px;
}
.MapWalker.m2 .figure {
  background-position: -372px -114px;
}
.MapWalker.m3 .figure {
  background-position: -409px -114px;
}
.MapWalker.m4 .figure {
  background-position: -446px -114px;
}
.MapWalker.m5 .figure {
  background-position: -483px -114px;
}
.MapWalker.m6 .figure {
  background-position: -520px -114px;
}
.MapWalker.m7 .figure {
  background-position: -557px -114px;
}
.MapWalker.m8 .figure {
  background-position: -2px -114px;
}
.MapWalker.m9 .figure {
  background-position: -39px -114px;
}
.MapWalker.m10 .figure {
  background-position: -76px -114px;
}
.MapWalker.m11 .figure {
  background-position: -113px -114px;
}
.MapWalker.m12 .figure {
  background-position: -150px -114px;
}
.MapWalker.m13 .figure {
  background-position: -187px -114px;
}
.MapWalker.m14 .figure {
  background-position: -224px -114px;
}
.MapWalker.m15 .figure {
  background-position: -261px -114px;
}
.MapWalker.m0 .angleBack {
  background-position: -834px -2px;
}
.MapWalker.m1 .angleBack {
  background-position: -938px -2px;
}
.MapWalker.m2 .angleBack {
  background-position: -1042px -2px;
}
.MapWalker.m3 .angleBack {
  background-position: -1146px -2px;
}
.MapWalker.m4 .angleBack {
  background-position: -1250px -2px;
}
.MapWalker.m5 .angleBack {
  background-position: -1354px -2px;
}
.MapWalker.m6 .angleBack {
  background-position: -1458px -2px;
}
.MapWalker.m7 .angleBack {
  background-position: -1562px -2px;
}
.MapWalker.m8 .angleBack {
  background-position: -2px -2px;
}
.MapWalker.m9 .angleBack {
  background-position: -106px -2px;
}
.MapWalker.m10 .angleBack {
  background-position: -210px -2px;
}
.MapWalker.m11 .angleBack {
  background-position: -314px -2px;
}
.MapWalker.m12 .angleBack {
  background-position: -418px -2px;
}
.MapWalker.m13 .angleBack {
  background-position: -522px -2px;
}
.MapWalker.m14 .angleBack {
  background-position: -626px -2px;
}
.MapWalker.m15 .angleBack {
  background-position: -730px -2px;
}

/* ---------- 거리 측정 정보 스타일 (dotOverlay) ---------- */
.dotOverlay {
  font-family: "Noto Sans KR", sans-serif;
  font-size: 12px;
  font-weight: bold;
  color: red;
  background: rgba(255, 255, 255, 0.9);
  padding: 6px 10px;
  border-radius: 8px;
  border: 2px solid #ff5722;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ---------- 반경 측정 정보 스타일 ---------- */
.radiusInfo {
  color: #0066cc;
  border-color: #0066cc;
  z-index: 1100;
}

/* ---------- 형광펜 영역 스타일 ---------- */
.color-picker-panel {
  max-width: 200px;
  transition: all 0.3s ease;
}

/* ---------- 자유 펜 그리기 영역 스타일 ---------- */
.pendraw-toggle {
  position: relative;
}

/*
.pendraw-toggle::after {
  content: "Beta";
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: #ff5722;
  color: white;
  font-size: 8px;
  padding: 2px 4px;
  border-radius: 8px;
  line-height: 1;
}
*/

/* ---------- 텍스트 상자 관련 스타일 ---------- */
.textbox-toggle {
  position: relative;
}

/*
.textbox-toggle::after {
  content: "Beta";
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: #ff5722;
  color: white;
  font-size: 8px;
  padding: 2px 4px;
  border-radius: 8px;
  line-height: 1;
}
*/
.textbox-settings-panel {
  z-index: 1200;
}

.kakao-map-textbox {
  font-family: "Noto Sans KR", sans-serif;
  z-index: 1100;
  min-width: 100px;
  min-height: 50px;
  user-select: text;
}

.kakao-map-textbox:focus {
  outline: 2px dashed #0066cc;
  cursor: text;
}

/* ---------- 설정 버튼 및 패널 관련 스타일 ---------- */
/* 이 스타일은 styles-settings.css로 분리발견 되었습니다 */

/* ---------- 노트 기능 관련 스타일 ---------- */
.note-code-container {
  display: flex;
  align-items: center;
  margin: 0 10px;
  flex-shrink: 0;
  order: -1; /* 좌측에 위치하도록 설정 */
}

.note-code-container input {
  width: 120px;
  padding: 8px 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 8px 0 0 8px;
  outline: none;
  transition: border-color 0.2s;
}

.note-code-container input:focus {
  outline: none;
  border-color: #2196f3;
  box-shadow: 0 0 5px rgba(33, 150, 243, 0.5);
}

.note-code-container button {
  padding: 8px 10px;
  font-size: 14px;
  border: none;
  background-color: #2196f3;
  color: white;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  transition: background-color 0.3s;
}

.note-code-container button:hover {
  background-color: #0d8aee;
}

.note-toggle {
  background-color: #2196f3;
}

.note-toggle:hover {
  background-color: #0d8aee;
}

.note-toggle.active {
  background-color: #ff9800 !important;
}

.left-buttons .map-button.note-toggle.active,
#noteToggle-mobile.active {
  background-color: #ff9800 !important;
}

.left-buttons .map-button.note-toggle:hover.active,
#noteToggle-mobile:hover.active {
  background-color: #e88c00 !important;
}

/* 노트 오버레이 스타일 */
.note-overlay {
  background-color: rgba(255, 255, 255, 0.98);
  border: 2px solid #2196f3;
  border-radius: 10px;
  padding: 15px;
  width: 350px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  position: fixed; /* fixed로 설정하여 플로팅되도록 */
  z-index: 9999;
  top: 100px;
  right: 30px;
  max-height: 70vh;
  overflow-y: auto;
  transition: transform 0.1s ease;
  will-change: transform;
  user-select: none; /* 텍스트 영역 제외 선택 방지 */
}

/* 노트 헤더 스타일 */
.note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 5px;
  margin-bottom: 10px;
  border-bottom: 1px solid #e0e0e0;
  cursor: move; /* 드래그 가능함을 표시 */
}

.note-title {
  font-weight: bold;
  font-size: 14px;
  color: #2196f3;
  flex: 1;
}

.note-status {
  font-size: 12px;
  color: #757575;
  padding: 2px 5px;
  border-radius: 3px;
}

.note-status.loading,
.note-status.saving {
  color: #ff9800;
}

.note-status.error {
  color: #f44336;
}

.note-status.local {
  color: #4caf50;
}

.note-status.new {
  color: #2196f3;
}

.note-editor {
  width: calc(100% - 22px); /* 패딩을 고려한 너비 조정 */
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  padding: 10px;
  font-size: 14px;
  resize: vertical;
  min-height: 150px;
  font-family: "Noto Sans KR", sans-serif;
  overflow-x: hidden; /* 가로 스크롤바 제거 */
  overflow-wrap: break-word; /* 긴 텍스트 개행 */
  word-wrap: break-word;
  user-select: text; /* 텍스트 선택 허용 */
  margin-bottom: 10px; /* 버튼과의 간격 조정 */
}

.note-editor:focus {
  outline: none;
  border-color: #2196f3;
  box-shadow: 0 0 5px rgba(33, 150, 243, 0.2);
}

/* 버튼 컨테이너 */
.note-button-container {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 10px;
}

.note-save-btn,
.note-refresh-btn,
.note-close-btn {
  padding: 8px 15px;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.note-save-btn {
  background-color: #4caf50;
}

.note-save-btn:hover {
  background-color: #3d8b40;
}

.note-refresh-btn {
  background-color: #2196f3;
}

.note-refresh-btn:hover {
  background-color: #0d8aee;
}

.note-close-btn {
  background-color: #f44336;
}

.note-close-btn:hover {
  background-color: #d32f2f;
}

/* 마지막 수정 시간 */
.note-last-edited {
  font-size: 12px;
  color: #757575;
  text-align: right;
  margin-top: 5px;
  font-style: italic;
}

.note-close-btn:hover {
  background-color: #d32f2f;
}

/* 노트 알림 메시지 스타일 */
.note-alert {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(33, 150, 243, 0.9);
  color: white;
  padding: 12px 20px;
  border-radius: 5px;
  font-size: 14px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.note-alert.fade-out {
  animation: fadeOut 0.5s ease-in-out;
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -20px);
  }
}

/* ===============================
   검색 핫키 관련 스타일
   =============================== */

/* 검색창 포커스 강조 효과 */
#searchInput:focus,
#searchInput-mobile:focus {
  border: 2px solid #007bff !important;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.5) !important;
  outline: none;
}

/* 검색창 핫키 힌트 */
.search-hotkey-hint {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: #666;
  background-color: rgba(0, 0, 0, 0.1);
  padding: 2px 6px;
  border-radius: 3px;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.search-bar {
  position: relative;
}

.search-bar input:focus + .search-hotkey-hint,
.mobile-search-bar input:focus + .search-hotkey-hint {
  opacity: 0;
}

/* 모바일 검색창 스타일 개선 */
.mobile-search-bar {
  position: relative;
}

/* 검색 활성화 애니메이션 */
@keyframes searchHighlight {
  0% {
    box-shadow: 0 0 0 rgba(0, 123, 255, 0.5);
  }
  50% {
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.8);
  }
  100% {
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
  }
}

.search-input-highlight {
  animation: searchHighlight 1s ease-in-out;
}

/* 검색창 플레이스홀더 개선 */
#searchInput::placeholder,
#searchInput-mobile::placeholder {
  color: #999;
  font-style: italic;
}

/* 전역 핫키 비활성화 표시 */
.hotkey-disabled {
  opacity: 0.6;
  pointer-events: none;
}

/* 검색 결과 강조 */
.search-result-highlight {
  background-color: rgba(255, 235, 59, 0.3);
  padding: 2px 4px;
  border-radius: 3px;
  font-weight: bold;
}
