/* -------------------------------------------------------
   GENERAL LAYOUT
-------------------------------------------------------- */
body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background: #f5f5f5;
}

#mobileContainer {
  max-width: 480px;
  margin: 0 auto;
  padding: 0;
}

/* -------------------------------------------------------
   HEADER BAR  (VISUAL ONLY – NOT STICKY)
-------------------------------------------------------- */
#mobileHeader {
  position: static !important;   /* ensure NOT sticky */
  top: auto !important;
  z-index: auto !important;

  background: #9c27b0;
  color: white;
  padding: 15px;
  font-size: 20px;
  font-weight: bold;

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

  /* FIX: remove negative margin (breaks sticky on iOS) */
  margin: 0 0 10px !important;
  padding-left: 10px;
  padding-right: 10px;

  border-radius: 0 0 10px 10px;
}

#mobileHeader button {
  background: transparent;
  border: none;
  color: white;
  font-size: 22px;
  padding: 5px 10px;
}


#mobileHeader button {
  background: transparent;
  border: none;
  color: white;
  font-size: 22px;
  padding: 5px 10px;
}

/* -------------------------------------------------------
   DURATION BUTTONS
-------------------------------------------------------- */
#durationButtons {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 15px;
}

#durationButtons button {
  padding: 10px 15px;
  border: none;
  background: #ddd;
  border-radius: 6px;
  font-size: 16px;
}

#durationButtons button.active {
  background: #555;
  color: white;
}

/* -------------------------------------------------------
   SLOT LIST
-------------------------------------------------------- */
#slotList {
  padding: 15px;
}

.slotItem {
  padding: 14px;
  margin: 6px 0;
  border-radius: 8px;
  font-size: 18px;
  text-align: center;
  font-weight: 600;
  color: white;
}

/* -------------------------------------------------------
   SLOT COLOURS (YOUR EXACT SPEC)
-------------------------------------------------------- */

/* Unavailable */
.slotItem.unavailable {
  background: #808080 !important;
  color: white !important;
}

/* Both rooms free (purple) */
.slotItem.available {
  background: #9c27b0 !important;
  color: white;
}

/* Room 1 (green) */
.slotItem.room1 {
  background: #4caf50 !important;
  color: white;
}

/* Room 2 (blue) */
.slotItem.room2 {
  background: #2196f3 !important;
  color: white;
}

/* -------------------------------------------------------
   LEGEND (MATCHES mobile.html + SLOT COLOURS)
-------------------------------------------------------- */

.legendItem {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.legendColor {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  display: inline-block;
}

.legendColor.both {
  background: #9c27b0;
}

.legendColor.room1 {
  background: #4caf50;
}

.legendColor.room2 {
  background: #2196f3;
}

.legendColor.unavailable {
  background: #808080;
}

/* -------------------------------------------------------
   MOBILE ROOM SELECTOR MODAL
-------------------------------------------------------- */
.mobile-room-selector {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.55);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.mobile-room-selector .selector-box {
  background: #fff;
  padding: 22px;
  width: 80%;
  max-width: 320px;
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.mobile-room-selector h3 {
  margin-top: 0;
  margin-bottom: 18px;
  font-size: 20px;
  font-weight: 700;
}

.room-btn {
  display: block;
  width: 100%;
  padding: 14px;
  margin: 10px 0;
  font-size: 18px;
  border-radius: 8px;
  border: none;
  color: white;
  font-weight: 600;
}

.room-btn.room1 {
  background: #4caf50;
}

.room-btn.room2 {
  background: #2196f3;
}

.cancel-btn {
  margin-top: 12px;
  width: 100%;
  padding: 12px;
  background: #999;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
}

/* -------------------------------------------------------
   BOOKING FORM — CLEAN, SIMPLE, FIXED
-------------------------------------------------------- */
#bookingOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9998;
}

#successBox {
  position: relative;
  z-index: 9999;
}

#bookingForm {
  max-height: 90vh;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 20px;
}

/* Logo pseudo-element */
#bookingForm::before {
  content: "";
  display: block;
  height: 72px;
  margin: 0 auto 14px;
  opacity: 0.9;
  background-image: url("https://raw.githubusercontent.com/Erooms9AZ/erooms-calendar/main/assets/Erooms.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* Booking box container */
.booking-box {
  background: white;
  padding: 20px;
  width: 90%;
  max-width: 400px;
  border-radius: 12px;
}

/* Field styling */
#bookingForm input,
#bookingForm textarea {
  font-size: 18px;
  padding: 12px;
  border: 2px solid #673ab7;
  border-radius: 8px;
  margin-bottom: 12px;
  background: #fff;
  width: 100%;
  box-sizing: border-box;
}

#bookingForm label {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 4px;
  display: block;
}

/* Buttons (old bfSubmit/bfCancel) */
#bfSubmit,
#bfCancel {
  font-size: 18px;
  padding: 14px 20px;
  width: 100%;
  border-radius: 10px;
  margin-bottom: 12px;
}

#bfSubmit {
  background: #673ab7;
  color: white;
  border: none;
}

#bfCancel {
  background: #444;
  color: white;
  border: none;
}

/* Tighter vertical spacing */
#bookingForm label {
  margin-top: 2px;
  margin-bottom: 1px;
}

#bookingForm input,
#bookingForm textarea {
  margin-bottom: 4px;
  padding: 8px;
}

#bookingForm h3 {
  margin-bottom: 4px;
}

#bookingStatus {
  margin-top: 2px;
  margin-bottom: 4px;
}

/* Success box */
#successBox {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  width: 90%;
  max-width: 400px;
  font-size: 18px;
  padding: 20px;
  text-align: center;
  background: white;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

/* -------------------------------------------------------
   DISABLE PREVIOUS DAY
-------------------------------------------------------- */
#prevDayBtn.disabled {
  opacity: 0.3;
  pointer-events: none;
  filter: grayscale(100%);
}

/* -------------------------------------------------------
   LARGE MOBILE BUTTONS (BOOKING ONLY)
-------------------------------------------------------- */
#bookingOverlay button,
#successBox button {
  width: 100%;
  padding: 16px;
  font-size: 18px;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  margin: 10px 0;
  box-sizing: border-box;
}

/* Button colours */
#submitBtn,
#nextBtn,
#successOk {
  background: #673ab7;
  color: white;
}

#backBtn {
  background: #777;
  color: white;
}

#cancelBtn,
#bfCancel {
  background: #444;
  color: white;
}
html, body {
  max-width: 100% !important;
  overflow-x: hidden !important;
}

* {
  box-sizing: border-box !important;
  max-width: 100% !important;
}
