* {
  box-sizing: border-box;
}

body {
  margin: 0;

  background-color: #f5f5f5;
}

button {
  font-family: inherit;
}

/* =========================
   전체 화면
========================= */

.together-room-screen {
  position: relative;

  width: 100%;
  max-width: 390px;
  min-height: 100vh;

  margin: 0 auto;

  background-color: #ffffff;

  padding-bottom: 88px;
}

/* =========================
   헤더
========================= */

.together-room-header {
  height: 58px;

  display: grid;
  grid-template-columns: 60px 1fr 60px;

  align-items: center;

  padding: 0 12px;

  box-sizing: border-box;

  border-bottom: 1px solid #eeeeee;

  background-color: #ffffff;
}

/* 제목 */

.together-room-header h1 {
  margin: 0;

  text-align: center;

  color: #111111;

  font-size: 15px;
  font-weight: 600;

  white-space: nowrap;
}

/* =========================
   뒤로가기
========================= */

.together-room-header .back-button {
  width: 40px;
  height: 40px;

  display: flex;

  align-items: center;
  justify-content: flex-start;

  padding: 0;

  border: none;

  background: none;

  cursor: pointer;
}

.together-room-header .back-button img {
  width: 22px;
  height: 22px;

  display: block;

  object-fit: contain;
}

/* =========================
   방 삭제
========================= */

.together-room-header .delete-room-button {
  justify-self: end;

  padding: 0;

  border: none;

  background: none;

  color: #f34d4b;

  font-size: 13px;

  text-align: right;

  white-space: nowrap;

  cursor: pointer;
}

/* =========================
   본문
========================= */

.together-room-content {
  padding: 20px 16px;
}

/* =========================
   초대 카드
========================= */

.invite-card {
  width: 100%;
  min-height: 94px;

  display: flex;

  align-items: center;
  justify-content: space-between;

  padding: 16px;

  border: 1px solid #dddddd;
  border-radius: 10px;

  background-color: #ffffff;
}

.invite-text {
  display: flex;

  flex-direction: column;

  gap: 8px;
}

.invite-text strong {
  color: #222222;

  font-size: 14px;
  font-weight: 600;
}

.invite-text span {
  color: #aaaaaa;

  font-size: 12px;

  line-height: 1.45;
}

/* =========================
   공유 아이콘 버튼
========================= */

.share-button {
  width: 34px;
  height: 34px;

  display: flex;

  align-items: center;
  justify-content: center;

  flex-shrink: 0;

  padding: 0;

  border: none;

  background: transparent;

  cursor: pointer;
}

.share-button img {
  width: 20px;
  height: 20px;

  display: block;

  object-fit: contain;
}

/* =========================
   참여자
========================= */

.participant-section {
  margin-top: 24px;
}

.participant-section h2 {
  margin: 0 0 14px;

  color: #222222;

  font-size: 14px;
  font-weight: 600;
}

.participant-list {
  display: flex;

  flex-direction: column;

  gap: 12px;
}

/* 참여자 한 명 */

.participant-item {
  min-height: 36px;

  display: flex;

  align-items: center;
}

/* 프로필 */

.participant-avatar {
  width: 28px;
  height: 28px;

  margin-right: 10px;

  display: flex;

  align-items: center;
  justify-content: center;

  flex-shrink: 0;

  border: 1.5px solid var(--participant-color);

  border-radius: 50%;

  color: var(--participant-color);

  font-size: 10px;

  overflow: hidden;
}

.participant-avatar img {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;
}

/* 참여자 이름 */

.participant-name {
  flex: 1;

  color: #333333;

  font-size: 10px;
}

/* 참여자 삭제 */

.remove-participant-button {
  height: 26px;

  padding: 0 8px;

  border: none;

  border-radius: 5px;

  background-color: #eeeeee;

  color: #999999;

  font-size: 11px;

  cursor: pointer;
}

/* =========================
   하단 버튼 영역
========================= */

.bottom-action {
  position: fixed;

  left: 50%;
  bottom: 0;

  transform: translateX(-50%);

  width: 100%;
  max-width: 390px;

  padding: 12px 16px 20px;

  background-color: #ffffff;
}

.primary-button {
  width: 100%;
  height: 46px;

  border: none;

  border-radius: 8px;

  background-color: #51b7b7;

  color: #ffffff;

  font-size: 14px;
  font-weight: 600;

  cursor: pointer;
}

.primary-button:active {
  background-color: #459b9a;
}

/* =========================
   초대 오버레이
========================= */

.invite-overlay {
  position: fixed;

  inset: 0;

  display: flex;

  align-items: center;
  justify-content: center;

  padding: 20px;

  background-color: rgba(0, 0, 0, 0.45);

  z-index: 1000;
}

.invite-overlay.hidden {
  display: none;
}

/* =========================
   초대 모달
========================= */

.invite-modal {
  position: relative;

  width: 100%;
  max-width: 350px;

  padding: 24px 20px 20px;

  border-radius: 14px;

  background-color: #ffffff;

  box-sizing: border-box;
}

.invite-modal h2 {
  margin: 0 0 8px;

  text-align: center;

  color: #111111;

  font-size: 17px;
  font-weight: 700;
}

.invite-description {
  margin: 0 0 24px;

  text-align: center;

  color: #888888;

  font-size: 11px;
}

/* =========================
   모달 닫기 버튼
========================= */

.invite-close-button {
  position: absolute;

  top: 14px;
  right: 14px;

  width: 28px;
  height: 28px;

  padding: 0;

  border: none;

  background: none;

  color: #666666;

  font-size: 22px;

  line-height: 1;

  cursor: pointer;
}

/* =========================
   초대 입력 영역
========================= */

.invite-field {
  margin-bottom: 18px;
}

.invite-field label {
  display: block;

  margin-bottom: 7px;

  color: #222222;

  font-size: 12px;
  font-weight: 600;
}

/* 링크 / 코드 박스 */

.invite-value-box {
  min-height: 46px;

  display: flex;

  align-items: center;

  gap: 8px;

  padding: 0 10px 0 12px;

  border: 1px solid #dddddd;

  border-radius: 8px;

  background-color: #fafafa;

  box-sizing: border-box;
}

.invite-value-box span,
.invite-value-box strong {
  flex: 1;

  min-width: 0;

  overflow: hidden;

  color: #333333;

  font-size: 11px;

  text-overflow: ellipsis;

  white-space: nowrap;
}

/* =========================
   참여 코드
========================= */

.code-box strong {
  text-align: center;

  font-size: 20px;
  font-weight: 700;

  letter-spacing: 5px;
}

/* =========================
   복사 버튼
========================= */

.copy-button {
  flex-shrink: 0;

  padding: 6px 9px;

  border: none;

  border-radius: 5px;

  background-color: #eeeeee;

  color: #555555;

  font-size: 10px;

  cursor: pointer;
}

.copy-button:active {
  background-color: #dddddd;
}

/* =========================
   링크 공유하기
========================= */

.share-link-button {
  width: 100%;
  height: 44px;

  margin-top: 4px;

  border: none;

  border-radius: 7px;

  background-color: #52aead;

  color: #ffffff;

  font-size: 13px;
  font-weight: 600;

  cursor: pointer;
}

.share-link-button:active {
  background-color: #459b9a;
}
