/* Availability Calendar Styles */

.calendar-wrapper {
  max-width: 600px;
  margin: 0 auto;
}

#availability-calendar {
  padding: 1.875rem 0;
}

/* Navigation */
.calendar-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.calendar-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #333;
  flex: 1;
  text-align: center;
}

.calendar-btn {
  padding: 0.5rem 1rem;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.calendar-btn:hover:not(.disabled) {
  background-color: #0056b3;
}

.calendar-btn.disabled {
  background-color: #cccccc;
  cursor: not-allowed;
  opacity: 0.6;
}

.calendar-prev {
  order: 1;
}

.calendar-next {
  order: 3;
}

@media (max-width: 600px) {
  .calendar-navigation {
    gap: 0.5rem;
  }

  .calendar-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
  }

  .calendar-title {
    order: 2;
    flex: 0 0 100%;
    margin-bottom: 0.5rem;
  }

  .calendar-prev {
    order: 1;
    flex: 1;
    min-width: 0;
  }

  .calendar-next {
    order: 3;
    flex: 1;
    min-width: 0;
  }
}

/* Calendar Month */
.calendar-month {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  padding: 1rem;
}

.calendar-grid {
  display: flex;
  flex-direction: column;
}

.weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.weekday {
  text-align: center;
  font-weight: 600;
  font-size: 0.875rem;
  color: #666;
  padding: 0.5rem 0;
}

.days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
}

.day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  border-radius: 4px;
  border: 1px solid #ddd;
  background-color: #fafafa;
  cursor: default;
  color: #333;
  font-weight: 500;
  transition: all 0.2s ease;
}

.day.empty {
  background-color: transparent;
  border: none;
}

.day.past {
  background-color: #f0f0f0;
  color: #999;
  border-color: #e0e0e0;
}

.day.saturday {
  background-color: #e8f5e9;
  border-color: #4caf50;
  color: #1b5e20;
}

.day.past.saturday {
  background-color: #f0f0f0;
  border-color: #e0e0e0;
  color: #999;
}


.day.booked {
  background-color: #ffcdd2;
  border-color: #d32f2f;
  color: #b71c1c;
  font-weight: 600;
}

.day.booked.saturday {
  background-color: #ef5350;
  border-color: #c62828;
  color: #fff;
}

/* Force ALL past dates to appear as grey, even if booked */
.day.past.booked {
  background-color: #f0f0f0 !important;
  border-color: #e0e0e0 !important;
  color: #999 !important;
  font-weight: 500 !important;
}

/* If you also want past+booked+Saturday grey */
.day.past.booked.saturday {
  background-color: #f0f0f0 !important;
  border-color: #e0e0e0 !important;
  color: #999 !important;
}


/* Legend */
.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2rem;
  padding: 1rem;
  background-color: #fafafa;
  border-radius: 8px;
}

.legend-item {
  display: flex;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.legend-color {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid #ddd;
}

.legend-color.available {
  background-color: #e8f5e9;
  border-color: #4caf50;
}

.legend-color.saturday {
  background-color: #e8f5e9;
  border-color: #4caf50;
}

.legend-color.booked {
  background-color: #ffcdd2;
  border-color: #d32f2f;
}

.legend-color.past {
  background-color: #f0f0f0;
  border-color: #ddd;
}

/* Responsive */
@media (max-width: 768px) {
  .day {
    font-size: 0.75rem;
  }

  .calendar-legend {
    flex-direction: column;
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  .calendar-wrapper {
    max-width: 100%;
  }

  .day {
    font-size: 0.7rem;
  }

  .calendar-title {
    font-size: 1.1rem;
  }

  .calendar-btn {
    font-size: 0.7rem;
    padding: 0.35rem 0.6rem;
  }
}
