/* Global reset */
* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', 'Segoe UI', Tahoma, Arial, sans-serif;
  /* Background photo */
  background-image: url('kamperland_waterski.jpg'); /* or your own image */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #333;
  line-height: 1.4;
}

  /* Frosted glass card */
.container {
  max-width: 100%;
  padding: 20px;
  margin: 0 auto;
  /* Increase transparency even further and slightly reduce blur so more of the
     photo shows through while preserving readability */
  background-color: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  transition: padding 0.3s ease;
}

/* Title */
h1 {
  text-align: center;
  margin-bottom: 15px;
  font-size: 1.8rem;
  font-weight: 600;
  color: #004d40;
}

/* Grid container */
.booking-grid {
  display: grid;
  overflow-x: auto;
  border: 1px solid #ddd;
  border-right: none;
  border-bottom: none;
}

/* Date headers */
.date-header {
  padding: 10px;
  text-align: center;
  font-weight: 600;
  /* Make date headers more transparent */
  /* Make date headers even more transparent */
  background-color: rgba(250,250,250,0.45);
  border-right: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  white-space: nowrap;
}

/* Room header cells */
.room-header {
  padding: 10px;
  /* Make room headers more transparent */
  /* Make room headers even more transparent */
  background-color: rgba(243,243,243,0.45);
  border-right: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  font-weight: 600;
  position: sticky;
  left: 0;
  z-index: 2;
  white-space: nowrap;
}

/* Secondary line (capacity/type) */
.room-note {
  font-size: 0.75rem;
  color: #555;
  font-weight: 400;
}

/* Booking cells */
.booking-cell {
  padding: 12px;
  min-width: 80px;
  min-height: 70px;
  border-right: 1px solid #eee;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  position: relative;
  /* Further lighten booking cell background so the photo shows through */
  background-color: rgba(255,255,255,0.15);
}

/* Booked cells */
.booking-cell.taken {
  /* Lighter colour for occupied cells */
  background-color: rgba(224,247,250,0.5);
}

/* Full cells */
.booking-cell.full {
  /* Lighter colour for fully booked cells */
  background-color: rgba(255,235,238,0.5);
  cursor: not-allowed;
}

/* Selected cells */
.booking-cell.selected {
  /* Lighter selection highlight */
  background-color: rgba(255,241,118,0.15);
  border: 2px dashed #fdd835;
}

/* Hover effect */
.booking-cell:hover:not(.full) {
  background-color: rgba(232,245,233,0.4);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transform: translateY(-1px);
}

/* Name tags */
.name-tag {
  display: inline-block;
  margin: 2px 0;
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 0.75rem;
  line-height: 1.2;
  color: #000;
  word-break: break-word;
  border: 1px solid rgba(0,0,0,0.05);
  opacity: 0.8;
}

/* Modal */
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal.hidden { display: none; }

.modal-content {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 320px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.modal-content h2 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.3rem;
  color: #111;
}

.modal-content label {
  display: block;
  font-weight: 600;
  margin-bottom: 5px;
}

.modal-content input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}

.modal-buttons {
  margin-top: 15px;
  display: flex;
  justify-content: flex-end;
}

.modal-buttons button {
  padding: 8px 14px;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
}

#cancel-button {
  background-color: #cfd8dc;
  color: #333;
}
#cancel-button:hover {
  background-color: #b0bec5;
}

#confirm-button {
  background-color: #00897b;
  color: #fff;
}
#confirm-button:hover {
  background-color: #00695c;
}

/* Reserve & clear buttons */
.reserve-btn-container {
  margin-top: 10px;
  text-align: center;
}

#reserve-selected-button,
#clear-selected-button {
  padding: 12px 24px;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0,0,0,0.12);
  transition: background-color 0.2s ease, transform 0.1s ease;
}

#reserve-selected-button {
  background-color: #00897b;
  color: #fff;
}
#reserve-selected-button:disabled {
  background-color: #b2dfdb;
  cursor: not-allowed;
}
#reserve-selected-button:not(:disabled):hover {
  background-color: #00796b;
  transform: translateY(-1px);
}

#clear-selected-button {
  margin-left: 10px;
  background-color: #e57373;
  color: #fff;
}
#clear-selected-button:disabled {
  background-color: #ffcdd2;
  cursor: not-allowed;
}
#clear-selected-button:not(:disabled):hover {
  background-color: #ef5350;
  transform: translateY(-1px);
}

/* Responsive tweaks */
@media (max-width: 600px) {
  h1 {
    font-size: 1.4rem;
    margin-bottom: 15px;
  }
  .container { padding: 10px; }
  .date-header,
  .room-header,
  .booking-cell {
    padding: 6px;
    font-size: 0.75rem;
  }
  .booking-cell {
    min-width: 60px;
    min-height: 60px;
  }
  .name-tag {
    font-size: 0.65rem;
    padding: 1px 3px;
  }
  #reserve-selected-button,
  #clear-selected-button {
    padding: 8px 16px;
    font-size: 0.9rem;
  }
}
