* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: #f5f5f5;
}

button,
input,
select {
  font-family: inherit;
}

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

.edit-room-screen {
  position: relative;

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

  margin: 0 auto;

  display: flex;
  flex-direction: column;

  background-color: #ffffff;

  overflow: hidden;
}

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

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

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

  align-items: center;

  padding: 0 12px;

  border-bottom: 1px solid #eeeeee;

  background-color: #ffffff;
}

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

  text-align: center;

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

  color: #111111;
}

.edit-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;
}

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

  display: block;

  object-fit: contain;
}

.header-space {
  width: 40px;
  height: 40px;

  justify-self: end;
}

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

.edit-room-content {
  flex: 1;
  min-height: 0;

  padding: 22px 16px 110px;

  overflow-y: auto;
  overflow-x: hidden;

  -webkit-overflow-scrolling: touch;

  scrollbar-width: none;
}

.edit-room-content::-webkit-scrollbar {
  display: none;
}

/* =========================
   공통 입력 영역
========================= */

.edit-field {
  margin-bottom: 24px;
}

.edit-field > label {
  display: block;

  margin-bottom: 9px;

  color: #222222;

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

.optional {
  color: #999999;

  font-size: 11px;
  font-weight: 400;
}

/* input (래퍼 내부 input 및 정산 기한 인풋 규격 포함) */

.edit-field input:not(.participant-add-row input):not(.edit-participant-name) {
  width: 100%;
  height: 46px;

  padding: 0 12px;

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

  outline: none;

  color: #222222;

  font-size: 13px;

  background-color: #ffffff;
}

.edit-field input:not(.participant-add-row input):not(.edit-participant-name):focus {
  border-color: #52aead;
}

.edit-field input:not(.participant-add-row input):not(.edit-participant-name)::placeholder {
  color: #bbbbbb;
}

/* select */

.edit-field select {
  width: 100%;
  height: 46px;

  padding: 0 12px;

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

  outline: none;

  background-color: #ffffff;

  color: #222222;

  font-size: 13px;
}

.field-help {
  margin: 7px 2px 0;

  color: #999999;

  font-size: 10px;

  line-height: 1.4;
}

/* =========================
   참여자 추가
========================= */

.participant-add-row {
  display: flex;

  align-items: center;

  gap: 8px;
}

.participant-add-row input {
  flex: 1;

  min-width: 0;
  height: 42px;

  padding: 0 12px;

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

  outline: none;

  font-size: 13px;
}

.participant-add-row input:focus {
  border-color: #52aead;
}

.participant-add-row input::placeholder {
  color: #bbbbbb;
}

.participant-add-button {
  flex-shrink: 0;

  height: 42px;

  padding: 0 15px;

  border: none;
  border-radius: 8px;

  background-color: #52aead;

  color: #ffffff;

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

  cursor: pointer;
}

/* =========================
   참여자 리스트
========================= */

.edit-participant-list {
  margin-top: 14px;

  display: flex;
  flex-direction: column;

  gap: 10px;
}

.edit-participant-item {
  display: flex;
  align-items: center;

  gap: 10px;

  min-height: 42px;

  padding: 6px 8px;

  border: 1px solid #eeeeee;
  border-radius: 8px;

  background-color: #ffffff;
}

.edit-participant-color {
  width: 20px;
  height: 20px;

  flex-shrink: 0;

  border-radius: 50%;
}

.edit-participant-name {
  flex: 1;

  min-width: 0;

  padding: 6px 4px;

  border: none;

  outline: none;

  background: transparent;

  color: #222222;

  font-size: 12px;
}

.edit-participant-name:focus {
  border-bottom: 1px solid #52aead;
}

/* 방장 */

.host-badge {
  flex-shrink: 0;

  height: 28px;

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

  padding: 0 8px;

  border-radius: 5px;

  background-color: rgba(82, 174, 173, 0.1);

  color: #52aead;

  font-size: 10px;
}

/* 삭제 */

.remove-participant-button {
  flex-shrink: 0;

  height: 28px;

  padding: 0 8px;

  border: none;
  border-radius: 5px;

  background-color: #f2f2f2;

  color: #888888;

  font-size: 10px;

  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;
}

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

  border: none;
  border-radius: 7px;

  background-color: #52aead;

  color: #ffffff;

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

  cursor: pointer;
}

.save-button:active,
.participant-add-button:active {
  background-color: #459b9a;
}

/* =========================
   정산 기한
========================= */

.deadline-wrapper {
  position: relative;
  width: 100%;
}

#deadlineToShow {
  width: 100%;
  height: 46px;

  padding: 0 14px;

  box-sizing: border-box;

  background: #ffffff;

  cursor: pointer;
}

/* 실제 date input은 화면 밖에 숨기되
   display:none은 하지 않음 */
.deadline-native {
  position: absolute;

  width: 1px;
  height: 1px;

  opacity: 0;

  pointer-events: none;
}