/* Calendar container */
#custom-calendar {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  align-items: flex-start;
  border: 1px solid #ddd;
  border-radius: 0.5rem;
}

/* Each month */
.calendar-month {
  border-radius: 8px;
  padding: 10px;
  flex: 1 1 calc(50% - 10px);
  max-width: 400px;
  min-width: 280px;
  box-sizing: border-box;
}

/* Month header with nav buttons aligned */
.calendar-month-header {
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  margin-bottom: 2rem;
}

/* pre next */
.calendar-month-header {
    .prev, .next {
    position: absolute;
    }

    .prev {
        left: 0;
    }

        .next {
        right: 0;
    }

    .prev:hover,
    .prev:focus,
    .next:hover,
    .next:focus {
        background-color: transparent;
        outline: none; /* optional: remove focus outline */
    }

}

.calendar-start > .calendar-month-header .prev {
    display: none;
}

.calendar-end > .calendar-month-header .next {
    display: none;
}


/* Titles */
.calendar-title-left,
.calendar-title-right {
  text-align: center;
  flex: 1;
}



/* Grid */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

/* Weekdays */
.weekday {
  font-weight: bold;
  text-align: center;
  padding: 5px 0;
}

/* Empty slots */
.empty {
  background: transparent;
}

/* Days */
.day {
  text-align: center;
  padding: 10px 0;
  cursor: pointer;
  border-radius: 4px;
  position: relative;
  user-select: none;
  transition: background 0.2s;
  color: #4A4A4A;
}

/* Past days */
.day.past {
  color: #ccc;
  cursor: not-allowed;
}

/* Booked days */
.day.booked {
  background-color: rgba(122, 122, 122,0.58);
  color: #fff;
  cursor: not-allowed;
  position: relative;
}

/* Arrival / Departure days (half diagonal) */
.day.arrival-day {
  background: linear-gradient(to left top, rgba(122, 122, 122,0.7) 0%, rgba(122, 122, 122,0.7) 50%, #fff 50%, #fff 100%);
  color: #fff;
  border-radius: 4px 0 0 0;
}

.day.departure-day {
  background: linear-gradient(to right bottom, rgba(122, 122, 122,0.7) 0%, rgba(122, 122, 122,0.7) 50%, #fff 50%, #fff 100%);
  color: #fff;
  border-radius: 0 0 4px 0;
}

.day.arrival-day.selected-range, .day.arrival-day.selected-start {
    background: linear-gradient(to right bottom, #61CE70 0%, #61CE70 50%, #fff 50%);
    color: #4A4A4A;
}

.day.departure-day.selected-range, .day.departure-day.selected-start {
    background: linear-gradient(to left top, #61CE70 0%, #61CE70 50%, #fff 50%);
    color: #4A4A4A;
}

.day.selected-start {
  background-color: #61CE70;
}

/* Hover available */
.day:not(.booked):not(.past):hover {
  background-color: #B5D5D0;
}

/* Selected range */
.day.selected-range {
  background-color: #61CE70;
}



/* Navigation buttons */
.calendar-month-header .nav {
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.calendar-month-header .nav img {
  display: block;
  width: 24px;
  height: 24px;
}

/* Responsive: 1 month per row on mobile */
@media (max-width: 767px) {
  .booking-calendar {
    min-height: 410px;
    padding-bottom: 2rem;
    }
  #custom-calendar {
    
    flex-direction: column;
    gap: 10px;
    align-items: center;
    
  }
  .calendar-month {
    width: 100%;
  }
}
