/* 07 pharmacy-naver-map — 챗봇 말풍선 안 지도·약국 목록 (색은 style.css 변수 사용) */

.pharmacy-map-block {
  align-self: flex-start;
  width: min(100%, 560px);
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--mint);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pharmacy-header { font-weight: 700; font-size: 15px; }

/* 상태 줄: 로딩·오류 */
.pharmacy-status { margin: 0; font-size: 13px; color: var(--gray); }
.pharmacy-status[hidden] { display: none; }
.pharmacy-status.loading::before {
  content: "";
  display: inline-block;
  width: 10px; height: 10px;
  margin-right: 6px;
  border: 2px solid var(--mint);
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -1px;
  animation: pharmacy-spin 0.8s linear infinite;
}
.pharmacy-status.error { color: #8a4b00; background: #fff1e0; padding: 6px 10px; border-radius: 8px; }
@keyframes pharmacy-spin { to { transform: rotate(360deg); } }

/* 위치 입력 폼 (위치 거부·http 일 때) */
.pharmacy-geo-form { display: flex; flex-direction: column; gap: 8px; }
.pharmacy-hint { margin: 0; font-size: 14px; line-height: 1.5; }
.pharmacy-geo-row { display: flex; gap: 8px; }
.pharmacy-geo-row input {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
}
.pharmacy-geo-row input:focus { border-color: var(--mint); }

/* 버튼 공통: 채움(확인) / 테두리(전화·지도에서 보기) */
.pharmacy-btn {
  display: inline-block;
  padding: 7px 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--mint);
  border: 1px solid var(--mint);
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.pharmacy-btn:disabled { opacity: 0.5; cursor: default; }
.pharmacy-btn.ghost { background: transparent; color: var(--text); padding: 4px 10px; font-size: 13px; }
.pharmacy-btn.ghost:hover { background: var(--mint-soft); color: var(--ink); }

/* 지도 */
.pharmacy-map {
  width: 100%;
  height: 280px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--gray-soft);
  border: 1px solid var(--line);
}
.pharmacy-map[hidden] { display: none; }

/* 마커 (HTML 아이콘). 내 위치 = 민트 점, 약국 = 빨간 핀에 번호 */
.pharmacy-marker.me {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--mint);
  border: 3px solid #fff;
  box-shadow: 0 0 0 4px rgba(43, 196, 138, 0.3), 0 1px 4px rgba(0, 0, 0, 0.3);
}
.pharmacy-marker.shop {
  width: 24px; height: 24px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: #e5484d;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pharmacy-marker.shop span {
  transform: rotate(45deg);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  font-family: "Malgun Gothic", system-ui, sans-serif;
  line-height: 1;
}

/* 정보창 내용 (네이버 InfoWindow 안) */
.pharmacy-info {
  padding: 10px 12px;
  min-width: 160px;
  max-width: 240px;
  font-size: 13px;
  line-height: 1.5;
  color: #1b2230;
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
}
.pharmacy-info strong { display: block; font-size: 14px; margin-bottom: 2px; }
.pharmacy-info-addr { color: #5b6b82; font-size: 12px; }
.pharmacy-info a { color: #2bc48a; font-weight: 600; text-decoration: none; }

/* 목록 (가까운 순) */
.pharmacy-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pharmacy-item {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
}
.pharmacy-item-head { display: flex; align-items: center; gap: 8px; }
.pharmacy-no {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #e5484d;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pharmacy-name { flex: 1; min-width: 0; word-break: keep-all; }
.pharmacy-dist { flex: 0 0 auto; color: var(--mint); font-weight: 700; font-variant-numeric: tabular-nums; }
.pharmacy-hours, .pharmacy-addr { font-size: 13px; color: var(--gray); }
.pharmacy-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.pharmacy-empty { color: var(--gray); font-size: 14px; padding: 4px 0; }

/* 좁은 화면: 블록이 꽉 차고 지도는 조금 낮게 */
@media (max-width: 480px) {
  .pharmacy-map-block { width: 100%; padding: 10px; }
  .pharmacy-map { height: 240px; }
  .pharmacy-geo-row { flex-direction: column; }
  .pharmacy-btn { text-align: center; }
}
