.calendar {
  font-family: "Manrope", sans-serif;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  position: relative;
  box-sizing: border-box;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  padding: 1.5rem;
}

.calendar__header {
  text-align: left;
  margin-bottom: 1rem;
}

.calendar__title {
  font-size: 1.5rem;
  font-weight: bold;
  color: #091a4f;
  margin: 0;
  display: flex;
  align-items: center;
}

.calendar__month {
  margin-right: 0.5rem;
}

.calendar__carousel-wrapper {
  width: 100%;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.calendar__button {
  color: #2f2f2f !important;
  border: none !important;
  cursor: pointer;
  border-radius: 0.5rem !important;
  padding: 0.3rem !important;
}

.calendar__button:hover {
  background-color:#e0e0e0 !important;
  scroll-behavior: smooth;
}

.calendar__button:disabled {
  background-color: #ccc;
  color: #666;
  cursor: not-allowed;
}

.calendar__days {
  width: 100%;
  display: flex;
  gap: 0.5rem;
  overflow: hidden;
  padding: 0.5rem !important;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.calendar__days::-webkit-scrollbar {
  display: none;
}

.calendar__day {
  display: flex;
  flex-direction: column;
  align-items: start;
  padding: 1rem 2rem !important;
  border: 1px solid #d8d8d8;
  border-radius: 0.5rem;
  text-align: center;
  cursor: pointer;
  user-select: none;
  position: relative;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

.calendar__day:hover {
  border: 1px solid #15435a;
  color: #15435a;
  font-weight: bold;
}

.calendar__day--selected {
  background-color: #97e2f8cc;
  border: 1px solid #97e2f8cc;
  color: #091a4f;
  font-weight: bold;
}

.calendar__day__slots-count {
  font-size: 0.4rem;
  text-align: center;
}

.calendar__day__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.calendar__day__weekday {
  font-size: 0.75rem;
}

.calendar__day__date {
  font-size: 1.3rem; 
}


.calendar__slot {
  background-color: #f8f9fa;
  border: 1px solid #d8d8d8;
  padding: 0.5rem 1rem !important;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  flex: 1 0 calc(25% - 1rem);
  text-align: center;
  font-size: 1rem !important;
  font-weight: regular;
}

.calendar__slot:focus {
  outline: none;
}

.calendar__slot:hover {
  border: 1px solid #15435a;
  color: #15435a;
  font-weight: bold;
}

.calendar__slot--selected {
  background-color: #97e2f8cc !important;
  color: #091a4f !important;
  border-color: #97e2f8cc !important;
  font-weight: bold !important;
}

.calendar__slots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1rem 0;
}

.calendar__timezone {
  font-size: 0.875rem;
  color: #555;
  text-align: center;
}

.calendar__actions {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.calendar__button--primary {
  background-color: #97e2f8cc !important;
  color: #091a4f !important;
  border-radius: 0.5rem !important;
  margin-top: 0.3rem !important;
  padding: 0.5rem 1rem !important;
  border: none !important;
  cursor: pointer !important;
  font-size: 0.85rem !important;
  font-weight: bold !important;
}

.calendar__button--primary:hover {
  background-color: #e7f9fd !important;
  color: #15435a !important;
  border: 1px solid #15435a !important;
}

.calendar__button--primary:disabled {
  background-color: #ccc !important;
  color: #666 !important;
  cursor: not-allowed;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
}

.calendar__day--disabled {
  background-color: #f0f0f0;
  color: #999;
  border-color: #ddd;
  cursor: not-allowed;
  pointer-events: none;
}

.calendar__day--disabled .calendar__day__slots-count {
  color: #bbb;
}

.no-availability-message {
  text-align: left;
  margin-top: 1rem;
}

.no-availability-message p {
  font-size: 1rem;
  color: #555;
  margin-bottom: 1rem;
}

.no-availability-message button {
  font-size: 1rem;
  padding: 0.5rem 1.5rem;
}

/* Skeleton */
.skeleton {
  width: 100%;
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.skeleton__header,
.skeleton__carousel {
  display: flex;
  gap: 1rem;
}

.skeleton__slots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.skeleton__title {
  height: 20px;
  width: 80%;
  background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
  background-size: 200% 100%;
  border-radius: 4px;
  animation: loading 1.5s infinite;
}

.skeleton__day {
  height: 70px;
  width: 100%;
  background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
  background-size: 200% 100%;
  border-radius: 4px;
  animation: loading 1.5s infinite;
}

.skeleton__slot {
  height: 30px;
  width: 100%;
  background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
  background-size: 200% 100%;
  border-radius: 4px;
  animation: loading 1.5s infinite;
}

/* Error 500 */
.error.error--500 {
  background-color: #E9EFF1;
  color: #F5F3EF;
  border: 0px;
  padding: 20px;
  border-radius: 4px;
  text-align: center;
  margin: 20px auto;
  max-width: 600px;
  box-sizing: border-box;
}

.error.error--500 h2 {
  margin-top: 0;
  font-size: 1.5rem;
}

.error.error--500 p {
  font-size: 1rem;
  margin: 15px 0;
  color: #999;
}

.error.error--500 button {
  background-color: #842029;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.error.error--500 button:hover {
  background-color: #6d1b24;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@media (max-width: 780px) { 
  .calendar__carousel-wrapper {
    width: clamp(20rem, 80vw, 100vw);
    overflow-x: auto;
  }

  .calendar__days {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.3rem;
    padding: 0.3rem;
    -webkit-overflow-scrolling: touch;
  }

  .calendar__day {
    flex: 0 0 auto;
    padding: 0.05rem 0.5rem;
    scroll-snap-align: start;
  }

  .calendar__day__date {
    font-size: 1.3rem;
  }

  .calendar__day__weekday {
    font-size: 0.85rem;
    font-weight: bold;
  }

  .calendar__slots {
    width: 100%;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    padding: 1rem 0;
    box-sizing: border-box;
  }

  .calendar__button--prev,
  .calendar__button--next {
    padding: 0.2rem;
  }

  .calendar__title {
    align-items: flex-start;
    font-size: 1.5rem;
    color: #091a4f;
  }

  .error.error--500 {
    padding: 15px;
    margin: 15px;
    max-width: 100%;
  }
  
  .error.error--500 h2 {
    font-size: 1.3rem;
  }
  
  .error.error--500 p {
    font-size: 0.9rem;
  }
  
  .error.error--500 button {
    padding: 8px 16px;
    font-size: 0.9rem;
  }
}


