/* ============================================================
   돌봄 · CareHub — Shared Components
   ============================================================ */

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: var(--r-md);
  font-weight: var(--fw-semibold); font-size: var(--fs-body);
  padding: 0 18px; height: 48px;
  transition: transform .08s ease, background .15s ease, box-shadow .15s ease;
  white-space: nowrap; user-select: none;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-strong); }
.btn-ghost { background: var(--brand-soft); color: var(--brand); }
.btn-ghost:hover { background: #dceafd; }
.btn-line { background: #fff; color: var(--ink-700); border: 1.5px solid var(--line-strong); }
.btn-line:hover { border-color: var(--ink-300); background: var(--ink-50); }
.btn-dark { background: var(--ink-900); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { display: flex; width: 100%; }
.btn-lg { height: 54px; font-size: var(--fs-lg); border-radius: var(--r-lg); }
.btn-sm { height: 38px; font-size: var(--fs-sm); padding: 0 14px; border-radius: var(--r-sm); }
.btn:disabled { opacity: .45; pointer-events: none; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border-radius: var(--r-lg);
  box-shadow: var(--sh-sm); border: 1px solid var(--line);
}
.card-pad { padding: var(--sp-4); }
.card-flat { box-shadow: none; }

/* ---------- Badges / Chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 24px; padding: 0 9px; border-radius: var(--r-pill);
  font-size: var(--fs-xs); font-weight: var(--fw-semibold); line-height: 1;
}
.badge-brand { background: var(--brand-soft); color: var(--brand-strong); }
.badge-verified { background: var(--success-soft); color: var(--success); }
.badge-hot { background: var(--danger-soft); color: var(--danger); }
.badge-now { background: var(--c-pet-soft); color: #E07c1e; }
.badge-regular { background: var(--c-elder-soft); color: var(--c-elder); }
.badge-child { background: var(--c-child-soft); color: #C8941A; }
.badge-elder { background: var(--c-elder-soft); color: var(--c-elder); }
.badge-pet { background: var(--c-pet-soft); color: #E07c1e; }
.badge-edu { background: var(--c-edu-soft); color: var(--c-edu); }

/* Status pills */
.status { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 11px;
  border-radius: var(--r-pill); font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-wait { background: var(--st-wait-bg); color: var(--st-wait); }
.status-progress { background: var(--st-progress-bg); color: var(--st-progress); }
.status-cancel { background: var(--st-cancel-bg); color: var(--st-cancel); }
.status-dispute { background: var(--st-dispute-bg); color: var(--st-dispute); }
.status-done { background: var(--st-done-bg); color: var(--st-done); }

/* ---------- Chips (filter / category quick) ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: var(--r-pill);
  background: #fff; border: 1.5px solid var(--line-strong);
  font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--ink-600);
  white-space: nowrap; transition: .12s;
}
.chip:hover { border-color: var(--ink-300); }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- Inputs ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--ink-700); }
.input, .textarea, .select {
  width: 100%; border: 1.5px solid var(--line-strong); border-radius: var(--r-md);
  background: #fff; padding: 0 14px; height: 50px; font-size: var(--fs-body); color: var(--ink-800);
  transition: border .12s, box-shadow .12s;
}
.textarea { height: auto; padding: 13px 14px; resize: vertical; min-height: 96px; line-height: 1.55; }
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-400); }

/* ---------- Avatar ---------- */
.avatar {
  border-radius: 50%; background: var(--ink-100); object-fit: cover;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: var(--fw-bold); color: var(--ink-500); overflow: hidden; flex: none;
}
.avatar-sm { width: 40px; height: 40px; font-size: 15px; }
.avatar-md { width: 52px; height: 52px; font-size: 18px; }
.avatar-lg { width: 72px; height: 72px; font-size: 24px; }
.avatar-xl { width: 92px; height: 92px; font-size: 30px; }

/* ---------- Rating ---------- */
.rating { display: inline-flex; align-items: center; gap: 3px; font-weight: var(--fw-semibold); color: var(--ink-800); }
.rating .star { color: #FFB400; }
.rating .count { color: var(--ink-400); font-weight: var(--fw-regular); font-size: var(--fs-sm); }

/* ---------- Misc helpers ---------- */
.muted { color: var(--ink-400); }
.dim { color: var(--ink-500); }
.row { display: flex; align-items: center; }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.col { display: flex; flex-direction: column; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.price { font-weight: var(--fw-bold); color: var(--ink-900); }
.price .won { font-weight: var(--fw-medium); color: var(--ink-500); font-size: .85em; }
.divider { height: 1px; background: var(--line); border: none; margin: 0; }
.section-title { font-size: var(--fs-subtitle); font-weight: var(--fw-bold); color: var(--ink-900); letter-spacing: -.01em; }
.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 48px 24px; text-align: center; color: var(--ink-400);
}
.empty .ico { width: 56px; height: 56px; opacity: .5; }

/* category dot */
.cat-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.cat-dot.child { background: var(--c-child); }
.cat-dot.elder { background: var(--c-elder); }
.cat-dot.pet { background: var(--c-pet); }
.cat-dot.edu { background: var(--c-edu); }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%) translateY(20px);
  background: var(--ink-900); color: #fff; padding: 12px 20px; border-radius: var(--r-pill);
  font-size: var(--fs-sm); font-weight: var(--fw-medium); box-shadow: var(--sh-lg);
  opacity: 0; pointer-events: none; transition: .25s; z-index: 9999; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
