/* Reservation System Styles */

.reservation-container {
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
  padding: 1rem;
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.calendar-navigation {
  display: flex;
  gap: 0.5rem;
}

.nav-button {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  background-color: #358ff6;
  color: white;
  border-radius: 0.25rem;
}

.nav-button:hover {
  background-color: #2a7ad3;
  transition-property: color, background-color, border-color;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 300ms;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.25rem;
}

.day-header {
  text-align: center;
  font-weight: 700;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.day {
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.25rem;
  border-width: 1px;
  cursor: pointer;
}

.day:hover:not(.empty):not(.disabled) {
  background-color: #f3f4f6;
}

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

.day.disabled {
  color: #d1d5db;
  cursor: not-allowed;
}

.day.has-slots {
  background-color: #dcfce7;
  border-color: #bbf7d0;
}

/* New availability indicators with better colors */

.day.fully-booked {
  background-color: #fee2e2 !important;
  border-color: #fca5a5 !important;
  color: #991b1b !important;
}

.day.mostly-booked {
  background-color: #ffedd5 !important;
  border-color: #fdba74 !important;
  color: #9a3412 !important;
}

.day.partially-booked {
  background-color: #dcfce7 !important;
  border-color: #86efac !important;
  color: #166534 !important;
}

/* This should come after other day states to ensure it overrides them */

.day.selected {
  background-color: #358ff6 !important;
  color: white !important;
  border-color: #358ff6 !important;
}

.time-slots-section {
  margin-top: 1.5rem;
  padding: 1rem;
  border-width: 1px;
  border-radius: 0.25rem;
}

.booking-form-section {
  margin-top: 1.5rem;
  padding: 1rem;
  border-width: 1px;
  border-radius: 0.25rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.5rem;
  border-width: 1px;
  border-radius: 0.25rem;
}

.submit-button {
  padding-left: 1rem;
  padding-right: 1rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  background-color: #358ff6;
  color: white;
  border-radius: 0.25rem;
}

.submit-button:hover {
  background-color: #2a7ad3;
  transition-property: color, background-color, border-color;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 300ms;
}

.message {
  padding: 1rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
  border-radius: 0.5rem;
}

.success-message {
  background-color: #dcfce7;
  color: #166534;
}

.error-message {
  background-color: #fee2e2;
  color: #991b1b;
}

/* Loading animations for the calendar and time slots */

@keyframes pulse {
  0% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.6;
  }
}

.loading-day {
  background-color: #f3f4f6;
  animation: pulse 1.5s infinite ease-in-out;
}

.calendar-loading {
  position: relative;
}

#calendar-loading-indicator {
  animation: pulse 1.5s infinite ease-in-out;
}

#loading-message {
  animation: pulse 1.5s infinite ease-in-out;
}

/* Make time slots more visibly clickable */

.time-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: white;
  color: #1f2937;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  padding-left: 1rem;
  padding-right: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 200ms;
}

.time-slot:hover {
  background-color: #ebf5ff;
  border-color: #93c5fd;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.time-slot.selected {
  background-color: #358ff6;
  border-color: #358ff6;
  color: white;
}

.time-slot.selected:hover {
  background-color: #2a7ad3;
  border-color: #2a7ad3;
}

/* Add a small clock icon to time slots */

.time-slot::before {
  content: '🕐 ';
  margin-right: 0.25rem;
}

/* Calendar Legend Styles */

.calendar-legend {
  margin-top: 1rem;
  padding: 0.75rem;
  background-color: #f9fafb;
  border-radius: 0.5rem;
  border-width: 1px;
  font-size: 0.875rem;
}

.legend-color-box {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border-radius: 0.25rem;
  margin-right: 0.5rem;
  min-width: 16px;
  min-height: 16px;
}

.legend-color-box.green {
  background-color: #dcfce7;
  border: 1px solid #86efac;
}

.legend-color-box.orange {
  background-color: #ffedd5;
  border: 1px solid #fdba74;
}

.legend-color-box.red {
  background-color: #fee2e2;
  border: 1px solid #fca5a5;
}

.hover\:bg-\[\#2a7ad3\]:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(42 122 211 / var(--tw-bg-opacity));
}

.hover\:underline:hover {
  text-decoration-line: underline;
}

@media (min-width: 768px) {
  .md\:order-1 {
    order: 1;
  }

  .md\:order-2 {
    order: 2;
  }

  .md\:block {
    display: block;
  }

  .md\:hidden {
    display: none;
  }

  .md\:w-1\/2 {
    width: 50%;
  }

  .md\:w-2\/5 {
    width: 40%;
  }

  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .md\:flex-row-reverse {
    flex-direction: row-reverse;
  }

  .md\:justify-start {
    justify-content: flex-start;
  }

  .md\:text-left {
    text-align: left;
  }

  .md\:text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
  }
}

@media (min-width: 1024px) {
  .lg\:text-5xl {
    font-size: 3rem;
    line-height: 1;
  }
}
