/* =========================
   SETTLEMENT ROOM
========================= */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: #f5f5f5;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}


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

.settlement-room-screen {
  position: relative;

  min-height: 100vh;

  background-color: #ffffff;
}


/* =========================
   hidden
========================= */

.hidden {
  display: none !important;
}


/* =========================
   상단 헤더
========================= */

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


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

  text-align: center;

  color: #111111;

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


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

.back-button {
  width: 40px;
  height: 40px;

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

  padding: 0;

  border: none;

  background: none;

  cursor: pointer;
}


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

  display: block;
}


.header-space {
  width: 40px;
}


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

.settlement-room-content {
  padding: 18px 16px 32px;

  background-color: #ffffff;
}


/* =========================
   과거 정산 보기
========================= */

.room-option-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;

  margin-bottom: 22px;
}


.history-checkbox-label {
  display: flex;
  align-items: center;

  gap: 7px;

  cursor: pointer;

  user-select: none;
}


.history-checkbox-label input {
  position: absolute;

  opacity: 0;

  pointer-events: none;
}


.custom-checkbox {
  position: relative;

  width: 17px;
  height: 17px;

  flex-shrink: 0;

  border: 1.5px solid #b7b7b7;
  border-radius: 4px;

  background-color: #ffffff;
}


.history-checkbox-label
  input:checked
  + .custom-checkbox {
  border-color: #52aead;

  background-color: #52aead;
}


.history-checkbox-label
  input:checked
  + .custom-checkbox::after {
  content: "";

  position: absolute;

  top: 2px;
  left: 5px;

  width: 4px;
  height: 8px;

  border: solid #ffffff;
  border-width: 0 2px 2px 0;

  transform: rotate(45deg);
}


.history-checkbox-text {
  color: #666666;

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


/* =========================
   목록 제목
========================= */

.room-list-title-row {
  margin-bottom: 14px;
}


.room-list-title-row h2 {
  margin: 0;

  color: #111111;

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


/* =========================
   정산방 목록
========================= */

.settlement-room-list {
  display: flex;
  flex-direction: column;

  gap: 12px;
}


/* =========================
   정산 카드
========================= */

.settlement-room-card {
  width: 100%;

  padding: 14px 16px;

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

  background-color: #ffffff;

  cursor: pointer;

  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}


.settlement-room-card:active {
  background-color: #fafafa;
}


.settlement-room-card.completed {
  border-color: #e3e3e3;

  background-color: #fafafa;
}


/* =========================
   카드 상단
========================= */

.room-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 12px;

  margin-bottom: 12px;
}


.room-card-name {
  min-width: 0;

  overflow: hidden;

  color: #222222;

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

  text-overflow: ellipsis;
  white-space: nowrap;
}


.room-card-count {
  flex-shrink: 0;

  color: #555555;

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


/* =========================
   진행도 바
========================= */

.room-progress-bar {
  width: 100%;
  height: 28px;

  overflow: hidden;

  border: 1px solid #999999;
  border-radius: 7px;

  background-color: #ffffff;
}


.room-progress-fill {
  height: 100%;

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

  overflow: hidden;

  background-color: #52aead;

  transition: width 0.25s ease;
}


.room-progress-text {
  flex-shrink: 0;

  color: #ffffff;

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

  white-space: nowrap;

  pointer-events: none;
}


/* =========================
   완료 진행도
========================= */

.settlement-room-card.completed
  .room-progress-fill {
  background-color: #d7d7d7;
}


.settlement-room-card.completed
  .room-progress-text {
  color: #333333;
}


/* =========================
   완료 표시
========================= */

.room-history-label {
  display: inline-block;

  margin-top: 8px;

  color: #999999;

  font-size: 9px;
}


/* =========================
   빈 목록
========================= */

.empty-room-message {
  padding: 70px 20px;

  text-align: center;
}


.empty-room-message strong {
  display: block;

  margin-bottom: 7px;

  color: #555555;

  font-size: 14px;
}


.empty-room-message p {
  margin: 0;

  color: #999999;

  font-size: 11px;
}


/* =========================
   작은 화면
========================= */

@media (max-width: 390px) {

  .settlement-room-content {
    padding-left: 16px;
    padding-right: 16px;
  }

}