/****************
* POPUP STYLES
*
****************/

  .bookingx-modal {
      display: none;
      position: fixed;
      z-index: 9999;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      overflow: auto;
      background-color: rgba(0, 0, 0, 0.5); /* Overlay */
      opacity: 0; /* Initially invisible for smooth fade */
      transition: opacity 0.3s ease-in-out; /* Smooth overlay fade */
  }

  .bookingx-modal.open {
      opacity: 1; /* Fade in overlay + content */
  }

  .bookingx-modal-content {
      position: fixed;
      right: 24px; /* Always in position with right gap */
      top: 24px; /* 24px top gap */
      width: 450px; /* Fixed width for panel */
      height: calc(100vh - 48px); /* Height minus top+bottom gaps */
      background-color: #fff;
      box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1); /* Shadow on left side */
      transform: scale(0.95); /* Subtle scale for smooth entry */
      transition: transform 0.3s ease-in-out; /* Smooth scale (overlay handles opacity) */
      z-index: 1001;
  }

  .bookingx-modal.open .bookingx-modal-content {
      transform: scale(1); /* Scale to full */
  }

  .bookingx-close {
    position: absolute;
    top: 15px;
    left: 15px;
    color: #161616;
    font-size: 28px;
    font-weight: 500;
    cursor: pointer;
    line-height: 1;
    padding: 0 10px;
    z-index: 1002;
  }

  .bookingx-close:hover,
  .bookingx-close:focus {
      color: #000;
      text-decoration: none;
  }

  .bookingx-modal-header {
      padding: 10px 20px 20px 10px; /* Adjusted top padding for close icon and gap */
      /* border-bottom: 1px solid #eee; */
  }

  .bookingx-modal-title {
      margin: 0;
      font-size: 1.5em;
      color: #333;
  }

  .bookingx-modal-body {
    padding: 3px;
    padding-bottom: 0px;
    height: calc(100% - 100px); /* Adjust for header and padding */
    overflow-y: auto;
  }

  /* Trigger Button */
  .bookingx-open-modal-btn {
      background-color: #28a745;
      color: white;
      padding: 12px 24px;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      font-size: 16px;
  }

  .bookingx-open-modal-btn:hover {
      background-color: #218838;
  }

  /* Responsive: On small screens, adjust width and gaps */
  @media (max-width: 480px) {
      .bookingx-modal-content {
          width: calc(100% - 48px); /* Full width minus gaps */
          top: 12px; /* Smaller top gap on mobile */
          height: calc(100vh - 24px); /* Adjust height */
          right: 24px; /* Keep right gap */
      }
  }

/* Basic container styling to mimic popup card inline */
.bookingx-container {
  --bx-radius: 14px;
  --bx-border: rgba(0,0,0,0.08);
  --bx-muted: #6b7280;
  --bx-text: #111827;
  --bx-bg: #ffffff;
  --bx-accent: #111827;
  display: block;
}

.bx-card {
  /* background: var(--bx-bg);
  border: 1px solid var(--bx-border);
  border-radius: var(--bx-radius);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15); */
  max-width: 100%;
  margin: 0 auto;
  padding: 24px;
}

.bx-header { margin-bottom: 18px; }
.bx-step {
  font-size: 14px;
  color: var(--bx-muted);
}
.bx-title {
  margin: 8px 0 0;
  font-size: 22px;
  color: #161616;
}

.bx-section { margin-top: 18px; }
.bx-section-title {
  font-weight: 600;
  margin-bottom: 14px;
  font-size: 15px;
  color: #161616;
}
/* Row layout with right-side button */
.bx-row { display: flex; align-items: center; justify-content: space-between; }
.bx-date-toggle {
  border: 2px solid #161616; /* navy */
  color: #161616;
  background: #f8fafc;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
}
.bx-date-toggle[aria-expanded="true"] { box-shadow: 0 0 0 3px rgba(30,58,138,0.15); }
.bx-hidden { display: none !important; }

/* Divider */
.bx-divider { height: 1px; background: #e5e7eb; margin: 16px 0; }

/* Select button */
.bx-select-btn {
  border: 1px solid #d1d5db;
  background: #ffffff;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 600;
}

#bx-calendar{
  margin-top: 15px;
}

/* Flatpickr overrides to match design */
#bx-calendar .flatpickr-calendar {
  box-shadow: none;
  border: none;
}
#bx-calendar .flatpickr-months .flatpickr-month {
  height: auto;
}
#bx-calendar .flatpickr-months .flatpickr-month .cur-month {
  font-size: 22px;
  font-weight: 700;
}
#bx-calendar .flatpickr-months .flatpickr-month .numInputWrapper input {
  font-size: 22px;
}
#bx-calendar .flatpickr-weekdays { margin-top: 8px; }
#bx-calendar .flatpickr-day {
  width: 100%;
  height: 48px;
  line-height: 48px;
  border-radius: 8px;
  color: #161616;
}
#bx-calendar .flatpickr-day.today { font-weight: 600; }
#bx-calendar .flatpickr-day.selected { position: relative; }
#bx-calendar .flatpickr-day.selected::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--bx-text);
}

/* Guests slider */
.bx-guest-slider { position: relative; padding: 18px 8px; }
.bx-track { position: relative; width: 100%; height: 2px; background: #161616; border-radius: 999px; }
.bx-bubble {
  position: absolute;
  top: -16px;
  left: 0;
  transform: translateX(-50%);
  min-width: 48px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  border: 1px solid #161616;
  border-radius: 999px;
  background: #ffffff;
  font-weight: 400;
  cursor: grab;
  font-size: 15px;
}
.bx-bubble.dragging { cursor: grabbing; }

.bx-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 120px;
  position: sticky;
  bottom: 0;
  background: var(--bx-bg);
  z-index: 1000;
  border-top: 1px solid var(--bx-border);
  padding: 12px 0; /* ensure comfortable touch area when stuck */
}
.bx-price {
  padding: 10px 12px;
  padding-left: 0px;
}
.bx-amount { font-size: 15px; font-weight: 800; color: #161616 }
.bx-duration { 
  font-size: 15px;
  color: #161616;
}
.bx-caret { font-size: 15px; color: #161616; }

.bx-continue {
  flex: 0 0 260px;
  background: #9ca3af;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 14px 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.bx-continue[disabled] { opacity: 0.9; }

/* Duration button group */
.bx-duration-group {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  max-width: 100%;
  scroll-behavior: smooth;
}

.bx-duration-controls { display: flex; gap: 8px; align-items: center; }
.bx-duration-prev,
.bx-duration-next {
  appearance: none;
  border: 1px solid #161616;
  background: transparent;
  color: #161616;
  border-radius: 6px;
  padding: 6px 10px;
  font-weight: 600;
  cursor: pointer;
}
.bx-duration-prev:hover,
.bx-duration-next:hover { background-color: #161616; color: #fff; }
.bx-duration-btn {
  appearance: none;
  border: 1px solid #d1d5db;
  background: #ffffff;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 600;
}
.bx-duration-btn.active {
  border-color: #2f6fed;
  box-shadow: 0 0 0 2px rgba(47,111,237,0.15);
}

/* Dates range and controls */
.bx-row-right { display: flex; gap: 12px; align-items: center; margin-left: auto; }
.bx-date-range { font-size: 14px; }
.bx-days-pill {
  display: inline-flex;
  border: 1px solid #161616;
  border-radius: 8px;
  overflow: hidden;
}
.bx-days-pill button {
  appearance: none;
  background: #fff;
  border: none;
  color: #2f6fed;
  width: 34px;
  height: 30px;
  cursor: pointer;
  font-size: 18px;
  line-height: 15px;
  padding: 0px !important;
}
.bx-days-pill button:active { background: rgba(47,111,237,0.06); }

/* Time section */
.bx-time-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bx-time {
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  user-select: none;
  background: #fff;
}
.bx-time:hover { border-color: #161616; }

/* Responsive tweaks */
@media (max-width: 760px) {
  .bx-card { padding: 18px; }
  .bx-continue { flex: 1; }
}

.flatpickr-calendar.inline{
  width: 100%;
  box-shadow: none;
  --webkit-box-shadow: none;
}

.flatpickr-rContainer{
  width: 100%;
}

.dayContainer{
  width: 100%;
  min-width: 100%;
  max-width: 100%;
}

.flatpickr-days{
  width: 100% !important;
}

.dayContainer {
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
}

.bx-section .bx-date-toggle,
.bx-section .bx-select-btn,
.bx-duration-section .bx-duration-group button{
  color: #161616;
  font-size: 12px;
  border: 1px solid #161616;
  box-shadow: none;
  background-color: transparent;
  border-radius: 6px;
}

.bx-duration-section .bx-duration-group button:hover, 
.bx-duration-section .bx-duration-group button:active,
.bx-duration-section .bx-duration-group button:focus{
  background-color: #161616 !important;
  color: #fff !important;
}

.bx-time-grid button{
  color: #161616 !important;
  font-size: 12px !important;
  border: 1px solid #e0e0e0;
  box-shadow: none !important;
  background-color: transparent !important;
  border-radius: 6px !important;
}

.active{
  background-color: #161616 !important;
  color: #fff !important;
}

.active-time{
  border-color: #161616 !important;
}

span.flatpickr-weekday{
  color: #161616 !important;
}

.flatpickr-months .flatpickr-month{
  width: 100% !important;
}
.flatpickr-current-month{
  left: 0% !important;
  width: 100% !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months{
	font-weight: 600 !important;
}

.bx-duration-prev, .bx-duration-next{
  background-color: transparent !important;
  color: #161616 !important;
  border-color: #161616 !important;
  border-radius: 6px !important;
  padding: 6px 14px !important;
}

.bx-days-pill button{
  color: #161616;
  background-color: transparent !important;
  color: #161616 !important;
  border-color: #161616 !important;
}