/* 중복 매물 카드 + 메뉴 (모바일 시트·PC 사이드 패널 공통) */
.map-duplicate-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 12px 12px 14px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.map-duplicate-card-main {
  flex: 1;
  min-width: 0;
}

.map-duplicate-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  margin-bottom: 6px;
  word-break: keep-all;
}

.map-duplicate-card-body {
  font-size: 13px;
  color: #475569;
  line-height: 1.45;
  white-space: pre-line;
  word-break: keep-all;
}

.map-duplicate-card-actions-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  align-self: flex-start;
}

.map-duplicate-card .dup-action-menu {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}

/* 모바일에서만 전화 아이콘 표시 (마커 툴팁과 동일) */
.map-duplicate-call-btn {
  display: none;
  box-sizing: border-box;
  text-decoration: none;
}

@media (max-width: 768px) {
  /* 전화 아이콘: 카드 크기는 유지, 우하단 기존 여백(패딩) 위에 absolute로 겹침 */
  .map-duplicate-call-btn {
    display: inline-flex;
    position: absolute;
    right: 10px;
    bottom: 10px;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 11px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #2563eb;
    cursor: pointer;
    flex-shrink: 0;
    z-index: 2;
    -webkit-tap-highlight-color: transparent;
  }

  .map-duplicate-call-btn:hover {
    background: #eff6ff;
  }
}

.map-duplicate-card .dup-btn-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #64748b;
  border-radius: 4px;
}

.map-duplicate-card .dup-btn-more:hover {
  background: #f3f4f6;
  color: #111827;
}

.map-duplicate-card .dup-action-menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  min-width: 140px;
  background: #111827;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.35);
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  padding: 4px 0;
  z-index: 30;
  display: none;
}

.map-duplicate-card .dup-action-menu-dropdown.open {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.map-duplicate-card .dup-action-menu-dropdown.open-top {
  top: auto;
  bottom: 100%;
  margin-top: 0;
  margin-bottom: 4px;
}

.map-duplicate-card .dup-action-menu-item {
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: none;
  text-align: left;
  font-size: 13px;
  color: #e5e7eb;
  cursor: pointer;
  white-space: nowrap;
}

.map-duplicate-card .dup-action-menu-item:not(:last-child) {
  border-bottom: 1px solid rgba(249, 250, 251, 0.12);
}

.map-duplicate-card .dup-action-menu-item:hover {
  background: rgba(55, 65, 81, 0.85);
  color: #f9fafb;
}

.map-duplicate-card .dup-action-menu-item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* PC: 필터(좌측) 오른쪽 — 스파이더 매물 목록 (지도 영역 flex로 자동 축소) */
@media (min-width: 769px) {
  .mapdisplay-spider-panel {
    display: none;
    width: 300px;
    flex-shrink: 0;
    flex-direction: column;
    min-height: 0;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    box-sizing: border-box;
  }

  .mapdisplay-spider-panel.is-open {
    display: flex;
  }

  .mapdisplay-spider-panel-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid #e2e8f0;
    background: #f1f5f9;
  }

  .mapdisplay-spider-panel-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
  }

  .mapdisplay-spider-panel-close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #64748b;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mapdisplay-spider-panel-close:hover {
    background: #e2e8f0;
    color: #0f172a;
  }

  .mapdisplay-spider-panel-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 12px;
    -webkit-overflow-scrolling: touch;
  }

  .mapdisplay-spider-panel-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 768px) {
  .mapdisplay-spider-panel {
    display: none !important;
  }
}

/* 모바일: 중복 매물 슬라이드 — 검색 조건 시트(z-index 1001)보다 위 */
@media (max-width: 768px) {
  .map-duplicate-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1012;
    height: 50vh;
    max-height: 50vh;
    display: none;
    flex-direction: column;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.18);
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    background: #fff;
    overscroll-behavior: none;
  }

  .map-duplicate-sheet.is-open {
    display: flex;
  }

  .map-duplicate-sheet-handle {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 18px 12px 10px;
    cursor: default;
    background: #bbf7d0;
    border-bottom: 1px solid #4ade80;
    border-radius: 12px 12px 0 0;
  }

  .map-duplicate-sheet-handle-bar {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: #cbd5e1;
    margin-bottom: 8px;
  }

  .map-duplicate-sheet-handle-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0 40px;
    box-sizing: border-box;
  }

  .map-duplicate-sheet-handle-title {
    font-size: 13px;
    color: #334155;
    font-weight: 600;
  }

  .map-duplicate-sheet-close {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: transparent;
    color: #475569;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    border-radius: 8px;
  }

  .map-duplicate-sheet-close:active {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.35);
  }

  .map-duplicate-sheet-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    padding: 12px 14px 20px;
    background: #fff;
  }

  .map-duplicate-sheet-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
}
