@charset "utf-8";

/**
 * Google Maps 모듈 전용 (map-module, store-locator, map-location 게시판)
 * :root 토큰은 custom.css 와 동일
 */

.page-map-locator__notice {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--color-surface, #f8fafc);
  border: 1px solid var(--color-line, #e2e8f0);
  border-radius: var(--radius-md, 8px);
  font-size: var(--font-size-sm, 0.875rem);
  color: var(--color-muted, #64748b);
}

.page-map-locator__list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--color-muted, #64748b);
}

.page-inner--wide {
  max-width: 1200px;
}

/* --- Map module --- */
.map-module {
  position: relative;
  width: 100%;
  min-height: 320px;
}

.google-map {
  width: 100%;
  height: 480px;
  min-height: 320px;
  border-radius: var(--radius-md, 8px);
  background: var(--color-surface, #f1f5f9);
}

.map-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  padding: 2rem;
  text-align: center;
  background: var(--color-surface, #f8fafc);
  border: 2px dashed var(--color-line, #cbd5e1);
  border-radius: var(--radius-md, 8px);
}

.map-placeholder__title {
  margin: 0 0 0.5rem;
  font-size: var(--font-size-lg, 1.125rem);
  font-weight: var(--font-weight-semibold, 600);
  color: var(--color-text, #1e293b);
}

.map-placeholder__desc,
.map-placeholder__hint {
  margin: 0.25rem 0;
  font-size: var(--font-size-sm, 0.875rem);
  color: var(--color-muted, #64748b);
}

/* --- Store locator --- */
.store-locator {
  width: 100%;
}

.locator-controls {
  margin-bottom: 1.25rem;
}

.locator-controls__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin-bottom: 0.75rem;
}

.locator-search {
  flex: 1 1 100%;
}

.locator-search__input {
  width: 100%;
  padding: 0.65rem 1rem;
  border: 1px solid var(--color-line, #e2e8f0);
  border-radius: var(--radius-md, 8px);
  font-size: var(--font-size-base, 1rem);
}

.locator-category__label,
.locator-radius__label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: var(--font-size-sm, 0.875rem);
  color: var(--color-muted, #64748b);
}

.locator-category__select,
.locator-radius__select {
  min-width: 120px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-line, #e2e8f0);
  border-radius: var(--radius-md, 8px);
}

.locator-current-location {
  white-space: nowrap;
}

.locator-controls__hint {
  margin: 0;
  font-size: var(--font-size-sm, 0.875rem);
  color: var(--color-muted, #64748b);
}

.locator-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 1.25rem;
  align-items: start;
}

.locator-results__heading {
  margin: 0 0 0.5rem;
  font-size: var(--font-size-lg, 1.125rem);
}

.locator-results__status {
  margin: 0 0 0.75rem;
  font-size: var(--font-size-sm, 0.875rem);
  color: var(--color-muted, #64748b);
}

.locator-results {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 480px;
  overflow-y: auto;
}

.locator-result-item {
  margin: 0 0 0.5rem;
}

.locator-result-item__btn {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  text-align: left;
  background: var(--color-bg, #fff);
  border: 1px solid var(--color-line, #e2e8f0);
  border-radius: var(--radius-md, 8px);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.locator-result-item__btn:hover,
.locator-result-item__btn:focus {
  border-color: var(--color-primary, #2563eb);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.locator-result-title {
  display: block;
  font-weight: var(--font-weight-semibold, 600);
  color: var(--color-text, #1e293b);
}

.locator-result-meta {
  display: block;
  margin-top: 0.25rem;
  font-size: var(--font-size-sm, 0.875rem);
  color: var(--color-muted, #64748b);
}

.locator-distance {
  display: block;
  margin-top: 0.35rem;
  font-size: var(--font-size-sm, 0.875rem);
  color: var(--color-primary, #2563eb);
}

.locator-results__empty {
  margin: 1rem 0 0;
  font-size: var(--font-size-sm, 0.875rem);
  color: var(--color-muted, #64748b);
}

.locator-map-wrap .google-map {
  height: 520px;
}

/* Marker info (InfoWindow) */
.marker-info {
  max-width: 260px;
  font-size: 14px;
  line-height: 1.45;
}

/* Google Maps InfoWindow — 닫기 버튼을 썸네일 위에 겹침 (map.css, eottae.css와 동일) */
.gm-style .gm-style-iw-c {
  padding: 0 !important;
}

.gm-style .gm-style-iw-d {
  overflow: visible !important;
  max-height: none !important;
  height: auto !important;
}

.gm-style .gm-style-iw-ch {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}

.gm-style .gm-style-iw-chr {
  position: absolute !important;
  top: 8px !important;
  right: 8px !important;
  left: auto !important;
  width: auto !important;
  height: auto !important;
  z-index: 3 !important;
  padding: 0 !important;
}

.gm-style .gm-style-iw-chr button {
  width: 28px !important;
  height: 28px !important;
  margin: 0 !important;
  opacity: 1 !important;
  background: rgba(255, 255, 255, 0.95) !important;
  border-radius: 999px !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18) !important;
}

.marker-info--thumb {
  max-width: 260px;
  overflow: hidden;
  border-radius: 12px;
}

.marker-info--compact {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 240px;
  box-sizing: border-box;
  border-radius: 10px;
  overflow: hidden;
}

.marker-info--compact.marker-info--thumb {
  max-width: 240px;
}

.marker-info--compact .marker-info-thumb-wrap {
  flex: none;
  width: 240px;
  height: 240px;
  line-height: 0;
}

.marker-info--compact .marker-info-thumb {
  display: block;
  width: 240px !important;
  height: 240px !important;
  max-width: 240px !important;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  margin: 0 !important;
  border-radius: 0;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.marker-info--compact .marker-info-body {
  flex: none;
  display: block;
  width: 100%;
  padding: 12px;
  min-width: 0;
  box-sizing: border-box;
}

.marker-info--compact .marker-info-head {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  min-width: 0;
}

.marker-info--compact .marker-info-title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
}

.marker-info--compact .marker-info-meta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
}

.marker-info--compact .marker-info-badge {
  max-width: 52px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.marker-info-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 6px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  flex-shrink: 0;
}

.marker-info-chip--rating {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

.marker-info-chip--reviews {
  background: #fff;
  color: #475569;
  border-color: rgba(15, 23, 42, 0.08);
}

.marker-info-chip:hover {
  opacity: 0.92;
  text-decoration: none;
}

.marker-info--compact .marker-info-actions {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.marker-info--compact .marker-info-link--btn {
  display: block;
  width: 100%;
  padding: 10px 8px;
  border-radius: 10px;
  background: #2563eb;
  color: #fff !important;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
  line-height: 1.25;
}

.marker-info--compact .marker-info-link--directions {
  background: #fff;
  color: #2563eb !important;
  border: 1px solid #2563eb;
}

.marker-info--compact .marker-info-link--btn:hover {
  opacity: 0.92;
  text-decoration: none;
}

@media (max-width: 767px) {
  .marker-info--compact {
    width: min(280px, calc(100vw - 48px));
    max-width: 100%;
  }

  .marker-info--compact.marker-info--thumb {
    max-width: min(280px, calc(100vw - 48px));
  }

  .marker-info--compact .marker-info-thumb-wrap {
    width: 100%;
    height: 108px;
  }

  .marker-info--compact .marker-info-thumb {
    width: 100% !important;
    height: 108px !important;
    max-width: 100% !important;
    aspect-ratio: auto;
  }

  .marker-info--compact .marker-info-body {
    padding: 10px;
  }

  .marker-info--compact .marker-info-link--btn {
    font-size: 11px;
    padding: 10px 6px;
  }
}

.marker-info--thumb:not(.marker-info--compact) .marker-info-thumb {
  display: block;
  width: 100%;
  height: 140px;
  object-fit: cover;
  margin: 0;
  border-radius: 0;
}

.marker-info-body {
  padding: 10px 12px 12px;
}

.marker-info-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-bottom: 6px;
}

.marker-info-title {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
  flex: 1 1 auto;
  min-width: 0;
}

.marker-info-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 0;
}

.marker-info-badge--cate {
  background: #dbeafe;
  color: #1d4ed8;
}

.marker-info-badge--region {
  background: #f1f5f9;
  color: #64748b;
}

.marker-info-actions {
  margin-top: 0;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.marker-info-link,
.marker-info-directions {
  font-size: 0.85rem;
  color: #2563eb;
}

/* --- map-location board --- */
.board-wrap--map-location .map-location-view__map {
  margin: 1.5rem 0;
}

.board-wrap--map-location .map-location-meta {
  display: grid;
  gap: 0.5rem;
  margin: 1rem 0;
  font-size: var(--font-size-sm, 0.875rem);
}

.board-wrap--map-location .map-location-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

@media (max-width: 768px) {
  .locator-layout {
    grid-template-columns: 1fr;
  }

  .google-map,
  .locator-map-wrap .google-map {
    height: 320px;
    min-height: 280px;
  }

  .map-placeholder {
    min-height: 320px;
  }

  .locator-results {
    max-height: 280px;
  }

  .locator-controls__filters {
    flex-direction: column;
    align-items: stretch;
  }

  .locator-current-location {
    width: 100%;
  }
}
