/* --------------------------------------------------------------------------
   오솔킹 카카오맵 GPS 추출 & 장소 검색 도구 전용 스타일 (map-test.css)
   -------------------------------------------------------------------------- */

.map-test-main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 20px 40px;
}

.btn-nav-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #f1f5f9;
  color: #0f172a;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid #cbd5e1;
  transition: all 0.15s ease;
}

.btn-nav-back:hover {
  background: #e2e8f0;
  transform: translateY(-1px);
}

.map-test-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 1024px) {
  .map-test-layout {
    grid-template-columns: 460px 1fr;
    height: calc(100vh - 120px);
    min-height: 750px;
  }
}

/* --------------------------------------------------------------------------
   좌측 사이드바: 검색 & 결과 리스트
   -------------------------------------------------------------------------- */
.sidebar-search-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  overflow-y: auto;
}

/* 100개 명소 일괄 추출 카드 */
.batch-extractor-card {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1.5px solid #60a5fa;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.1);
  flex-shrink: 0;
}

.batch-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.batch-title {
  font-size: 14.5px;
  font-weight: 800;
  color: #1e3a8a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.batch-badge {
  font-size: 10.5px;
  font-weight: 800;
  background: #2563eb;
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 6px;
}

.batch-desc {
  font-size: 12px;
  color: #3b82f6;
  margin-bottom: 12px;
  line-height: 1.4;
}

.batch-progress-wrap {
  background: #ffffff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.batch-progress-bar {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.batch-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #10b981);
  border-radius: 4px;
  transition: width 0.15s ease;
}

.batch-progress-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: #475569;
}

.batch-progress-status strong {
  color: #2563eb;
}

.batch-log-box {
  max-height: 90px;
  overflow-y: auto;
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 6px 8px;
  color: #334155;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.batch-actions-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-start-batch {
  width: 100%;
  height: 40px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
  transition: all 0.15s ease;
}

.btn-start-batch:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  transform: translateY(-1px);
}

.btn-download-excel {
  width: 100%;
  height: 40px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
  animation: pulseBtn 1.5s infinite;
}

@keyframes pulseBtn {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.search-box-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}

.panel-title {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.panel-desc {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 10px;
}

.search-input-form {
  margin-bottom: 10px;
}

.input-with-btn {
  display: flex;
  gap: 8px;
}

.input-with-btn input {
  flex: 1;
  height: 40px;
  padding: 0 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s;
}

.input-with-btn input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.btn-search {
  height: 40px;
  padding: 0 16px;
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.btn-search:hover {
  background: #1d4ed8;
}

.quick-keywords {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: #64748b;
}

.btn-quick-kw {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-quick-kw:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* 검색 결과 리스트 영역 */
.search-results-wrap {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 220px;
}

.results-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}

.results-count {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.results-count strong {
  color: #2563eb;
}

.results-tip {
  font-size: 11px;
  color: #64748b;
}

.places-list {
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.empty-state {
  text-align: center;
  padding: 30px 10px;
  color: #94a3b8;
  font-size: 13px;
}

.place-item-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  background: #f8fafc;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.place-item-card:hover {
  border-color: #93c5fd;
  background: #f0f9ff;
}

.place-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.place-name {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
}

.place-cat {
  font-size: 11px;
  color: #64748b;
  background: #e2e8f0;
  padding: 2px 6px;
  border-radius: 4px;
}

.place-addr {
  font-size: 12px;
  color: #475569;
}

.place-gps-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
}

.gps-val-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  color: #0284c7;
}

.place-actions {
  display: flex;
  gap: 6px;
}

.btn-item-copy {
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-item-copy:hover {
  background: #1d4ed8;
}

.btn-item-pan {
  background: #e2e8f0;
  color: #1e293b;
  border: none;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-item-pan:hover {
  background: #cbd5e1;
}

/* 길찾기 테스트 런처 카드 */
.route-test-launcher {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}

.launcher-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.route-inputs-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.route-input-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.route-input-item label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}

.route-input-item input {
  height: 32px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12px;
  font-family: monospace;
}

.btn-run-walk {
  width: 100%;
  height: 38px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s;
}

.btn-run-walk:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   우측 메인 인터랙티브 지도
   -------------------------------------------------------------------------- */
.map-view-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
  min-height: 500px;
}

.map-toolbar {
  padding: 12px 18px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.toolbar-title {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.toolbar-sub {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
}

.btn-toolbar {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-toolbar:hover {
  background: #f1f5f9;
}

.map-wrapper {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
  background: #e2e8f0;
}

#test-map {
  width: 100%;
  height: 100%;
}

/* 지도 클릭 핀 오버레이 */
.clicked-pin-bubble {
  background: #0f172a;
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  border: 1.5px solid #38bdf8;
  display: flex;
  flex-direction: column;
  gap: 4px;
  white-space: nowrap;
  animation: popPin 0.15s ease-out;
}

@keyframes popPin {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.bubble-head {
  font-size: 11px;
  font-weight: 800;
  color: #38bdf8;
}

.bubble-coords {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  color: #f1f5f9;
}

.bubble-coords strong {
  color: #ffffff;
}

.btn-bubble-copy-action {
  margin-top: 4px;
  background: #0284c7;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-bubble-copy-action:hover {
  background: #0369a1;
}

/* 하단 플로팅 GPS HUD */
.gps-floating-bar {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(10px);
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 50;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(56, 189, 248, 0.4);
  gap: 12px;
  animation: slideUpHud 0.2s ease-out;
}

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

.gps-bar-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gps-bar-pin {
  font-size: 20px;
}

.gps-bar-main {
  font-size: 13.5px;
  font-weight: 600;
}

.gps-bar-main strong {
  color: #38bdf8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.gps-bar-sub {
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 1px;
}

.gps-bar-btns {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-copy-main {
  background: #0284c7;
  color: #ffffff;
  border: none;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-copy-main:hover {
  background: #0369a1;
  transform: scale(1.02);
}

.btn-set-start, .btn-set-dest {
  background: #334155;
  color: #ffffff;
  border: none;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-set-start:hover {
  background: #2563eb;
}

.btn-set-dest:hover {
  background: #dc2626;
}

.btn-close-hud {
  background: transparent;
  color: #94a3b8;
  border: none;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}

.btn-close-hud:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
}
