/* Calendar styles */
.calendar th {
  text-align: center;
}

.calendar td {
  height: 120px;
  width: 14.285714285714286%;
  padding: 5px;
  vertical-align: top;
}

.calendar .date {
  font-weight: bold;
  margin-bottom: 5px;
  text-align: center;
}

.cell-container:first-of-type {
  width: calc(100%);
  height: calc(100% - 2rem);
}

.cell-container {
  display: inline-block;
}

.time-slot {
  font-size: 0.8em;
  padding: 2px 4px;
  margin: 1px 0;
  border-radius: 3px;
  text-align: center;
  position: relative;
  transition: all 0.2s ease-in-out;
  border: 1px solid transparent;
}

.time-slot.available {
  background-color: #d4edda;
  color: #155724;
  cursor: pointer;
}

.time-slot.available:hover {
  background-color: #c3e6cb;
  border-color: #155724;
  box-shadow: 0 0 5px rgba(21, 87, 36, 0.3);
}

.time-slot.occupied {
  background-color: #f8d7da;
  color: #721c24;
  text-decoration: line-through;
  cursor: pointer;
  position: relative;
  transition: background-color 0.2s ease;
}

.time-slot.occupied:hover {
  background-color: #f5c6cb;
  transform: scale(1.02);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.time-slot.beyond-limit {
  background-color: #e9ecef;
  color: #6c757d;
  cursor: not-allowed;
  opacity: 0.6;
}

.time-slot.beyond-limit:hover {
  background-color: #e9ecef;
  transform: none;
  box-shadow: none;
}

.time-slot.past {
  background-color: #f8f9fa;
  color: #6c757d;
  cursor: not-allowed;
  opacity: 0.7;
  border: 1px solid #dee2e6;
}

.time-slot.past:hover {
  background-color: #f8f9fa;
  transform: none;
  box-shadow: none;
}

.time-slot.past.available {
  background-color: #f8f9fa;
  color: #6c757d;
  cursor: not-allowed;
  opacity: 0.7;
}

.time-slot.past.occupied {
  background-color: #f8f9fa;
  color: #6c757d;
  cursor: not-allowed;
  opacity: 0.7;
}

.other-month {
  background-color: #f8f9fa;
  color: #6c757d;
}

.day-off {
  background-color: #dddddd;
  height: 100%;
}

.time-slot-dropdown {
  display: none;
  position: absolute;
  left: 100%;
  top: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  min-width: 150px;
}

.calendar-container {
  position: relative;
  overflow: visible;
}

.time-slot-dropdown.show {
  display: block;
}

.time-slot-dropdown a {
  display: block;
  padding: 8px 12px;
  color: #333;
  text-decoration: none;
  white-space: nowrap;
}

.time-slot-dropdown a:hover {
  background-color: #f8f9fa;
}

.flexi-gap {
  display: flex;
  gap: 16px;
}

/* Appointment popup styles */
.appointment-popup {
  position: fixed;
  background-color: white;
  color: #333;
  padding: 16px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 10000;
  pointer-events: auto;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  max-width: 300px;
  white-space: normal;
  line-height: 1.5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid #ddd;
  user-select: text;
  cursor: text;
}

.appointment-popup.show {
  opacity: 1;
}

.appointment-popup .popup-header {
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 8px;
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
}

.appointment-popup .popup-field {
  margin-bottom: 6px;
  display: flex;
  align-items: flex-start;
}

.appointment-popup .popup-label {
  font-weight: 600;
  color: #555;
  min-width: 60px;
  margin-right: 8px;
}

.appointment-popup .popup-value {
  color: #333;
  flex: 1;
  word-break: break-word;
}

.appointment-popup .popup-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  font-size: 18px;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.appointment-popup .popup-close:hover {
  color: #666;
}
