[x-cloak] {
  display: none !important;
}
.calendar-container {
  max-width: 800px;
  margin: 0 auto;
}
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #f3f3f3; /* Light grey */
  border-top: 5px solid #3498db; /* Blue */
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.calendar-header h4 {
  flex: 1;
  margin-bottom: 0;
}
.month-nav {
  cursor: pointer;
  padding: 8px;
  color: #f6a100;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
}
.month-nav:hover {
  color: #7db921; /* Using the green hover color from your main styles */
}
.calendars-wrapper {
  position: relative;
  display: flex;
  gap: 20px;
}
.calendar {
  flex: 1;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  position: relative;
  transition: opacity 0.2s ease;
}
.calendar-grid.loading {
  opacity: 0.6;
}
.day-header {
  text-align: center;
  font-weight: bold;
  padding: 10px 0;
}
.day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  background-color: #d9fce2;
  color: #2d3e52;
  font-weight: 600;
  border: 1px solid #e9ecef;
  border-radius: 2px;
}
.day:hover:not(.disabled):not(.reserved):not(.start-date):not(.end-date):not(
    .in-range
  ):not(.hover-range) {
  background-color: #e6f2ff;
}
.day.disabled {
  color: #838383;
  background-color: white;
  cursor: pointer;
  font-weight: 400;
}
.day.disabled-end-date {
  opacity: 0.5;
  cursor: not-allowed;
}
.day.selected,
.day.in-range,
.day.hover-range {
  background-color: #01b7f2;
  color: white;
}
.day.hover-range-minimum-stay {
  background-color: #5594d8;
  color: white;
  opacity: 0.7;
}
.day.reserved {
  background-color: #faf6f2; /* Light gray background */
  color: #6c757d; /* Darker gray text */
  cursor: not-allowed;
  pointer-events: none;
}
.day.reserved:after {
  content: '';
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background: linear-gradient(
    to bottom left,
    transparent calc(50% - 1px),
    rgb(247, 93, 93),
    transparent calc(50% + 1px)
  );
}
.day.option {
  background-color: #fbedc0;
  color: #2d3e52;
  position: relative;
}
.day.option::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  border-style: solid;
  border-width: 0 8px 8px 0;
  border-color: transparent #f6a100 transparent transparent;
}
.day.option:hover:not(.disabled):not(.reserved):not(.start-date):not(
    .end-date
  ):not(.in-range):not(.hover-range) {
  background-color: #e6f2ff;
}
.day.option.selected,
.day.option.in-range,
.day.option.hover-range {
  background-color: #01b7f2;
  color: white;
}
.day.option.start-date,
.day.option.end-date {
  background-color: white;
  color: #a3fc71;
}
.day.option.start-date::before,
.day.option.start-date::after,
.day.option.end-date::before,
.day.option.end-date::after {
  background-color: #01b7f2;
}
.day.start-date {
  background-color: white;
  color: #a3fc71;
  border-left-style: none;
}
.day.start-date::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background-color: #01b7f2;
  border-top-left-radius: 50%;
  border-bottom-left-radius: 50%;
}
.day.start-date::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background-color: #01b7f2;
}
.day.end-date {
  position: relative;
  background-color: white !important;
  color: #a3fc71 !important;
  overflow: hidden;
  border-right-style: none;
}
.day.end-date::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 51%;
  height: 100%;
  background-color: #01b7f2;
}
.day.end-date::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background-color: #01b7f2;
  border-top-right-radius: 50%;
  border-bottom-right-radius: 50%;
}
.day.end-date span {
  position: relative;
  z-index: 2;
}
.day.in-range,
.day.hover-range {
  border-radius: 0;
}
.day.minimum-stay {
  position: relative;
}
.day.minimum-stay::before {
  content: '';
  position: absolute;
  bottom: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background-color: #01b7f2;
  border-radius: 50%;
  z-index: 2;
}
.day.selected.minimum-stay::before,
.day.in-range.minimum-stay::before,
.day.hover-range.minimum-stay::before {
  background-color: white;
}
.day > span {
  position: relative;
  z-index: 1;
}
.day.other-month {
  visibility: hidden;
}
.selected-range {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  margin-top: 20px;
}
.stay-dates {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.date-block {
  flex: 1;
  text-align: center;
}
.date-label {
  display: block;
  font-size: 14px;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
}
.date {
  display: block;
  font-size: 18px;
  font-weight: bold;
  color: #495057;
}
.date-separator {
  padding: 0 15px;
  color: #6c757d;
}
.stay-duration {
  text-align: center;
  color: #6c757d;
  font-size: 14px;
  margin-top: 10px;
}
@media (max-width: 768px) {
  .calendars-wrapper {
    flex-direction: column;
  }
}
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.calendar-header h4 {
  flex: 1;
  margin-bottom: 0;
}
.calendar-legend {
  font-size: 15px;
  padding: 15px;
  background: #fff;
  border-radius: 4px;
  text-align: center; /* Center all content */
}
.calendar-legend h5 {
  color: #2d3e52;
  font-weight: 600;
  margin-bottom: 15px;
  text-align: center; /* Ensure header is centered */
}
.calendar-legend h5 a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex; /* Changed from flex to inline-flex */
  align-items: center;
  gap: 8px; /* Space between text and icon */
  justify-content: center; /* Center icon with text */
}
.calendar-legend ul {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin: 0;
  padding: 0;
  justify-content: center;
}
.calendar-legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 0;
  white-space: nowrap;
}
.legend-item {
  display: inline-block;
  width: 24px;
  height: 24px;
  margin-right: 8px;
  border: 1px solid #e9ecef;
  border-radius: 2px;
}
.legend-item.available {
  background-color: #d9fce2;
}
.legend-item.reserved {
  background-color: #faf6f2; /* Light gray background */
  color: #6c757d; /* Darker gray text */
  cursor: not-allowed;
  pointer-events: none;
  position: relative;
}
.legend-item.reserved::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -1px;
  right: -1px;
  border-top: 1px solid rgb(247, 93, 93);
  transform: rotate(45deg);
}
.legend-item.option {
  background-color: #fff3cd;
  position: relative;
}
.legend-item.option::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  border-style: solid;
  border-width: 0 8px 8px 0;
  border-color: transparent #f6a100 transparent transparent;
}
.legend-item.selected {
  background-color: #01b7f2;
}
.legend-item.disabled {
  background-color: #f8f9fa;
  position: relative;
}
.legend-item.disabled::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -1px;
  right: -1px;
  border-top: 1px solid #838383;
  transform: rotate(-45deg);
}
.tooltip {
  position: absolute;
  background-color: #333;
  color: #fff;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  z-index: 1000;
  pointer-events: none;
}

.tooltip.visible {
  opacity: 1;
}

/* Add media query for smaller screens */
@media (max-width: 1198px) {
  .calendars-wrapper {
    flex-direction: column;
  }

  .calendar {
    width: 100%;
  }

  /* Optionally reduce some spacing */
  .calendars-wrapper {
    gap: 10px;
  }

  /* Ensure calendar grid stays properly sized */
  .calendar-grid {
    min-height: 250px; /* Can be adjusted if needed */
  }
}
#selected-range,
#selected-range-alt {
  transition: display 0.3s ease-in-out;
}

.transition {
  transition-property: opacity, transform;
}

.validation-messages {
  position: relative;
  margin-bottom: 1rem;
}

.search-button .loading-spinner {
  display: inline-block;
  width: 16px;
  height:  16px;
  margin-right: 8px;
  border: 2px solid #fff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.3s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.day.hover-range.minimum-stay::before {
  background-color: white;
}

/**
 * Calendar Styles
 * @updated 2025-06-14 - Enhanced special offer day visuals (triangle, added text).
 */

/* Special offer day styling - only modify background */
.day.special-offer {
  background-color: #67f78cb8;
  position: relative;
}

/* Add down arrow indicator in top left - made slightly larger and different orange */
.day.special-offer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  border-style: solid;
  border-width: 10px 10px 0 0; /* Increased size */
  border-color: #e67e22 transparent transparent transparent; /* Deeper orange */
}

/* Style for the "OFFER" text inside special offer days */
.day .offer-text {
    position: absolute;
    bottom: 2px; /* Position at the bottom */
    left: 50%;
    transform: translateX(-50%);
    font-size: 8px;
    font-weight: bold;
    color: #e67e22; /* Deeper orange, matches triangle */
    padding: 0px 2px;
    line-height: 1.2;
    text-transform: uppercase;
    z-index: 1;
    /* Example: Add a subtle background for readability if needed */
    /* background-color: rgba(255, 255, 255, 0.75); */
    /* border-radius: 2px; */
}

/* CSS rules for disabled special-offer dates */
/* Override special-offer background for disabled dates to maintain disabled appearance */
.day.disabled.special-offer {
    background-color: white; /* Keep disabled white background */
    color: #838383; /* Keep disabled gray text */
}

/* Muted orange triangle indicator for disabled special-offer dates */
.day.disabled.special-offer::before {
    border-color: rgba(230, 126, 34, 0.4) transparent transparent transparent; /* Muted orange */
}

/* Muted "Sale" text for disabled special-offer dates */
.day.disabled .offer-text {
    color: rgba(230, 126, 34, 0.4); /* Muted orange */
}

/* Legend item for special offer */
.legend-item.special-offer {
  background-color: #67f78cb8;
  position: relative;
}

/* Add down arrow indicator to legend item as well */
.legend-item.special-offer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  border-style: solid;
  border-width: 8px 8px 0 0;
  border-color: #f6a100 transparent transparent transparent;
}

.day > span {
  position: relative;
  z-index: 1;
}
