/* ============================= */
/*       Combined map.css        */
/* ============================= */

/* ---------- 배너 ---------- */
.banner img {
  width: 100%;
  height: auto;
  display: block;
}

/* 여행 정보 문구 스타일 */
.travel-info-text {
  text-align: center; /* 중앙 정렬 */
  font-size: fpx; /* 텍스트 크기 */
  font-weight: 600; /* 강조 */
  color: #333; /* 가독성 좋은 색상 */
  margin-bottom: 80px;
}

/* ---------- 메인 콘텐츠 ---------- */
.main-content {
  margin: 20px;
}

/* ---------- 지도 및 컨트롤 영역 컨테이너 ---------- */
.map-ui-container {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 70vh;
  box-sizing: border-box;
  gap: 20px;
}

/* ---------- 지도 섹션 (좌측, 75%) ---------- */
.map-section {
  position: relative;
  width: 75%;
  height: 100%;
  background-color: #e0e0e0;
  box-sizing: border-box;
}
#map {
  width: 100%;
  height: 100%;
  border: 1px solid #ccc;
}

/* === 🗺️ 지도 로딩 (공통 스타일 적용) === */
.map-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 20px;
  font-weight: bold;
  color: #333;
  background: #fff7cc;
  padding: 20px 30px;
  border-radius: 12px;
  border: 3px solid #ffcc00;
  z-index: 1500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}

/* === 🌀 공통 스피너 스타일 === */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 0, 0, 0.2); /* 연한 회색 테두리 */
  border-top: 4px solid #ffcc00; /* 진한 노란색 */
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
/* 스핀 애니메이션 */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ---------- 현재 위치 버튼 ---------- */
.current-btn,
#current {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 8px 12px;
  background-color: #ffd700;
  border: none;
  cursor: pointer;
  border-radius: 8px;
}

/* ---------- 검색 박스 ---------- */
.search-box {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  z-index: 1000;
}
.search-box input {
  padding: 10px;
  width: 350px;
  border: 1px solid #ffd700;
  border-right: none;
  border-radius: 8px 0 0 8px;
  background-color: #333;
  color: #fff;
}
.search-box button {
  padding: 10px 16px;
  border: 1px solid #ffd700;
  background-color: #ffd700;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
}
.search-box button:hover {
  background-color: #ffd700;
}

/* ---------- 지도 우측 컨트롤 (내부 오버레이) ---------- */
.right-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 220px;
  background-color: #ffd700;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  text-align: center;
}
.right-controls h4 {
  margin: 0 0 10px;
  font-size: 16px;
  color: #000;
}
.right-controls .badge-container {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.right-controls .badge {
  flex: 1 1 45%;
  padding: 6px;
  font-size: 14px;
  text-align: center;
  border: 1px solid #ffd700;
  background-color: #fff;
  border-radius: 4px;
  cursor: pointer;
  color: #000;
}

/* ---------- 사이드 패널 (우측) ---------- */
.side-panel {
  max-width: 400px; /* 패널 최대 크기 제한 */
  min-width: 250px;
  overflow-y: auto; /* 내부 내용이 넘칠 경우 스크롤 표시 */
  background-color: #ffd700;
  padding: 15px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.side-panel h4 {
  margin-bottom: 10px;
  font-size: 18px;
  color: #333;
}
.region-selection-panel .badge-container,
.tour-type .badge-container {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.region-selection-panel .badge,
.tour-type .badge {
  padding: 6px 10px;
  font-size: 14px;
  border: 1px solid #ffd700;
  background-color: #fff;
  border-radius: 4px;
  cursor: pointer;
  color: #000;
}

/* ---------- 검색 결과 목록 스타일 ---------- */
#search-results {
  position: absolute;
  top: 70px; /* 현재 위치 버튼 아래 */
  left: 10px;
  width: 300px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 10px;
  z-index: 1000;
  font-family: "Pretendard-Medium", sans-serif;
  color: #333;
}
#search-results .search-result-item {
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: background 0.2s;
}
#search-results .search-result-item:last-child {
  border-bottom: none;
}
#search-results .search-result-item:hover {
  background-color: #ffd700;
  color: #000;
}

/* ---------- 로딩 애니메이션 (텍스트 스타일) ---------- */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  color: #ffd700;
  background: rgba(0, 0, 0, 0.8);
  padding: 20px;
  border-radius: 8px;
  min-height: 100px; /* 최소 높이 확보 */
}
/* === 🎨 공통 로딩 스타일 === */
.loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  color: #333;
}
/* ---------- 세부지역 컨테이너 ---------- */
/* === 📌 세부 지역 선택 로딩 === */
.detail-region-container .loading {
  min-height: 150px;
  position: relative;
  width: 100%;
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  color: #333;
  background: #fff7cc;
  padding: 15px;
  border-radius: 8px;
  border: 2px solid #ffcc00;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
/* 세부지역 버튼 디자인 (다른 버튼과 동일) */
.detail-region-btn {
  border: 1px solid #ffd700;
  background-color: #fff;
  color: #000;
  padding: 6px 10px;
  font-size: 14px;
  text-align: center;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

/* 선택된 버튼 스타일: 배경 검정, 글자 흰색 */
.badge.active {
  background-color: #000;
  color: #fff;
  border-color: #000;
}

/* ---------- 관광정보 조회하기 버튼 ---------- */
.info-query {
  margin-top: 15px;
  text-align: center;
}
.info-query-btn {
  padding: 10px 15px;
  background-color: #000;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: #fff;
  font-size: 16px;
}
.info-query-btn:hover,
.keyword-search-btn:hover {
  background-color: #000; /* 기본 상태와 동일 */
  color: #fff; /* 기본 상태와 동일 */
}
/* ---------- 키워드 검색 섹션 ---------- */
.keyword-search-section {
  margin-top: 15px;
  text-align: center;
}
.keyword-search-section h4 {
  font-size: 18px;
  margin-bottom: 10px;
  color: #000;
}
.keyword-search-section input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ffd700;
  border-radius: 8px;
  margin-bottom: 10px;
}
.keyword-search-btn {
  padding: 10px 15px;
  background-color: #000;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: #fff;
  font-size: 16px;
}

/* ---------- 관광정보 게시판 ---------- */
#tourBoard {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-top: 20px;
}
#tourBoard h2 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 24px;
  color: #000;
}
/* 관광정보 게시판 로딩 */
#tourBoardItems {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px; /* 충분한 높이 확보 */
}
/* === 📝 관광정보 게시판 로딩 === */
#tourBoardItems .loading {
  width: 100%;
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  color: #333;
  background: #fff7cc;
  padding: 15px;
  border-radius: 8px;
  border: 2px solid #ffcc00;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.tour-board-items {
  display: grid;
  grid-template-columns: repeat(5, 1fr); /* 한 줄에 5개 */
  gap: 20px;
  padding: 10px;
}
.tour-board-item {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.tour-board-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.tour-board-item img {
  width: 100%;
  height: 150px; /* 고정 높이 */
  object-fit: cover; /* 이미지 꽉 채우기 */
  display: block;
}
.board-item-title {
  font-size: 16px;
  font-weight: bold;
  color: #333;
  margin: 10px;
  text-align: center;
}
.board-item-address,
.board-item-details {
  font-size: 14px;
  color: #666;
  margin: 0 10px 10px;
  text-align: center;
}
.tour-board-pagination {
  text-align: center;
  margin-top: 20px;
}
.tour-board-pagination a {
  margin: 0 5px;
  text-decoration: none;
  color: #000;
  font-weight: bold;
  cursor: pointer;
}
.tour-board-pagination a.active {
  color: #ffd700;
}

/* ---------- 마커 스타일 ---------- */
.marker {
  width: 20px;
  height: 20px;
  background: blue;
  border: 2px solid white;
  border-radius: 50%;
}
.search-marker {
  width: 24px;
  height: 24px;
  background: red;
  border: 2px solid white;
  border-radius: 50%;
}
.regionTourMarker {
  border: 1px solid black;
  background: #ffd700;
  opacity: 0.9;
  width: 24px;
  height: 24px;
  border-radius: 30%;
  position: relative;
  z-index: 10;
}

/* ---------- 상세정보 팝업 (게시글 모달) ---------- */
#detailModal {
  display: none; /* 기본적으로 숨김 */
  position: fixed;
  z-index: 2000; /* 로그인 모달보다 낮음 */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

#detailModal .modal-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 20px;
  border: none;
  width: 90%;
  max-width: 800px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
#detailModal .modal-content .close {
  color: #333;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

#detailModal.modal-content .close:hover,
#detailModal.modal-content .close:focus {
  color: #000;
}
#detailModal .modal-body {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

/* 팝업 모달 로딩 */
#modalDetails {
  text-align: center;
  min-height: 120px; /* 최소 높이 확보 */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
/* === 🔍 상세정보 팝업 로딩 === */
#modalDetails .loading {
  width: 100%;
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  color: #333;
  background: #fff7cc;
  padding: 15px;
  border-radius: 8px;
  border: 2px solid #ffcc00;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
#detailModal .modal-left {
  flex: 1;
}
#detailModal .modal-right {
  flex: 1.5;
  max-height: 500px;
  overflow-y: auto;
  padding: 10px;
}

/* 모달 왼쪽: 제목 및 이미지 슬라이더 */
#detailModal .modal-left h2 {
  text-align: center;
  margin-bottom: 10px;
  font-size: 20px;
  color: #333;
}
#detailModal .image-slider {
  position: relative;
  text-align: center;
}
#detailModal .image-slider img.slide {
  width: 100%;
  max-height: 400px;
  border-radius: 4px;
}

#detailModal .slider-prev,
#detailModal .slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
}

#detailModal .slider-prev {
  left: 10px;
}

#detailModal .slider-next {
  right: 10px;
}

/* 인포윈도우 컨테이너 스타일 */
.infowindow_wrap {
  padding: 10px;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  color: #333;
  max-width: 250px;
}

/* 인포윈도우 제목 스타일 */
.infowindow_title {
  font-weight: bold;
  margin-bottom: 5px;
}

/* 인포윈도우 내용 스타일 */
.infowindow_content {
  margin-bottom: 5px;
}

/* 인포윈도우 추가 정보 (생성시간, 전화번호 등) */
.infowindow_createdTime,
.infowindow_phone {
  font-size: 12px;
  color: #666;
}

/* 페이드인 애니메이션 (인포윈도우에 적용) */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.fadeIn {
  animation: fadeIn 0.3s ease;
}
.myloc {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 0 rgba(204, 49, 44, 0.4);
  animation: pulse 1.7s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(204, 49, 44, 0.4);
  }
  70% {
    box-shadow: 0 0 0 20px rgba(204, 49, 44, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(204, 49, 44, 0);
  }
}
/* ---------- 눌림(pressed) 효과 ---------- */
button:active,
.badge:active {
  transform: scale(0.95);
  transition: transform 0.1s ease;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.3);
}
