/* ============================================================
   DOM 03.08 — dataset
   ============================================================
   Only to make it look nice — not part of this lesson
   ------------------------------------------------------------ */
body {
  font-family: Arial, sans-serif;
  background-color: #FCFCFC;
  padding: 32px;
}

.summary {
  font-weight: bold;
}

.rooms {
  display: grid;
  grid-template-columns: repeat(4, 160px);
  gap: 16px;
}

.room {
  background-color: #FFFFFF;
  border: 2px solid #E4E4E4;
  border-radius: 12px;
  padding: 4px 16px;
}

.room h3 {
  margin-bottom: 4px;
}


/* ------------------------------------------------------------
   The concept: CSS that follows a data-* attribute
   ------------------------------------------------------------
   The HTML has NO data-status. JavaScript writes it (room.dataset.status = "…").
   The moment it does, one of these rules matches and the room changes colour.
   ------------------------------------------------------------ */
.room[data-status="free"] {
  border-color: #1F9D55;
  background-color: #E6F6ED;
}

.room[data-status="full"] {
  border-color: #E54B4F;
  background-color: #FDECEC;
}

/* Try it: add a third look for empty rooms —  .room[data-status="empty"]  —
   and make the JS write "empty" when occupied is 0. */
