/* 커스텀 스타일 적용 (커서 모양 이벤트 처리 없이 css로 변경)*/
.leaflet-container {
  cursor: crosshair !important;
}

.leaflet-dragging .leaflet-container {
  cursor: grabbing !important;
}

.leaflet-container:active {
  cursor: grabbing !important; /* 마우스 다운 시 */
}

.leaflet-control-custom {
  position: absolute;
  top: 0px;
  right: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: nLone;
  background: rgba(255, 255, 255, 0.8);
  padding: 5px;
  border-radius: 5px;

  /* 마우스 복사 방지 */
  user-select: none; /* 텍스트 선택 불가 */
}
.settings-icon {
  font-size: 20px;
}

.settings-icon:hover {
  cursor: pointer;
}

#checkboxContainer {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 40px;
  right: 0px;
  background-color: white;
  opacity: 0.8; /* 투명도 조정 */
  width: 280px; /* 너비 조정 */
  max-height: 355px; /* 최대 높이 설정 */
  overflow-y: auto;
  padding: 1rem 0 1rem 0; /* 패딩 조정 */
  border-radius: 0.5rem; /* 둥근 모서리 조정 */
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.2); /* 그림자 조정 */
  border: none;
  font-size: 0.6rem; /* 폰트 크기 조정 */
  color: #333; /* 글자색 조정 */
}

#checkboxContainer.active {
  display: flex;
}

.parent {
  display: flex;
  flex-direction: row;
  gap: 15px; /* 자식 요소들 사이의 간격 조절 */
}

.form-check {
  height: auto; /* 높이 자동 조정 */
  margin-bottom: 0.25rem; /* 간격 추가 */
  display: flex; /* Flexbox 사용 */

  align-items: center; /* 수직 가운데 정렬 */
  text-align: start; /* 텍스트 정렬 */
}

/* 스크롤바 스타일 */
#checkboxContainer::-webkit-scrollbar {
  width: 0.5rem;
}

#checkboxContainer::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 0.25rem;
}

#checkboxContainer::-webkit-scrollbar-thumb {
  background: #aaa;
  border-radius: 0.25rem;
}

#checkboxContainer::-webkit-scrollbar-thumb:hover {
  background: #888;
}

.options {
  font-weight: bold;
  margin-bottom: 0.5rem; /* 간격 추가 */
}

.custom-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem; /* 간격 추가 */
}

#scaleRatio {
  position: absolute;
  bottom: 30px;
  left: 7px;
  background-color: rgba(255, 255, 255, 0.4);
  color: black;
  padding: 3px 6px;
  font-size: 10px;
  z-index: 1000;
}

/* 줌 레벨 표시 */
#zoom-range-container {
  position: absolute;
  top: 12px;
  left: 50px;
  z-index: 1000;
  font-size: 32px;
  padding: 5px;
  color: black; /* 텍스트 색상 */
  text-shadow: 1.5px 1.5px 0px white, -1.5px 1.5px 0px white,
    1.5px -1.5px 0px white, -1.5px -1.5px 0px white; /* 흰색 보더 효과 */
}

/* 선박 이름 텍스트 스타일 */
.ais-label {
  font-size: 14px; /* 글꼴 크기 */
  font-weight: bold; /* 굵은 글꼴 */
  color: black; /* 글자 색상 */
  text-align: center; /* 텍스트 가운데 정렬 */
  white-space: nowrap; /* 줄 바꿈 방지 */
  text-shadow: -1px -1px 0 white, 1px -1px 0 white, -1px 1px 0 white,
    1px 1px 0 white; /* 흰색 테두리 */
}

.ais-label:hover {
  cursor: default;
}

.mouse-position {
  background-color: rgba(255, 255, 255, 0.7);
  padding: 5px;
  border-radius: 5px;
  font-size: 12px;
}

/* AIS 데이터 팝업 스타일 */

.custom-popup .leaflet-popup-content-wrapper {
  background: transparent;
  padding: 0;
  border-radius: 12px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45);
}

.custom-popup .leaflet-popup-content {
  margin: 0;
  width: min(380px, calc(100vw - 32px)) !important;
}

.custom-popup .leaflet-popup-tip {
  background-color: rgba(0, 0, 0, 0.45); /* 팝업 배경과 동일 */
  border: none; /* 테두리 제거로 깔끔하게 */
}

.ais-popup {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(26, 31, 38, 0.97), rgba(13, 16, 21, 0.97));
  color: #f5f7fa;
  font-family: Arial, sans-serif;
}

.ais-popup-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  padding: 0 2px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.ais-popup-heading span {
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.ais-popup-heading small {
  color: #7f8b98;
  font-size: 10px;
  white-space: nowrap;
}

.ais-popup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  max-height: min(520px, calc(100vh - 240px));
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-color: #647384 rgba(255, 255, 255, 0.06);
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.ais-popup-grid::-webkit-scrollbar {
  width: 8px;
}

.ais-popup-grid::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.ais-popup-grid::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: #647384;
  background-clip: padding-box;
}

.ais-popup-grid::-webkit-scrollbar-thumb:hover {
  background: #8493a3;
  background-clip: padding-box;
}

.ais-popup-field {
  display: grid;
  grid-template-rows: auto minmax(18px, auto);
  align-content: center;
  min-height: 42px;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.15s, background-color 0.15s;
}

.ais-popup-field:hover {
  border-color: rgba(78, 161, 255, 0.35);
  background: rgba(78, 161, 255, 0.07);
}

.ais-popup-field.is-primary {
  border-color: rgba(78, 161, 255, 0.22);
  background: rgba(78, 161, 255, 0.075);
}

.ais-popup-label {
  box-sizing: border-box;
  padding: 4px 8px 0px;
  color: #8491a0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
}

.ais-popup-value {
  min-width: 0;
  overflow: hidden;
  padding: 1px 8px 4px;
  color: #f7f9fb;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}


.ais-popup-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.track-duration-select,
.track-view-btn {
  width: 100%;
  height: 34px;
  box-sizing: border-box;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
}

.track-duration-select {
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  outline: none;
  background: #232a33;
  color: #f5f7fa;
  cursor: pointer;
}

.track-duration-select:focus {
  border-color: #4ea1ff;
  box-shadow: 0 0 0 2px rgba(78, 161, 255, 0.18);
}

.track-view-btn {
  border: 1px solid #1684ec;
  background: linear-gradient(180deg, #2495ff, #0879e2);
  color: #fff;
  cursor: pointer;
  transition: filter 0.15s, transform 0.15s;
}

.track-view-btn:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.track-view-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* 마우스 움직일 때 위경도 위치 표시 */
#custom-position-div {
  position: absolute;
  bottom: 6px;
  background-color: rgba(0, 0, 0, 0.4);
  padding: 4px 8px;
  color: lightgray;
  font-size: 16px;
  z-index: 1000;
  left: 50%;
  font-weight: bold;
  transform: translateX(-50%);
}

@media (max-width: 600px) {
  .custom-popup .leaflet-popup-content {
    width: min(340px, calc(100vw - 32px)) !important;
  }

  .ais-popup {
    padding: 10px;
  }

  .ais-popup-grid {
    grid-template-columns: 1fr;
    max-height: min(360px, calc(100vh - 210px));
  }

  .ais-popup-field {
    min-height: 44px;
  }

  #custom-position-div {
    left: auto; /* 왼쪽 정렬 해제 */
    right: 0px; /* 오른쪽 정렬 */
    bottom: 22px;
    transform: none; /* 중앙 정렬 해제 */
    font-size: 14px;
  }
}

/* Custom colored markers */
.leaflet-div-icon.red-marker {
  background-color: red;
  border-radius: 50%; /* 원형으로 만듭니다 */
  width: 20px;
  height: 20px;
  border: 2px solid white; /* 가시성을 위한 흰색 테두리 */
  transform: translate(-50%, -50%); /* 아이콘 중앙 정렬 */
}

.leaflet-div-icon.blue-marker {
  background-color: blue;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  border: 2px solid white;
  transform: translate(-50%, -50%);
}

/* 통합 검색 컨트롤러 스타일 */
.map-search-container {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.95);
  padding: 8px 12px;
  border-radius: 24px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.1);
  font-family: Arial, sans-serif;
  gap: 10px;
  width: auto;
  max-width: 90vw;
  box-sizing: border-box;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 모바일 전용 접기/토글 스타일 (768px 이하) */
@media (max-width: 768px) {
  /* 접혀 있을 때: 화면 상단 정중앙에 동그란 돋보기 버튼으로 대칭 정렬 */
  .map-search-container {
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    justify-content: center;
    border-radius: 50% !important; /* 완벽한 정원형 버튼 */
    cursor: pointer;
    overflow: hidden;
    left: 50%;
    top: 10px;
    transform: translateX(-50%); /* 가로축 정중앙 배치 */
    background-color: white !important;
    border: 2px solid rgba(0, 0, 0, 0.2) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
  }

  /* 접힌 상태에서는 자식 요소들을 숨기고 가상 요소로 돋보기 출력 */
  .map-search-container:not(.expanded) > * {
    display: none !important;
  }

  .map-search-container:not(.expanded)::before {
    content: "🔍";
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
  }

  /* 펼쳐진 모바일 검색창 상태: 정중앙 중심축을 유지하며 콤팩트한 폭(max-width: 340px)으로 팽창 */
  .map-search-container.expanded {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 88vw !important; /* 너무 가로 폭이 차지 않도록 단축 */
    max-width: 340px !important; /* 모바일 기기별 콤팩트화 */
    height: auto !important;
    border-radius: 24px !important;
    padding: 6px 10px !important;
    background-color: #ffffff !important; /* 순백색 불투명 적용 */
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25) !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    z-index: 2000 !important; /* 최상단 위상 보장 */
    cursor: default;
    overflow: visible !important; /* 컨테이너 아래의 검색 결과 드롭다운이 잘리지 않도록 허용 */
  }

  .map-search-container.expanded > *:not(.search-dropdown-menu) {
    display: flex !important;
  }

  .map-search-container.expanded .search-dropdown-menu {
    z-index: 2010;
  }
  
  .map-search-container.expanded .search-close-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }
}

/* 검색 모드 라디오 영역 */
.search-mode-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  border-right: 1px solid #ddd;
  padding-right: 12px;
  white-space: nowrap;
}

.search-mode-label {
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: bold;
  color: #444;
  cursor: pointer;
  margin: 0;
  gap: 4px;
  user-select: none;
}

.search-mode-label input[type="radio"] {
  cursor: pointer;
  margin: 0;
}

/* 입력 필드 */
.search-input-wrapper {
  flex: 1;
  min-width: 50px;
}

.search-input-field {
  width: 100%;
  max-width: 280px;
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-radius: 18px;
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}


.search-input-field:focus {
  border-color: #007bff;
  box-shadow: 0 0 4px rgba(0, 123, 255, 0.25);
}

/* 검색 버튼 */
.search-action-btn {
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 18px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
  white-space: nowrap;
}

.search-action-btn:hover {
  background-color: #0056b3;
}

.search-action-btn:active {
  background-color: #004085;
}

/* 자동완성 및 결과 드롭다운 */
.search-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0; /* 전체 검색바 좌우 끝까지 100% 채움 */
  width: auto; /* 고정폭 해제 */
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  border: 1px solid #e0e0e0;
  max-height: 220px;
  overflow-y: auto;
  z-index: 1010;
  list-style: none;
  padding: 0;
  margin: 0;
  display: none;
}

.search-dropdown-item {
  padding: 10px 14px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.15s;
  display: flex; /* 아이콘과 텍스트 수평 배치 */
  align-items: center;
  overflow: hidden;
}

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

.search-dropdown-item:hover {
  background-color: #f5f5f5;
}

.search-dropdown-item .item-meta {
  font-size: 11px;
  color: #777;
  margin-top: 3px;
}

/* 반응형 처리 */
@media (max-width: 600px) {
  .map-search-container {
    top: 5px;
    padding: 6px 10px;
    border-radius: 12px;
    gap: 6px;
  }
  .search-mode-selector {
    padding-right: 6px;
    gap: 4px;
  }
  .search-mode-label {
    font-size: 11px; /* 모바일 전용으로 자간/폰트 축소 */
    gap: 2px;
  }
  .search-input-field {
    width: 100%; /* 고정폭 150px 해제 및 유동 크기 적용 */
    min-width: 60px;
    padding: 5px 8px;
  }
  .search-action-btn {
    padding: 5px 10px;
  }
}


/* 정적 항적 표시 패널 */
.track-display-panel {
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1100;
  background-color: rgba(30, 30, 30, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 10px 12px 10px 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  width: 92vw;
  max-width: 520px;
  box-sizing: border-box;
  color: #fff;
  font-family: Arial, sans-serif;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.track-display-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.track-display-summary {
  font-size: 13px;
  font-weight: 700;
}

.track-display-range {
  overflow: hidden;
  color: #00fa9a;
  font-family: "Courier New", Courier, monospace;
  font-size: 11px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-display-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.track-display-refresh {
  height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(78, 161, 255, 0.4);
  border-radius: 6px;
  background: rgba(78, 161, 255, 0.15);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 0.2s, border-color 0.2s;
}

.track-display-refresh:hover:not(:disabled) {
  background: rgba(78, 161, 255, 0.3);
  border-color: rgba(78, 161, 255, 0.6);
}

.track-display-refresh:disabled {
  opacity: 0.6;
  cursor: wait;
}

.track-point-icon {
  border: 0;
  background: transparent;
}

.track-point-dot {
  display: block;
  width: 10px;
  height: 10px;
  box-sizing: border-box;
  margin: 4px;
  border: 1.5px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.track-point-dot.is-start {
  background: #28a745;
}

.track-point-dot.is-end {
  background: #dc3545;
}

.track-point-dot.is-single {
  background: #8b5cf6;
}

.track-point-icon:hover .track-point-dot {
  transform: scale(1.35);
  box-shadow: 0 3px 11px rgba(0, 0, 0, 0.7);
}

.track-display-close {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(220, 53, 69, 0.5);
  border-radius: 6px;
  background: rgba(220, 53, 69, 0.2);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.track-display-close:hover {
  background: rgba(220, 53, 69, 0.45);
}

.track-panel-select {
  padding: 1px 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: #1e1e1e;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
}

.track-panel-select:focus {
  border-color: #4ea1ff;
}

@media (max-width: 600px) {
  .track-display-panel {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 12px;
    bottom: 45px;
    width: 95vw;
  }
  .track-display-summary {
    font-size: 12px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
  }
  .track-panel-select {
    padding: 1px 4px;
    font-size: 11px;
  }
  .track-display-range {
    font-size: 10px;
  }
  .track-display-actions {
    justify-content: flex-end;
    gap: 6px;
  }
  .track-display-refresh {
    height: 30px;
    padding: 0 10px;
    font-size: 11px;
  }
  .track-display-close {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    font-size: 12px;
  }
}

/* 팝업이 닫혀도 유지되는 항적 요청 상태 */
.track-request-panel {
  position: absolute;
  left: 50%;
  bottom: 82px;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(460px, calc(100vw - 32px));
  box-sizing: border-box;
  padding: 11px 12px 11px 16px;
  transform: translateX(-50%);
  border: 1px solid rgba(78, 161, 255, 0.35);
  border-radius: 11px;
  background: rgba(24, 30, 38, 0.97);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.38);
  color: #fff;
  font-family: Arial, sans-serif;
}

.track-request-panel.is-timeout,
.track-request-panel.is-error,
.track-request-panel.is-empty {
  border-color: rgba(255, 184, 77, 0.5);
}

.track-request-message {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.track-request-message strong {
  font-size: 12px;
}

.track-request-message small {
  overflow: hidden;
  color: #b9c3cf;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-request-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.track-request-actions button {
  height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.track-request-actions button:hover {
  background: rgba(255, 255, 255, 0.16);
}

.track-request-retry {
  border-color: #1684ec !important;
  background: #0879e2 !important;
}

/* 신규 항적 모드 관련 UI 및 선택된 선박 글로우 스타일 */
.vessel-track-control-panel {
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1100;
  background-color: rgba(30, 30, 30, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 10px 16px;
  width: 92vw;
  max-width: 600px; /* 기존 520px에서 영어 레이아웃 가독성을 위해 확장 */
  box-sizing: border-box;

  color: #fff;
  font-family: Arial, sans-serif;
  transition: opacity 0.25s, visibility 0.25s;
}

.vessel-track-control-panel.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.track-panel-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.track-panel-title {
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-panel-select {
  padding: 2px 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: #1e1e1e;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  flex-shrink: 0; /* 우측 찌그러짐 방지 */
}

.track-panel-select:focus {
  border-color: #00ffff;
}

.track-panel-btn {
  height: 30px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  white-space: nowrap; /* 글자 줄바꿈 방지 */
  flex-shrink: 0;      /* 가로폭 찌그러짐 차단 */
}


.track-panel-close-btn {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(220, 53, 69, 0.5);
  border-radius: 6px;
  background: rgba(220, 53, 69, 0.2);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.track-panel-close-btn:hover {
  background: rgba(220, 53, 69, 0.45);
}

/* 선택된 선박 마커 이미지에는 글로우를 부여하지 않음 (시각적 부담 경감) */
.leaflet-marker-icon.vessel-selected {
  filter: none !important;
}


/* 선택된 선박명 라벨 텍스트 박스 하이라이트 (레이아웃 변형 없는 고대비 하늘색 글자 스타일) */
.ais-label.vessel-selected {
  color: #00ffff !important;
  text-shadow: -1.5px -1.5px 0 #000, 1.5px -1.5px 0 #000, -1.5px 1.5px 0 #000, 1.5px 1.5px 0 #000 !important;
  font-weight: bold;
}



/* 팝업 내부 탭 UI 스타일 */
.popup-tabs-header {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  margin-bottom: 10px;
  gap: 4px;
}

.popup-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #a0aec0;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  outline: none;
  transition: color 0.2s, border-color 0.2s;
}

.popup-tab-btn:hover {
  color: #fff;
}

.popup-tab-btn.active {
  color: #00ffff;
  border-bottom-color: #00ffff;
}

.popup-tab-content {
  display: none;
}

.popup-tab-content.active {
  display: block;
}

/* 항적정보 탭 특화 스타일 */
.track-tab-detail-info {
  padding: 10px 4px;
  color: #e2e8f0;
}

.track-tab-detail-info h6 {
  color: #00ffff;
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 8px;
}

.track-tab-detail-info p {
  font-size: 11px;
  line-height: 1.5;
  margin-bottom: 6px;
  color: #a0aec0;
}

/* 선박 라벨 Info 아이콘 스타일 */
.ais-label-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  color: #1e90ff;
  cursor: pointer;
  font-size: 12px;
  transition: color 0.15s, transform 0.15s;
  vertical-align: middle;
}

.ais-label-info-btn:hover {
  color: #63b3ff;
  transform: scale(1.25);
}


/* 단독 항적모드 토글 컨테이너 */
.track-toggle-container {
  position: absolute;
  top: 10px;
  right: 95px; /* 설정 버튼 right: 5px, 대권항로 right: 55px 옆에 완벽 배치 */
  z-index: 1000;
  background-color: rgba(30, 30, 30, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
}

/* 탭 전환 시 높이 변화 현상 방지를 위한 본문 랩 높이 고정 */
.popup-tab-body {
  height: 280px; /* 6줄 격자 카드가 가장 아름답게 차오르는 높이 */
  min-height: 280px;
  overflow-y: auto;
  box-sizing: border-box;
}

.popup-tab-body .ais-popup-grid {
  height: 100%;
  max-height: none !important; /* 팝업 탭 바디 내에서 직접 컨트롤하므로 기존 스크롤 오버라이드 */
}

/* 실시간 선박 이미지 마커는 클릭 비활성화되었으므로 손가락 커서 제외 */
.ais-ship-icon {
  cursor: default !important;
}

/* 모바일/태블릿 화면 크기(768px 이하)에서 다중 선택 가이드 문구 숨김 */
@media (max-width: 768px) {
  .track-multiselect-guide {
    display: none !important;
  }
}


/* 하단 패널 위로 펼쳐지는 선택 선박 목록 드로어 스타일 */
.selected-vessels-drawer {
  position: absolute;
  bottom: 100%; /* 하단 패널 바로 위에 밀착 */
  left: 0;
  right: 0;
  background: rgba(26, 32, 44, 0.96);
  border: 1px solid #4a5568;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  max-height: 180px;
  overflow-y: auto;
  z-index: 999;
  padding: 10px 14px;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.4);
  color: #e2e8f0;
  text-align: left;
  animation: slideUpDrawer 0.2s ease-out;
}

.selected-vessels-drawer.hidden {
  display: none !important;
}

.selected-vessels-drawer-header {
  font-size: 12px;
  font-weight: bold;
  color: #a0aec0;
  border-bottom: 1px solid #4a5568;
  padding-bottom: 5px;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.selected-vessels-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.selected-vessel-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 6px;
  margin-bottom: 2px;
  font-size: 12px;
  border-radius: 4px;
  transition: background 0.15s;
}

.selected-vessel-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.vessel-item-name {
  flex-grow: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  font-weight: 500;
  transition: color 0.15s;
}

.vessel-item-name:hover {
  color: #00ffff;
  text-decoration: underline;
}

.vessel-item-remove {
  cursor: pointer;
  margin-left: 12px;
  color: #e53e3e;
  font-weight: bold;
  font-size: 13px;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.15s, color 0.15s;
}

.vessel-item-remove:hover {
  background: rgba(229, 62, 62, 0.2);
  color: #feb2b2;
}

.selected-vessel-empty-item {
  font-size: 12px;
  color: #718096;
  padding: 8px 0;
  text-align: center;
}

@keyframes slideUpDrawer {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}







