/* 사건 분야 선택: 바텀시트(모바일) / 모달(넓은 화면) — 모바일 앱형, 폼 느낌 최소화 */

.case-pick-sheet {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
}

.case-pick-sheet *,
.case-pick-sheet *::before,
.case-pick-sheet *::after {
  box-sizing: border-box;
}

.case-pick-sheet[hidden] {
  display: none !important;
}

.case-pick-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  border: none;
  padding: 0;
  cursor: pointer;
}

.case-pick-sheet__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  max-height: min(92vh, 720px);
  background: #fff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.14);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: case-pick-rise 0.28s ease-out;
}

@keyframes case-pick-rise {
  from {
    transform: translateY(100%);
    opacity: 0.88;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.case-pick-sheet__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
}

.case-pick-sheet__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
  word-break: keep-all;
}

.case-pick-sheet__close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.case-pick-sheet__close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* 본문: 섹션 간 12px 통일 */
.case-pick-sheet__body {
  padding: 12px 16px 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.case-pick-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.case-pick-sheet__label {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.case-pick-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.case-pick-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fafbfc;
  color: #0f172a;
  font-size: 14px;
  font-weight: 650;
  font-family: inherit;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  transition:
    background 0.12s ease,
    border-color 0.12s ease,
    color 0.12s ease;
  word-break: keep-all;
}

.case-pick-pill:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.case-pick-pill.is-active {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
  box-shadow: none;
}

.case-pick-detail-block[hidden] {
  display: none !important;
}

/* 선택 경로: 카드형 대신 가벼운 한 줄 */
.case-pick-path {
  margin: 0;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  line-height: 1.45;
  border: none;
  border-radius: 0;
  background: transparent;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
  word-break: keep-all;
}

.case-pick-path:empty {
  display: none;
}

/* 지역: 풀폭 드롭다운 44px, 버튼은 아래 36px */
.case-pick-region-block {
  display:flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.case-pick-region-select {
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background-color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  color: #0f172a;
  line-height: normal;
  cursor: pointer;
  appearance: auto;
  -webkit-appearance: menulist;
}

.case-pick-region-select:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.case-pick-location-btn {
  align-self: flex-start;
  height: 36px;
  padding: 0 14px;
  margin: 0;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
  box-shadow: none;
}

.case-pick-location-btn:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #334155;
}

.case-pick-location-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.case-pick-location-status {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: #166556;
  line-height: 1.35;
}

.case-pick-sheet__hint {
  margin: 0;
  min-height: 1.2em;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.4;
}

.case-pick-sheet__hint.meta {
  color: #94a3b8;
}

.case-pick-sheet__hint.is-error {
  color: #b91c1c;
  font-weight: 600;
}

.case-pick-sheet__cta {
  margin-top: 2px;
  padding-top: 4px;
}

.case-pick-sheet__cta .btn-primary {
  width: 100%;
  justify-content: center;
  height: 48px;
  padding: 0 16px;
  font-size: 15px;
  font-weight: 800;
  border-radius: 12px;
  border: none;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.22);
}

@media (min-width: 640px) {
  .case-pick-sheet {
    align-items: center;
    padding: 20px;
  }

  .case-pick-sheet__panel {
    border-radius: 16px;
    max-height: min(88vh, 680px);
    animation: case-pick-fade 0.22s ease-out;
  }

  @keyframes case-pick-fade {
    from {
      opacity: 0;
      transform: scale(0.98) translateY(8px);
    }
    to {
      opacity: 1;
      transform: scale(1) translateY(0);
    }
  }
}

@media (max-width: 768px) {
  .case-pick-sheet__header {
    padding: 12px 14px 10px;
  }

  .case-pick-sheet__body {
    padding: 10px 14px 14px;
    gap: 10px;
  }

  .case-pick-pill {
    padding: 8px 12px;
    min-height: 40px;
    font-size: 13px;
  }
}
