.checkin-calendar-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  font-family: Arial, sans-serif;
}

.checkin-calendar-wrapper {
}

#checkin-calendar {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.month-container {
  flex: 1;
}

.month-title {
  font-family: Poppins;
  font-weight: 600;
  font-size: 15px;
  line-height: 120%;
  color: #3600ce;
  text-transform: uppercase;
  margin-bottom: 1em;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px 0px;
}
/* Fix for the rounded corners */
.calendar-day,
.calendar-grid > div:empty {
  border-radius: 0; /* Reset all border radius first */
}

/* Apply left rounded corners to first visible day in each row */
.calendar-day:not(:empty):nth-child(7n + 1),
.calendar-grid > div:empty:nth-child(7n + 1) + .calendar-day:not(:empty) {
  border-top-left-radius: 26px;
  border-bottom-left-radius: 26px;
}

/* Apply right rounded corners to last visible day in each row */
.calendar-day:not(:empty):nth-child(7n),
.calendar-day:not(:empty):nth-child(7n-1):last-child,
.calendar-day:not(:empty):nth-child(7n-2):last-child,
.calendar-day:not(:empty):nth-child(7n-3):last-child,
.calendar-day:not(:empty):nth-child(7n-4):last-child,
.calendar-day:not(:empty):nth-child(7n-5):last-child,
.calendar-day:not(:empty):nth-child(7n-6):last-child {
  border-top-right-radius: 26px;
  border-bottom-right-radius: 26px;
}

.weekday-header {
  font-family: Poppins;
  font-weight: 600;
  font-size: 12px;
  line-height: 18px;
  letter-spacing: 0px;
  text-align: center;
  color: #000;
}

.calendar-day {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  cursor: pointer;
  border-radius: 0;
  transition: background-color 0.2s;
  position: relative;
  font-family: Poppins;
  font-weight: 400;
  font-size: 12px;
  line-height: 18px;
  letter-spacing: 0px;
  text-align: center;
  color: #000;
  aspect-ratio: 1 / 1;
}

.calendar-day:hover:not(.disabled) {
  color: #fff;
}

.calendar-day.disabled {
  color: #ccc;
  cursor: not-allowed;
  background-color: hsl(0, 0%, 98%);
}
#calendar-submit.disabled {
  background: #bfbfbf;
  border-color: #bfbfbf;
}

.in-range {
  background-color: #e6e6ff;
}

.selected-checkin,
.selected-checkout {
  background-color: #e6e6ff;
}
.selected-checkin {
  border-top-left-radius: 26px;
  border-bottom-left-radius: 26px;
}
.selected-checkout {
  border-top-right-radius: 26px;
  border-bottom-right-radius: 26px;
}
.selected-checkin span,
.selected-checkout span,
.calendar-day:hover:not(.disabled) span {
  color: #fff;
  z-index: 5;
}
.calendar-day:hover:not(.disabled)::after,
.selected-checkin::after,
.selected-checkout::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #3600ce;
  border-radius: 100%;
  z-index: 0;
}

.navigation {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #bfbfbf;
  margin-top: 0.5em;
  padding-top: 0.5em;
}

.nav-button {
  background: none;
  border: none;
  cursor: pointer;
}

.nav-button.prev {
  transform: rotate(180deg);
}

.checkin-calendar-details {
  margin-top: 20px;
  padding: 15px;
  background-color: #f5f5f5;
  border-radius: 4px;
}

.checkin-date-display,
.checkout-date-display,
.duration-display {
  margin-bottom: 10px;
}

.et_pb_text_inner.updated {
  color: #3600ce;
}

@media (max-width: 767px) {
  .checkin-calendar-wrapper {
    flex-direction: column;
  }

  .month-container {
    flex: 1 1 100%;
  }
}

/*-----------*/

/* Mobile scrolling calendar styles */
.calendar-scroll-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  /*overflow-y: auto;
  max-height: 500px; /* Adjust based on your needs */
  /*padding-right: 10px; /* Space for scrollbar */
  /*scrollbar-width: thin; /* For Firefox */
}

/* Customize scrollbar for webkit browsers */
.calendar-scroll-container::-webkit-scrollbar {
  width: 6px;
}

.calendar-scroll-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.calendar-scroll-container::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}

.calendar-scroll-container::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Spacing between months in mobile view */
.calendar-scroll-container .month-container {
  margin-bottom: 20px;
  width: 100%;
}

/* Make sure month containers take full width on mobile */
@media (max-width: 767px) {
  .month-container {
    width: 100%;
    flex: 1 1 100%;
  }

  /* Adjust header size for better mobile view */
  .month-title {
    font-size: 16px;
    padding: 10px 0;
    position: sticky;
    top: -18px;
    background-color: #fff;
    z-index: 10;
  }

  /* Make days more tappable on mobile */
  .calendar-day {
    padding: 12px 5px;
  }

  /* Hide navigation on mobile since we're using scroll */
  .navigation {
    display: none !important;
  }

  /* Ensure the calendar container is high enough to enable scrolling */
  #checkin-calendar {
    min-height: 350px;
  }

  /* Enhance the visual indication of the current selection */
  .selected-checkin,
  .selected-checkout {
    /*transform: scale(1.05);*/
    /*box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);*/
  }

  /* Improve the appearance of calendar grid on small screens */
  .calendar-grid {
    gap: 3px 0px;
  }
}

/* Desktop view tweaks */
@media (min-width: 768px) {
  #checkin-calendar {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
  }

  .month-container {
    flex: 1 1 calc(50% - 10px);
  }

  /* Show navigation on desktop */
  .navigation {
    display: flex !important;
  }
}
