/* Fix pressed & selected highlight (remove blue, apply gold) */
.ui-menu .ui-state-active,
.ui-menu .ui-state-focus {
  background-color: #C4A10E !important;
  color: white !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Datepicker: Remove blue outline and style background */
.ui-datepicker {
  background-color: #252525 !important;
  color: #fff !important;
  border: 1px solid #555 !important;
  z-index: 999999 !important;
  font-family: 'Titillium Web', sans-serif !important;
}

.ui-datepicker td a {
  background-color: #333 !important;
  color: #f1f1f1 !important;
  display: inline-block !important;
  width: 100% !important;
  height: 100% !important;
  padding: 6px 0 !important;
  text-align: center !important;
  border-radius: 2px !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Disabled dates */
.ui-datepicker-unselectable span {
  background-color: #333 !important;
  color: #6e6e6e !important;
  border-radius: 2px !important;
  display: inline-block !important;
  width: 100% !important;
  height: 100% !important;
  padding: 6px 0 !important;
  text-align: center !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Highlighted/selected state */
.ui-datepicker td a.ui-state-active,
.ui-datepicker td a.ui-state-highlight,
.ui-datepicker td a.ui-state-hover {
  background-color: #C4A10E !important;
  color: white !important;
  font-weight: bold !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Today */
.ui-datepicker td.ui-datepicker-today a {
  background-color: #977e29 !important;
  font-weight: bold !important;
  color: white !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Dropdown item hover */
.ui-menu .ui-menu-item-wrapper:hover {
  background-color: #C4A10E !important;
  color: white !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Match native select height and padding */
.ui-selectmenu-button.ui-button {
  height: 40px !important;
  padding: 0 12px !important;
  line-height: 40px !important;
  font-family: 'Titillium Web', sans-serif !important;
  font-size: inherit !important;
  border-radius: 4px !important;
  border: 1px solid var(--e-global-color-text) !important;
  background-color: white !important;
  color: gray !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  box-shadow: none !important;
  position: relative;
  text-align: left !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Hover and focus effect on dropdowns (match datepicker hover) */
.ui-selectmenu-button.ui-button:hover,
.ui-selectmenu-button.ui-button:focus {
  border: 2px solid #C4A10E !important;
  box-shadow: 0 0 5px rgba(196, 161, 14, 0.3) !important;
  outline: none !important;
  cursor: pointer !important;
  color: #000 !important;
}

/* Align text properly inside the button */
.ui-selectmenu-text {
  line-height: normal !important;
  font-family: 'Titillium Web', sans-serif !important;
  display: block !important;
  text-align: left !important;
  padding-right: 24px !important;
  width: 100% !important;
}

/* Sync dropdown arrow icon — scoped to booking bar only to avoid conflicts */
.jannah-booking-bar .ui-selectmenu-button::after {
  content: "";
  display: block;
  width: 12px;
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%23808080' d='M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

/* Remove original jQuery UI triangle icon — high specificity to beat theme overrides */
.jannah-booking-bar .ui-selectmenu-button .ui-icon,
.jannah-booking-bar .ui-selectmenu-button span.ui-icon,
.ui-selectmenu-button .ui-selectmenu-icon,
.ui-selectmenu-button span.ui-selectmenu-icon {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* Remove extra gaps between dropdown options */
.ui-menu .ui-menu-item {
  margin: 0 !important;
  padding: 0 !important;
  border-bottom: 1px solid #ebebeb !important;
}
.ui-menu .ui-menu-item:last-child {
  border-bottom: none !important;
}
.ui-menu .ui-menu-item-wrapper {
  padding: 8px 12px !important;
  font-family: 'Titillium Web', sans-serif !important;
  font-size: inherit !important;
  display: flex !important;
  align-items: center !important;
  box-shadow: none !important;
}

/* Adjust dropdown menu style */
.ui-menu {
  border-radius: 4px !important;
  padding: 0 !important;
  background-color: #fff !important;
  border: 1px solid #ccc !important;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1) !important;
  z-index: 999999 !important;
  font-family: 'Titillium Web', sans-serif !important;
}

/* Ensure selectmenu open widget clears popup z-index */
.ui-selectmenu-menu {
  z-index: 999999 !important;
}
.ui-selectmenu-open {
  z-index: 999999 !important;
}

/* Hover effects for booking bar inputs and selects */
.jannah-booking-bar input:hover,
.jannah-booking-bar select:hover,
.jannah-booking-bar input:focus,
.jannah-booking-bar select:focus {
  border: 2px solid #C4A10E !important;
  box-shadow: 0 0 5px rgba(196, 161, 14, 0.3);
  outline: none;
  cursor: pointer;
  color: #000;
}

.jannah-booking-bar select:focus {
  box-shadow: 0 0 5px rgba(196, 161, 14, 0.4);
}

.jannah-booking-bar input,
.jannah-booking-bar select {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Force all inputs, selects, datepickers, buttons to inherit Elementor's font and color */
input,
select,
textarea {
  font-family: inherit !important;
  color: gray !important;
}

input,
select,
textarea {
  border: 1px solid var(--e-global-color-text) !important;
  font-size: inherit !important;
  line-height: inherit !important;
}

/* Layout Styles */
.booking-form-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  max-width: 1140px;
  width: 100%;
  box-sizing: border-box;
  flex-wrap: wrap;
  margin: 0 auto;
  align-items: flex-end;
}
.booking-field {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
.booking-field label {
  font-size: 12px;
  margin-bottom: 4px;
  font-weight: 500;
  color: #bcbcbc
}
.booking-field input,
.booking-field select {
  height: 40px;
  padding: 0 12px;
  border: none;
  border-radius: 4px;
  width: 100%;
  box-sizing: border-box;
}

/* Fixed/readonly hotel name field */
.booking-field input.hotel-name-fixed {
  cursor: not-allowed !important;
}


/* Calendar icon on date inputs only */
.booking-checkin input[type="text"],
.booking-checkout input[type="text"] {
  padding-left: 38px;
  background: #fff url("https://jhr.artbits.site/wp-content/uploads/calendar-days.png") no-repeat 10px center;
  background-size: 15px;
}

/* Hotel icon on the readonly fixed-hotel text input */
.booking-hotel input[type="text"][readonly] {
  padding-left: 38px !important;
  background: #f5f5f5 url("https://jhr.artbits.site/wp-content/uploads/jhr.png") no-repeat 10px center !important;
  background-size: 18px !important;
}

/* Hotel icon on the jQuery UI selectmenu button (dropdown mode) */
.booking-hotel .ui-selectmenu-button.ui-button {
  background-color: #fff !important;
  background-image: url("https://jhr.artbits.site/wp-content/uploads/jhr.png") !important;
  background-repeat: no-repeat !important;
  background-position: 10px center !important;
  background-size: 18px !important;
}

/* Keep the selectmenu text indented to clear the hotel icon */
.booking-hotel .ui-selectmenu-text {
  padding-left: 26px !important;
}

/* Ensure only ONE arrow renders on the hotel dropdown button.
   Re-declare ::after here with higher specificity so no theme can add a second. */
.jannah-booking-bar .booking-hotel .ui-selectmenu-button::after,
.jannah-booking-bar .booking-hotel .ui-selectmenu-button.ui-button::after {
  content: "" !important;
  display: block !important;
  width: 12px !important;
  height: 12px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%23808080' d='M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-size: contain !important;
  position: absolute !important;
  right: 12px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  pointer-events: none !important;
  /* No background-color here — let the button's background image (hotel icon) show through */
}

.booking-hotel       { flex: 1 1 285px; max-width: 285px; }
.booking-checkin     { flex: 1 1 150px; min-width: 115px; align-self: stretch; }
.booking-checkout    { flex: 1 1 150px; min-width: 115px; align-self: stretch; }
.booking-subrow { flex: 1 1 180px; min-width: 110px;}
.booking-button-wrapper { flex: 1 1 180px; min-width: 120px; }

.booking-button-wrapper {
  display: flex;
  margin-top: 10px;
  align-items: flex-end;
}
.booking-button-wrapper button {
  font-family: 'Titillium Web', sans-serif !important;
  height: 40px;
  width: 100%;
  background-color: #caa938;
  color: white;
  font-size: 15px !important;
  border: none;
  border-radius: 4px;
  padding: 0 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.booking-button-wrapper button:hover {
  background-color: #977e29;
}
/* Base state for icons inside booking button */
.booking-button-wrapper button i {
  transition: transform 0.3s ease, color 0.3s ease;
}

/* Trigger the pulse animation on hover */
.booking-button-wrapper button:hover i {
  animation: pulseGlow 0.8s ease-in-out infinite;
  color: #fff;
}

/* Group adults & children */
.booking-subrow {
  display: flex;
  gap: 12px;
  width: 100%;
}
.booking-subrow .booking-field {
  flex: 1 1 50%;
  max-width: 50%;
}

/* Mobile styles */
@media (max-width: 768px) {
  .booking-form-row {
    flex-direction: row;
    align-items: stretch;
    gap: 12px;
  }
  .booking-field,
  .booking-button-wrapper {
    width: 100% !important;
    max-width: 100%;
    flex: 1 1 100% !important;
  }
  .booking-subrow {
    flex-direction: row;
    gap: 12px;
    width: 100%;
    margin-bottom: 10px;
  }
  .booking-subrow .booking-field {
    flex: 1 1 50%;
    max-width: 50%;
  }
  .booking-button-wrapper button {
    width: 100%;
  }
}

/* ── Custom inline calendar ─────────────────────────────────────────────── */
.jbb-cal {
  display: none;
  position: fixed;
  z-index: 999999;
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px;
  width: 260px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  font-family: 'Titillium Web', sans-serif;
  font-size: 13px;
  color: #333;
  box-sizing: border-box;
}
.jbb-cal.jbb-open {
  display: block;
}
.jbb-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 14px;
  color: #222;
}
.jbb-cal-prev, .jbb-cal-next {
  background: none;
  border: none;
  color: #C4A10E;
  font-size: 22px;
  cursor: pointer;
  padding: 0 6px;
  line-height: 1;
  height: auto !important;
  width: auto !important;
}
.jbb-cal-prev:hover, .jbb-cal-next:hover { color: #977e29; }
.jbb-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.jbb-cal-dow {
  text-align: center;
  font-size: 11px;
  color: #999;
  padding: 3px 0 5px;
  font-weight: 600;
}
.jbb-cal-cell {
  text-align: center;
  padding: 6px 2px;
  border-radius: 3px;
  cursor: pointer;
  color: #333;
  background: #f5f5f5;
  transition: background 0.15s;
  font-size: 12px;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}
.jbb-cal-cell:hover:not(.jbb-disabled):not(.jbb-blank) {
  background: #C4A10E !important;
  color: #fff !important;
}
.jbb-cal-cell.jbb-blank  { background: transparent !important; cursor: default; }
.jbb-cal-cell.jbb-disabled { color: #bbb !important; cursor: default; background: #efefef !important; }
.jbb-cal-cell.jbb-today  { background: #977e29 !important; color: #fff !important; font-weight: bold; }
.jbb-cal-cell.jbb-selected { background: #C4A10E !important; color: #fff !important; font-weight: bold; }
.jbb-cal-cell.jbb-inrange { background: rgba(196,161,14,0.15) !important; color: #333 !important; }
