/* 04 consent-profile — 동의 카드·사용자 정보 입력 위젯·내 정보 지우기·토스트
   색은 style.css 의 변수(--mint, --gray-soft, --line …)를 그대로 씀 */

/* 모듈 UI 영역 (app.js 가 .ui-block.ui-consent / .ui-profile 로 만듦) */
.ui-consent, .ui-profile {
  align-self: flex-start;
  width: min(100%, 520px);
}
.ui-block.done { opacity: 0.75; }

/* ───── 동의 카드 ───── */
.consent-card, .profile-card {
  border: 1px solid var(--line);
  border-left: 4px solid var(--mint);
  background: var(--bg);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.consent-items { display: flex; flex-wrap: wrap; gap: 6px; }
.consent-chip {
  font-size: 13px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--mint-soft);
  color: var(--ink);
}
.consent-rows {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  font-size: 14px;
  line-height: 1.5;
}
.consent-rows dt { color: var(--gray); white-space: nowrap; }
.consent-rows dd { margin: 0; }

/* ───── 버튼 줄 ───── */
.profile-actions, .profile-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.option-btn.primary { background: var(--mint); color: #fff; border-color: var(--mint); }
.option-btn.primary:hover:not(:disabled) { filter: brightness(1.05); color: #fff; }
.option-btn.ghost { border-color: var(--line); color: var(--gray); }
.ui-block .option-btn:disabled { opacity: 0.5; cursor: default; }

/* 진행 표시 (1 / 5) */
.profile-progress { font-size: 12px; color: var(--gray); font-variant-numeric: tabular-nums; }

/* ───── 숫자 입력 ───── */
.profile-number { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.profile-num-input {
  width: 120px;
  padding: 8px 10px;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
}
.profile-num-input:focus { border-color: var(--mint); }
.profile-num-input:disabled { opacity: 0.6; }
.profile-unit { color: var(--gray); font-size: 14px; }

/* ───── 다중 선택 토글 ───── */
.profile-multi { display: flex; flex-wrap: wrap; gap: 8px; }
.toggle-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.toggle-btn:hover:not(:disabled) { border-color: var(--mint); }
.toggle-btn[aria-pressed="true"] {
  background: var(--mint);
  border-color: var(--mint);
  color: #fff;
}
.toggle-btn:disabled { opacity: 0.5; cursor: default; }

.profile-other[hidden] { display: none; }
.profile-other-input {
  width: 100%;
  padding: 8px 10px;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
}
.profile-other-input:focus { border-color: var(--mint); }
.profile-error { font-size: 13px; color: #8a4b00; }
.profile-error[hidden] { display: none; }

/* ───── 상단 '내 정보 지우기' ───── */
.profile-clear-btn { font-size: 13px; padding: 6px 12px; font-weight: 500; }

/* ───── 토스트 ───── */
.profile-toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translate(-50%, 12px);
  z-index: 200;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink-card);
  color: #eef3f2;
  font-size: 14px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
  max-width: calc(100vw - 32px);
  text-align: center;
}
.profile-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ───── 좁은 화면 ───── */
@media (max-width: 480px) {
  .ui-consent, .ui-profile { width: 100%; }
  .consent-rows { grid-template-columns: 1fr; gap: 2px; }
  .consent-rows dt { font-size: 12px; }
  .profile-number .profile-num-input { flex: 1 1 100px; min-width: 0; }
  .profile-actions .option-btn, .profile-number .option-btn { flex: 1 1 auto; text-align: center; }
  .profile-clear-btn { padding: 6px 10px; font-size: 12px; }
}
