* {
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  margin: 0;
  background: #f5f6fa;
}

.calendar-container {
  max-width: 900px;
  margin: auto;
}

h1 {
  text-align: center;
  margin-bottom: 20px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  background: white;
  border: 1px solid #ddd;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 40px;
}

.calendar-container h2 {
  text-align: left;
  margin: 30px 0 10px 10px;
  font-size: 20px;
}

.day-cell.disabled {
  background-color: #f1f1f1;
  color: #ccc;
  pointer-events: none;
}


.day-name,
.day-cell {
  padding: 12px;
  text-align: center;
  border-radius: 4px;
}

.day-name {
  font-weight: bold;
  background: #dfe6e9;
}

.day-cell {
  background: #ffffff;
  cursor: pointer;
  border: 1px solid #ccc;
  min-height: 80px;
  transition: background 0.2s ease;
}

.day-cell:hover {
  background: #81ecec;
}

/* Disabled or out-of-range days */
.day-cell.disabled {
  background: #f1f2f6;
  color: #aaa;
  pointer-events: none;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  background-color: #fefefe;
  margin: 10% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 60%;
  border-radius: 8px;
  position: relative;
}

.close-button {
  color: #aaa;
  position: absolute;
  right: 15px;
  top: 15px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close-button:hover {
  color: #e74c3c;
}

#timeslots {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* Always 4 columns */
  grid-template-rows: repeat(4, auto);   /* Always 4 rows */
  gap: 10px;
  justify-items: stretch;
}


.timeslot {
  padding: 12px;
  background-color: #3498db;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s ease;
  font-size: clamp(0.8rem, 2vw, 1rem);
  height: 60px; /* optional, makes each slot the same height */
  display: flex;
  align-items: center;
  justify-content: center;
}


.timeslot:hover {
  background-color: #2980b9;
}


.calendar-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 15px;
}

.calendar-header button {
  padding: 6px 12px;
  font-size: 16px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.calendar-header button:hover {
  background-color: #2980b9;
}

#monthYear {
  font-size: 20px;
  margin: 0;
}

.past-day {
  background-color: #f1f2f6;
  color: #999;
  cursor: not-allowed;
}

.calendar-header button:disabled {
  background-color: #bdc3c7; /* Soft gray background */
  color: #ecf0f1;             /* Lighter text */
  cursor: not-allowed;
  opacity: 0.7;
}

.weekend {
  background-color: #f8d7da;
}
