/* 체험단 초대 — 초대하기 창 · 초대받은 체험단 창 · 초대 화면(/invite) · 목록/캘린더의 '초대받음' 표시
   style.css 의 색(--ink, --accent ...)을 그대로 씁니다. */

/* ---------- 공통 창 ---------- */

.inv-dialog { width: min(460px, 94vw); }
.inv-dialog [hidden] { display: none; }

.inv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.inv-head h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 16px;
  min-width: 0;
}
.inv-head h2 span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-head h2 svg,
.inv-shared-tag svg,
.inv-section h3 svg,
.inv-quick svg,
.inv-share-btn svg,
.inv-gone svg,
.inv-cta-note svg,
.inv-kakao svg,
.inv-cta-sub svg,
.inv-avatar svg,
.shared-tag svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.inv-head h2 svg { width: 17px; height: 17px; color: var(--accent); }

.inv-lead {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.inv-lead b { color: var(--ink); font-weight: 600; }

.inv-loading { color: var(--muted); font-size: 13px; text-align: center; padding: 30px 0; }

/* ---------- 초대하기 창 (주인) ---------- */

/* 메모 칸 — 오른쪽 위 모서리에 '메모 복사' 아이콘 */
.inv-memo-box { position: relative; }
#campaign-form #invite-memo,
#invite-memo {
  width: 100%;
  margin: 0;
  padding: 10px 42px 10px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
}
#campaign-form #invite-memo:focus,
#invite-memo:focus { outline: none; border-color: var(--ink); }
.inv-memo-tools {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  gap: 4px;
}
.inv-memo-tools .icon-btn { width: 28px; height: 28px; }

.inv-share {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 10px 0 6px;
}
/* 아이콘과 글자를 한 줄로 — 칸 높이를 낮게 */
.inv-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.inv-share-btn svg { width: 15px; height: 15px; }
.inv-share-btn:hover { border-color: var(--ink); background: var(--accent-soft); }
.inv-share-btn:disabled { opacity: 0.5; cursor: default; }
/* 카카오톡은 늘 보던 노란색으로 알아보기 쉽게 */
.inv-share-btn.kakao { background: #fee500; border-color: #fee500; color: #191919; }
.inv-share-btn.kakao svg { fill: #191919; stroke: none; }
.inv-share-btn.kakao:hover { background: #fada0a; border-color: #fada0a; }

#invite-state { margin: 4px 0 0; min-height: 1em; }

.inv-guests {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.inv-guests-list { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.inv-guests-count, .inv-guests-empty { font-size: 12px; color: var(--muted); }
/* 담아간 회원 한 명 = 사진 + 별명 + 담은 날 */
.inv-guest-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.inv-guest {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 3px 10px 3px 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 12.5px;
}
.inv-guest-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.inv-guest-when { color: var(--muted); font-size: 11px; flex-shrink: 0; }

/* ---------- 프로필 사진 ---------- */

.inv-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}
.inv-avatar svg { width: 17px; height: 17px; }
.inv-avatar.sm { width: 26px; height: 26px; }
.inv-avatar.sm svg { width: 13px; height: 13px; }

/* ---------- 보낸 사람 + 메모 말풍선 ---------- */

.inv-from { display: flex; align-items: center; gap: 9px; margin: 4px 0 8px; }
.inv-from p { margin: 0; font-size: 13.5px; }

.inv-memo {
  position: relative;
  margin: 0 0 14px 20px;
  padding: 11px 13px;
  border-radius: 4px 14px 14px 14px;
  background: var(--accent-soft);
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------- 체험단 내용 (보기 전용) ---------- */

.inv-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
}
.inv-card.is-cancelled { opacity: 0.6; }

.inv-hero {
  padding: 16px 16px 14px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.inv-status {
  display: inline-block;
  padding: 2px 9px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 11px;
  color: var(--muted);
}
.inv-status.status-예약완료 { color: var(--info); }
.inv-status.status-예약중 { color: var(--info); opacity: 0.7; }
.inv-status.status-방문완료 { color: var(--warn); }
.inv-status.status-취소 { color: var(--danger); }
.inv-name { margin: 8px 0 2px; font-size: 20px; line-height: 1.3; word-break: keep-all; }
.inv-sub { margin: 0; font-size: 12.5px; color: var(--muted); }

/* 언제 가는지 — 가장 크게 */
.inv-when {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin: 14px auto 0;
  padding: 12px 10px;
  border-radius: 10px;
  background: var(--bg);
}
.inv-when-label { font-size: 11px; color: var(--muted); }
.inv-when strong { font-size: 18px; letter-spacing: -0.01em; }
.inv-when-time { font-size: 15px; color: var(--accent); font-weight: 600; }
.inv-when.is-empty strong { font-size: 15px; color: var(--muted); font-weight: 600; }

.inv-quicks { display: flex; justify-content: center; gap: 18px; margin-top: 14px; }
.inv-quick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--ink);
  text-decoration: none;
  font-size: 11px;
}
.inv-quick svg {
  width: 38px;
  height: 38px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  transition: border-color 0.12s ease, background 0.12s ease;
}
.inv-quick:hover svg { border-color: var(--ink); background: var(--accent-soft); }

.inv-section { padding: 12px 16px 6px; }
.inv-section + .inv-section { border-top: 1px dashed var(--border); }
.inv-section h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  font-size: 13px;
}
.inv-section h3 svg { width: 14px; height: 14px; color: var(--accent); }
.inv-section dl { margin: 0; }
.inv-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 10px;
  padding: 6px 0;
  font-size: 12.5px;
  line-height: 1.5;
}
.inv-row dt { color: var(--muted); }
.inv-row dd { margin: 0; white-space: pre-wrap; word-break: break-word; }
.inv-link { color: var(--info); text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }

/* ---------- 초대받은 체험단 창 머리 ---------- */

.inv-shared-tag,
.shared-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.inv-shared-tag svg, .shared-tag svg { width: 13px; height: 13px; }

/* ---------- 초대 화면 (/invite) ---------- */

.inv-page main { max-width: 480px; padding-bottom: 40px; }

.inv-cta-box { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.inv-cta-row { display: flex; gap: 8px; }
.inv-cta-row .btn { flex: 1; }
.inv-cta, .inv-cta-sub {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px;
  font-size: 14px;
  border-radius: 10px;
  text-decoration: none;
}
.inv-cta-sub svg { width: 17px; height: 17px; }
/* 구글 캘린더 · 휴대폰 캘린더 단추 두 개를 한 줄에 */
.inv-cal-row { display: flex; gap: 8px; }
.inv-cal-row .btn { flex: 1; min-width: 0; padding: 11px 6px; font-size: 13px; }
#guest-body .inv-cal-row { margin-top: 12px; }
.inv-kakao {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px;
  border-radius: 10px;
  background: #fee500;
  color: #191919;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
}
.inv-kakao svg { width: 20px; height: 20px; fill: #191919; stroke: none; }
.inv-cta-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}
.inv-cta-note svg { width: 15px; height: 15px; }
.inv-cta-note.ok { color: var(--ok); font-weight: 600; }
.inv-cta-note.warn { color: var(--warn); }
.inv-foot { margin-top: 22px; font-size: 11.5px; color: var(--muted); text-align: center; }
.inv-foot a { color: inherit; }

.inv-gone { text-align: center; padding: 50px 10px; color: var(--muted); }
.inv-gone svg { width: 34px; height: 34px; }
.inv-gone h2 { color: var(--ink); font-size: 17px; margin: 12px 0 6px; }
.inv-gone p { font-size: 13px; line-height: 1.6; margin: 0; }

/* ---------- 편집 창 '예약/초대' 탭의 초대하기 묶음 ---------- */

#invite-group .inv-lead { margin-top: 2px; }
#invite-group .inv-share { margin-bottom: 4px; }

/* ---------- 목록 카드 · 캘린더의 '초대받음' 표시 ---------- */
/* 내 체험단과 헷갈리지 않게: 점선 테두리 + 연한 배경 + 사람 아이콘 */

.campaign-card.is-shared {
  border-style: dashed;
  background: #fdfbf8;
}
.campaign-card.is-shared h3 { color: #4a443c; }
.shared-tag.sm { padding: 2px 7px; font-size: 11px; }

.cal-dot.is-shared { outline: 1.5px dashed var(--accent); outline-offset: 1px; border-radius: 50%; }
.cal-event.is-shared { border-style: dashed; background: #fdfbf8; }

/* ---------- 편집 창 예약 정보: 광고주 연락처 옆 전화 · 문자 아이콘 ---------- */

.contact-row { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
#campaign-form .contact-row input { margin-top: 0; flex: 1; min-width: 0; }
.contact-row .icon-btn { width: 34px; height: 34px; color: var(--accent); border-color: var(--accent); }
.contact-row .icon-btn svg { width: 16px; height: 16px; }
.contact-row .icon-btn:disabled { color: var(--muted); border-color: var(--border); opacity: 0.45; cursor: default; background: var(--surface); }
