/* ===============================
   설정 팝업 (중앙 모달)
   PC/모바일: 모두 중앙 팝업 (전체화면 X)
   =============================== */

/* 설정: 전체화면 대신 중앙 팝업 */
#settingsPage.open {
  align-items: center;
  justify-content: center;
  padding: 8px;
}

#settingsPage .listing-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

#settingsPage .settings-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  max-height: 46vh;
  min-height: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@media (max-width: 480px) {
  #settingsPage.open {
    padding: 8px;
  }
  #settingsPage .settings-panel {
    max-height: 52vh;
  }
}

/* 모바일에서도 배경 어둡게 */
@media (max-width: 900px) {
  #settingsPage .listing-backdrop {
    display: block;
  }
}

#settingsPage .listing-header {
  padding: 8px 12px;
  min-height: 44px;
}

.settings-content {
  flex: 0 1 auto;
  min-height: 0;
  max-height: 35vh;
  overflow-y: auto;
  padding: 10px 16px;
  -webkit-overflow-scrolling: touch;
}

.settings-section {
  margin-bottom: 12px;
}

.settings-section__title {
  font-size: 15px;
  font-weight: 700;
  color: #111;
  margin: 0 0 8px 0;
}

.settings-radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-radio {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 15px;
  color: #333;
}

.settings-radio input {
  width: 18px;
  height: 18px;
  accent-color: #2b6cff;
}

.settings-dong-wrap {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #eee;
}

.settings-dong-wrap.hidden {
  display: none;
}

.settings-dong-desc {
  font-size: 13px;
  color: #666;
  margin: 0 0 10px 0;
}

.settings-dong-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.settings-dong-input {
  flex: 1;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 15px;
}

.settings-dong-input:focus {
  outline: none;
  border-color: #2b6cff;
}

.settings-dong-search {
  flex-shrink: 0;
  height: 44px;
  padding: 0 16px;
  border: none;
  border-radius: 8px;
  background: #2b6cff;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.settings-dong-search:hover {
  background: #1a5ae6;
}

.settings-dong-label {
  font-size: 13px;
  color: #2b6cff;
  margin: 0 0 8px 0;
  min-height: 1.2em;
}

.settings-dong-result {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-dong-item {
  display: block;
  width: 100%;
  padding: 12px 14px;
  text-align: left;
  border: 1px solid #eee;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.settings-dong-item:hover {
  background: #f5f8ff;
  border-color: #2b6cff;
}

.settings-dong-hint,
.settings-dong-error {
  font-size: 13px;
  margin: 8px 0 0 0;
}

.settings-dong-hint {
  color: #888;
}

.settings-dong-error {
  color: #c00;
}

.settings-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 10px 16px;
  border-top: 1px solid #eee;
  background: #fff;
}

.settings-btn-save {
  display: block;
  width: 100%;
  height: 42px;
  border: none;
  border-radius: 8px;
  background: #2b6cff;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.settings-btn-save:hover {
  background: #1a5ae6;
}

.settings-btn-save:active {
  background: #0d4bc7;
}
