/* CSS FOR THE DAY NAVIGATION */

/* Styling for date navigation with arrows */
.date-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
  margin: 20px 0px;
}

.date-navigation a {
  font-size: 1.5rem;
  color: #3498db; /* Blue color for the arrows */
  text-decoration: none;
  margin: 0 10px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.date-navigation a:hover {
  color: #2980b9; /* Slightly darker blue on hover */
}

.current-date {
  font-size: 1.5rem;
  color: #333;
  font-weight: 600;
  cursor: pointer;
}

.date-picker-container {
  display: flex;
  justify-content: center; /* Align horizontally */
  align-items: center; /* Align vertically */
  position: fixed; /* Fixed position to stay in place */
  top: 50%; /* Position it vertically at the center of the screen */
  left: 50%; /* Position it horizontally at the center of the screen */
  transform: translate(-50%, -50%); /* Adjust for perfect centering */
  z-index: 9999; /* Ensure it's on top of other content */
  width: auto; /* Adjust width as needed */
  padding: 20px; /* Optional padding */
  background-color: #fff; /* Optional background */
  border-radius: 8px; /* Optional border radius */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* Optional shadow */
}

#visible-date-picker {
  font-size: 1.2rem;
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

.date-picker-wrapper {
  position: relative; /* So the input is positioned relative to this */
  display: inline-block;
}

#hidden-date-picker {
  position: absolute;
  top: 100%; /* Places it directly below the current-date */
  left: 50%;
  transform: translateX(-50%);
  margin-top: 5px;
  font-size: 1rem;
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;

  opacity: 0; /* Hide it visually */
  pointer-events: none; /* Prevent interaction unless opened programmatically */
}

/* CSS FOR THE WEEK NAVIGATION */

.week-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
  margin: 20px 0;
}

.week-navigation a {
  font-size: 1.5rem;
  color: #3498db;
  text-decoration: none;
  margin: 0 10px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.week-navigation a:hover {
  color: #2980b9;
}

.current-week {
  font-size: 1.5rem;
  color: #333;
  font-weight: 600;
  cursor: pointer;
}

/* Wrapper to position week picker container */
.week-picker-wrapper {
  position: relative;
  display: inline-block;
}

/* The centered popup container for week picker */
.week-picker-container {
  display: none; /* Hidden by default */
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.week-picker-container.active {
  display: flex;
}

#visible-week-picker {
  font-size: 1.2rem;
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

/* Style the container holding all slot elements */
.slot-container {
  display: flex; /* Align items horizontally */
  justify-content: flex-start; /* Align items to the left */
  align-items: center; /* Vertically center items */
  width: 100%; /* Ensure the container takes up the full row width */
  flex-wrap: wrap; /* Allow items to wrap to the next line if needed */
  gap: 10px; /* Space between each slot item */
  overflow: hidden; /* Hide anything that overflows */
  position: relative; /* For handling positioning of overflow */
}

/* Ensure individual items inside the container take up equal space */
.slot-item {
  flex: 1 1 0; /* Allow items to grow and shrink equally */
  min-width: 0; /* Ensures content doesn’t overflow */
  white-space: nowrap; /* Prevent items from breaking into multiple lines */
  text-overflow: ellipsis; /* Display "..." when text overflows */
  overflow: hidden; /* Hide content that doesn't fit */
  display: block; /* Makes sure they take up the full width */
  padding: 5px;
  box-sizing: border-box; /* Include padding in the width calculation */
}

/* Optional: Style each slot item to differentiate */
.blocked-slot,
.appointment-client,
.bank-holiday-slot,
.professional-holiday-slot,
.free-slot,
.unavailable-slot {
  padding: 5px 10px;
  border-radius: 5px;
  background-color: rgba(0, 0, 0, 0.05); /* Semi-transparent background */
  font-size: 12px; /* Smaller font for better readability */
  display: inline-block;
  width: 100%; /* Ensure each slot item takes full available width */
}

/* Styling for individual slot types */
.appointment-client {
  background-color: #e0f8e0; /* Light green */
  color: #006400; /* Dark green */
  font-weight: bold;
  border-radius: 5px;
  text-align: center;
  cursor: pointer;
}

.free-slot {
  color: #888;
  font-style: italic;
  padding: 4px 6px;
  text-align: center;
  cursor: pointer;
}

.unavailable-slot {
  background-color: #ccc;
  color: #666;
  text-align: center;
  font-style: italic;
  border-radius: 5px;
  margin: 0;
  cursor: not-allowed;
  pointer-events: none;
}

.bank-holiday-slot {
  background-color: #f49a9a; /* Bright red */
  color: #666;
  text-align: center;
  font-style: italic;
  border-radius: 5px;
  margin: 0;
  cursor: not-allowed;
  pointer-events: none;
}

.professional-holiday-slot {
  background-color: #e9c177; /* Yellowish */
  color: #666;
  text-align: center;
  font-style: italic;
  border-radius: 5px;
  margin: 0;
  cursor: not-allowed;
  pointer-events: none;
}

.blocked-slot {
  background-color: #999; /* Gray */
  color: #666;
  text-align: center;
  font-style: italic;
  border-radius: 5px;
  cursor: pointer;
  padding: 4px 6px;
}

/* Handle the text overflow */
.slot-item {
  overflow: hidden;
  text-overflow: ellipsis; /* Add ellipsis to text */
  white-space: nowrap; /* Prevent text wrapping */
}
