/**
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License version 3.0
* that is bundled with this package in the file LICENSE.md
* It is also available through the world-wide-web at this URL:
* https://opensource.org/license/osl-3-0-php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to support@qloapps.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to a newer
* versions in the future. If you wish to customize this module for your needs
* please refer to https://store.webkul.com/customisation-guidelines for more information.
*
* @author Webkul IN
* @copyright Since 2010 Webkul
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
*/

.booking_occupancy_wrapper {
  border: none;
  max-height: min(560px, calc(100vh - 32px));
  overflow: auto;
  box-shadow: 0 8px 25px -4px rgba(0, 0, 0, 0.39);
  left: 0px;
  padding: 15px 20px;
  min-width: 280px;
}

.booking_occupancy_wrapper .occupancy_popup_total {
  display: flex;
  justify-content: end;
  align-items: baseline;
  margin-top: 12px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--vhp-gray-300);
  border-radius: 10px;
  background: var(--vhp-white);
}

.booking_occupancy_wrapper .occupancy_popup_total--clickable {
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.booking_occupancy_wrapper .occupancy_popup_total--clickable:hover,
.booking_occupancy_wrapper .occupancy_popup_total--clickable:focus {
  border-color: var(--vhp-color-primary);
  box-shadow: 0 0 0 3px var(--vhp-ring-color);
  outline: none;
}

.booking_occupancy_wrapper .occupancy_popup_total--clickable[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.72;
}

.booking_occupancy_wrapper .occupancy_popup_total--clickable[aria-disabled="true"]:hover,
.booking_occupancy_wrapper .occupancy_popup_total--clickable[aria-disabled="true"]:focus {
  border-color: var(--vhp-gray-300);
  box-shadow: none;
}

.booking_occupancy_wrapper .occupancy_popup_total_chevron {
  width: 9px;
  height: 9px;
  margin-left: 8px;
  border-right: 2px solid #8aa3bf;
  border-bottom: 2px solid #8aa3bf;
  transform: rotate(45deg) translateY(-2px);
  flex: 0 0 auto;
}

.booking_occupancy_wrapper
  .occupancy_popup_total--clickable[aria-expanded="true"]
  .occupancy_popup_total_chevron {
  transform: rotate(-135deg) translateY(2px);
}

.booking_occupancy_wrapper .occupancy_popup_total_label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--vhp-color-text-muted);
}

.booking_occupancy_wrapper .occupancy_popup_total_value {
  font-size: 24px;
  font-weight: 700;
  color: var(--vhp-color-primary-dark);
}

.booking_occupancy_wrapper .occupancy_popup_total_value_wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 154px;
  min-height: 40px;
}

.booking_occupancy_wrapper .occupancy_popup_total_skeleton {
  display: none;
  width: 154px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(
    90deg,
    rgba(232, 237, 245, 0.95) 0%,
    rgba(220, 228, 240, 0.95) 50%,
    rgba(232, 237, 245, 0.95) 100%
  );
  background-size: 200% 100%;
  animation: occupancy-total-skeleton-shimmer 1.1s linear infinite;
}

.booking_occupancy_wrapper.is-popup-total-loading .occupancy_popup_total_value {
  display: none;
}

.booking_occupancy_wrapper.is-popup-total-loading
  .occupancy_popup_total_skeleton {
  display: inline-block;
}

@keyframes occupancy-total-skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.booking_occupancy_wrapper.is-submitting::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.55);
  z-index: 9;
}

.booking_occupancy_wrapper.is-submitting .booking_occupancy_inner,
.booking_occupancy_wrapper.is-submitting .occupancy_block_actions,
.booking_occupancy_wrapper.is-submitting .add_new_occupancy_btn,
.booking_occupancy_wrapper.is-submitting .cancel_occupancy_btn {
  pointer-events: none;
}

.booking_occupancy_wrapper .btn {
  font-weight: 600;
}

.booking_occupancy_wrapper .btn-primary {
  background-color: var(--vhp-color-primary);
  color: var(--vhp-hotel-button-text);
}

.booking_occupancy_wrapper .occupancy-info-separator {
  margin-bottom: 15px;
  margin-top: 15px;
  margin-right: -20px;
  margin-left: -20px;
}

.booking_occupancy_wrapper .occupancy-input-errors {
  font-weight: 700;
}

.booking_occupancy_wrapper .occupancy_capacity_alert,
.booking_occupancy_wrapper .occupancy_inventory_alert {
  /* margin: 12px 18px 0; */
  font-size: 13px;
  line-height: 1.45;
}

.booking_occupancy_wrapper .occupancy_popup_total_invalid {
  color: #b45309;
  font-size: 13px;
  font-weight: 600;
}

.booking_occupancy_wrapper .occupancy_info_block.has-occupancy-error {
  border-color: rgba(220, 38, 38, 0.28);
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.08);
  background: linear-gradient(180deg, #fffefe 0%, #fff7f7 100%);
}

.booking_occupancy_wrapper
  .occupancy_info_block.has-occupancy-error
  .occupancy_info_head
  .room_num_wrapper::before {
  background: #dc2626;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.booking_occupancy_wrapper .occupancy_info_block .occupancy-input-errors {
  display: inline-flex;
  width: 100%;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(254, 242, 242, 0.96);
  border: 1px solid rgba(248, 113, 113, 0.32);
  color: #b91c1c;
  font-size: 12px;
  line-height: 1.45;
}

.booking_occupancy_wrapper .children_age_info_block {
  display: none;
}

.booking_occupancy_wrapper .children_age_info_block label {
  font-size: 12px;
  color: var(--vhp-color-text-muted);
}

.booking_occupancy_wrapper .children_age_info_block .children_ages {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  justify-content: space-between;
}

.booking_occupancy_wrapper .label-desc-txt {
  font-size: 12px;
  color: var(--vhp-color-text-muted);
}

.booking_occupancy_wrapper .occupancy_sheet_helper {
  margin: 10px 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: linear-gradient(
    180deg,
    rgba(248, 251, 255, 0.98) 0%,
    rgba(241, 247, 255, 0.98) 100%
  );
  border: 1px solid rgba(191, 219, 254, 0.9);
}

.booking_occupancy_wrapper .occupancy_sheet_helper p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--vhp-color-text-secondary);
}

.booking_occupancy_wrapper .occupancy_sheet_helper p + p {
  margin-top: 4px;
}

.booking_occupancy_wrapper label {
  font-size: 14px;
  color: var(--vhp-color-text);
  font-weight: 400;
}

.booking_occupancy_wrapper .add_new_occupancy_btn {
  font-weight: bold;
  text-decoration: none;
  font-size: 14px;
  color: var(--vhp-color-link);
}

.booking_occupancy_wrapper .occupancy_block_actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.booking_occupancy_wrapper .add_new_occupancy_btn:active,
.booking_occupancy_wrapper .add_new_occupancy_btn:focus,
.booking_occupancy_wrapper .add_new_occupancy_btn:hover {
  text-decoration: none;
  color: var(--vhp-color-link-hover);
}

.booking_occupancy_wrapper .add_new_occupancy_btn.disabled,
.booking_occupancy_wrapper .add_new_occupancy_btn.disabled:active,
.booking_occupancy_wrapper .add_new_occupancy_btn.disabled:focus,
.booking_occupancy_wrapper .add_new_occupancy_btn.disabled:hover {
  color: var(--vhp-color-text);
  opacity: 0.5;
  cursor: not-allowed;
}

.booking_occupancy_wrapper .occupancy_info_head {
  font-size: 14px;
  color: var(--vhp-color-text);
  font-weight: bold;
  margin-bottom: 10px;
}

.booking_occupancy_wrapper .occupancy_info_head .remove-room-link {
  font-size: 12px;
  color: var(--vhp-color-danger);
  text-align: right;
}

.booking_occupancy_wrapper .occupancy_info_block .occupancy_count {
  border: 2px solid var(--vhp-color-primary);
  background: var(--vhp-white);
  border-radius: 14px;
  width: var(--vhp-occ-value-width);
  min-width: var(--vhp-occ-value-width);
  height: var(--vhp-occ-height);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.qty_count {
  padding: 14px;
  border: 1px solid var(--vhp-gray-300);
  font-size: 14px;
  font-weight: 600;
  color: var(--vhp-color-text);
  text-align: center;
  border-radius: 4px;
}

.booking_occupancy_wrapper .occupancy_info_block .occupancy_stepper {
  --vhp-occ-btn-size: 48px;
  --vhp-occ-value-width: 56px;
  --vhp-occ-height: 48px;
  --vhp-occ-font-size: 28px;
  --vhp-occ-icon-size: 26px;
  --vhp-occ-overlap: 4px;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 0;
}

.booking_occupancy_wrapper .occupancy_info_block .occupancy_count_block {
  min-width: 0;
}

.booking_occupancy_wrapper .occupancy_info_block .occupancy_count_input {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  text-align: center;
  font-size: var(--vhp-occ-font-size);
  line-height: 1;
  font-weight: 500;
  color: #5f5f5f;
  padding: 0;
}

.booking_occupancy_wrapper .occupancy_info_block .occupancy_count_input:focus {
  outline: none;
}

.booking_occupancy_wrapper
  .occupancy_info_block
  .occupancy_count_input::-webkit-outer-spin-button,
.booking_occupancy_wrapper
  .occupancy_info_block
  .occupancy_count_input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.booking_occupancy_wrapper
  .occupancy_info_block
  .occupancy_count_input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.rm_qty_cont .qty_count,
.rm_qty_cont .qty_direction a {
  border: 1px solid var(--vhp-gray-500);
  box-shadow: 0 1px 0 0 rgb(0 0 0 / 13%);
}

.booking_occupancy_wrapper .occupancy_info_block .occupancy_count > span,
.qty_count > span {
  min-width: 21px;
  text-align: center;
  display: block;
}

.booking_occupancy_wrapper .occupancy_info_block .qty_direction {
  margin-left: 0 !important;
  width: auto !important;
  float: none !important;
  display: inline-flex !important;
  align-items: center;
}

.booking_occupancy_wrapper .occupancy_info_block .qty_direction a,
.booking_occupancy_wrapper .occupancy_info_block .occupancy_stepper > a {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: var(--vhp-occ-btn-size) !important;
  height: var(--vhp-occ-height) !important;
  padding: 0 !important;
  border: 1px solid #d7d7d7 !important;
  background: var(--vhp-color-primary) !important;
  color: var(--vhp-color-text) !important;
  border-radius: 12px !important;
  font-weight: 400 !important;
  float: none !important;
  margin: 0 !important;
  font-size: 30px !important;
  line-height: 1 !important;
}

.booking_occupancy_wrapper
  .occupancy_info_block
  .occupancy_stepper
  > a:first-child {
  margin-right: calc(var(--vhp-occ-overlap) * -1) !important;
  border-radius: 12px 10px 10px 12px !important;
}

.booking_occupancy_wrapper
  .occupancy_info_block
  .occupancy_stepper
  > a:last-child {
  margin-left: calc(var(--vhp-occ-overlap) * -1) !important;
  border-radius: 10px 12px 12px 10px !important;
}

.booking_occupancy_wrapper
  .occupancy_info_block
  .occupancy_stepper
  > a
  .icon-plus,
.booking_occupancy_wrapper
  .occupancy_info_block
  .occupancy_stepper
  > a
  .icon-minus {
  font-size: var(--vhp-occ-icon-size);
  line-height: 1;
  color: white;
}

.booking_occupancy_wrapper
  .occupancy_info_block
  .occupancy_stepper
  > a.disabled {
  opacity: 0.35;
  pointer-events: none;
  cursor: not-allowed;
  filter: grayscale(1);
}

.booking_occupancy_wrapper
  .occupancy_info_block
  .qty_direction
  .occupancy_quantity_down,
.booking_occupancy_wrapper .occupancy_info_block .qty_direction .quantity_down {
  margin-top: 0 !important;
}

.booking_occupancy_wrapper .children_ages .col-xs-4 {
  padding-left: 5px;
  margin-bottom: 5px;
  padding-right: 5px;
}

.booking_occupancy_wrapper .children_ages select {
  background-color: var(--vhp-white);
  height: 37px;
  border-radius: 4px;
  padding: 3px 5px;
  font-size: 12px;
  color: var(--vhp-color-text);
  border: 1px solid var(--vhp-gray-300);
  width: 100%;
}

.booking_occupancy_wrapper .children_ages select.error_border {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
  background: #fffafa;
}

@media (min-width: 992px) {
  .booking_occupancy_wrapper .occupancy_info_block .occupancy_stepper {
    --vhp-occ-btn-size: 44px;
    --vhp-occ-value-width: 52px;
    --vhp-occ-height: 44px;
    --vhp-occ-font-size: 26px;
    --vhp-occ-icon-size: 24px;
    --vhp-occ-overlap: 3px;
  }
}

@media (min-width: 1400px) {
  .booking_occupancy_wrapper .occupancy_info_block .occupancy_stepper {
    --vhp-occ-btn-size: 46px;
    --vhp-occ-value-width: 54px;
    --vhp-occ-height: 46px;
    --vhp-occ-font-size: 27px;
    --vhp-occ-icon-size: 25px;
  }
}

@media (max-width: 575px) {
  .booking_occupancy_wrapper .occupancy_info_block .occupancy_stepper {
    --vhp-occ-btn-size: 42px;
    --vhp-occ-value-width: 50px;
    --vhp-occ-height: 44px;
    --vhp-occ-font-size: 24px;
    --vhp-occ-icon-size: 22px;
    --vhp-occ-overlap: 3px;
  }
}

@media (max-width: 450px) {
  .booking_occupancy_wrapper .occupancy_info_block .occupancy_stepper {
    --vhp-occ-btn-size: 38px;
    --vhp-occ-value-width: 44px;
    --vhp-occ-height: 40px;
    --vhp-occ-font-size: 20px;
    --vhp-occ-icon-size: 20px;
    --vhp-occ-overlap: 3px;
  }
}

/* Occupancy dropdown visual refresh */
.booking_guest_occupancy_conatiner .dropdown {
  position: relative;
  z-index: 1;
}

.booking_guest_occupancy_conatiner .dropdown.open {
  z-index: 1200;
}

.booking_guest_occupancy_conatiner .dropdown.open .booking_occupancy_wrapper {
  margin-top: 8px;
  z-index: 1201;
}

.booking_occupancy_wrapper {
  position: absolute;
  z-index: 1201;
  background: var(--vhp-white);
  border: 1px solid var(--vhp-gray-200);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

.booking_occupancy_wrapper .booking_occupancy_inner {
  display: grid;
  gap: 12px;
}

.booking_occupancy_wrapper .occupancy_info_block {
  background: linear-gradient(
    180deg,
    var(--vhp-white) 0%,
    var(--vhp-blue-50) 100%
  );
  border: 1px solid var(--vhp-gray-200);
  border-radius: 12px;
  padding: 12px 12px 8px;
}

.booking_occupancy_wrapper .occupancy_info_block > .row {
  display: flex;
  flex-wrap: wrap;
}

@media (min-width: 992px) {
  .booking_occupancy_wrapper .occupancy_info_block > .row {
    display: flex;
    gap: 16px;
    align-items: flex-start;
  }

  .booking_occupancy_wrapper .occupancy_count_block {
    flex: 1;
    min-width: 0;
  }

  .booking_occupancy_wrapper .occupancy_count_block label {
    display: block;
    text-align: center;
    width: 100%;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
  }

  .booking_occupancy_wrapper .occupancy_count_block .occupancy_stepper {
    display: flex;
    justify-content: center;
  }

  .booking_occupancy_wrapper .occupancy_label_desc_wrap {
    text-align: center;
    margin-top: 4px;
  }
}

.booking_occupancy_wrapper .occupancy_info_head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.booking_occupancy_wrapper .occupancy_info_head .room_num_wrapper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--vhp-color-text);
}

.booking_occupancy_wrapper .occupancy_info_head .room_num_wrapper::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--vhp-color-primary);
  box-shadow: 0 0 0 4px var(--vhp-ring-color);
}

.booking_occupancy_wrapper .occupancy_info_head .remove-room-link {
  color: var(--vhp-color-danger);
  font-weight: 600;
}

.booking_occupancy_wrapper .occupancy_info_head .remove-room-link:hover,
.booking_occupancy_wrapper .occupancy_info_head .remove-room-link:focus {
  color: var(--vhp-red-700);
  text-decoration: none;
}

.booking_occupancy_wrapper .occupancy_info_block .occupancy_count {
  border-radius: 14px;
  border-color: var(--vhp-color-primary);
  background: var(--vhp-white);
}

.qty_count {
  border-radius: 8px;
  border-color: var(--vhp-gray-200);
  background: var(--vhp-white);
}

.booking_occupancy_wrapper .occupancy_info_block .qty_direction a,
.booking_occupancy_wrapper .occupancy_info_block .occupancy_stepper > a {
  border-color: var(--vhp-gray-200) !important;
  /* background: #e3e3e3 !important; */
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
  font-size: 14px !important;
}

.booking_occupancy_wrapper .occupancy_info_block .qty_direction a:hover,
.booking_occupancy_wrapper .occupancy_info_block .qty_direction a:focus,
.booking_occupancy_wrapper .occupancy_info_block .occupancy_stepper > a:hover,
.booking_occupancy_wrapper .occupancy_info_block .occupancy_stepper > a:focus {
  /* border-color: #c9c9c9 !important; */
  color: var(--vhp-hotel-button-text) !important;
  background: var(--vhp-color-primary-hover) !important;
}

.booking_occupancy_wrapper .children_ages select:focus {
  border-color: var(--vhp-color-primary);
  box-shadow: 0 0 0 3px var(--vhp-ring-color);
  outline: none;
}

.booking_occupancy_wrapper .occupancy_sticky_summary {
  position: sticky;
  bottom: -15px;
  z-index: 2;
  margin: 12px -20px -15px;
  padding: 1px 20px 12px;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--vhp-gray-200);
  backdrop-filter: blur(6px);
}

.booking_occupancy_wrapper .occupancy_sticky_summary .occupancy_popup_total {
  margin-top: 10px;
  margin-bottom: 10px;
}

.booking_occupancy_wrapper .occupancy_block_actions {
  position: static;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  backdrop-filter: none;
}

.booking_occupancy_wrapper .occupancy_popup_actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
}

.booking_occupancy_wrapper .occupancy_popup_actions .submit_occupancy_btn {
  flex: 1 1 0;
}

.booking_occupancy_wrapper .add_new_occupancy_btn {
  color: var(--vhp-color-link);
  font-weight: 700;
}

.booking_occupancy_wrapper .add_new_occupancy_btn .icon-plus {
  margin-right: 4px;
}

.booking_occupancy_wrapper .cancel_occupancy_btn {
  border-radius: 8px;
  border-color: var(--vhp-gray-200);
  color: var(--vhp-color-text);
}

.booking_occupancy_wrapper .submit_occupancy_btn {
  border-radius: 8px;
  padding-left: 14px;
  padding-right: 14px;
  box-shadow: 0 6px 14px var(--vhp-ring-color);
}

.booking_occupancy_wrapper .submit_occupancy_btn:hover,
.booking_occupancy_wrapper .submit_occupancy_btn:focus {
  box-shadow: 0 8px 18px var(--vhp-ring-color);
}

.booking_occupancy_wrapper .occupancy_select_btn {
  border: 1px solid var(--vhp-color-primary);
  background: var(--vhp-white);
  color: var(--vhp-color-primary);
  box-shadow: none;
}

.booking_occupancy_wrapper .occupancy_select_btn:hover,
.booking_occupancy_wrapper .occupancy_select_btn:focus {
  border-color: var(--vhp-color-primary-hover);
  background: rgba(232, 75, 60, 0.08);
  color: var(--vhp-color-primary-hover);
  box-shadow: none;
}

.occupancy_sheet_backdrop {
  display: none;
}

.booking_occupancy_wrapper .occupancy_sheet_header {
  display: block;
  position: sticky;
  top: -15px;
  z-index: 4;
  margin: -15px -20px 12px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--vhp-gray-200);
  backdrop-filter: blur(6px);
}

.booking_occupancy_wrapper .occupancy_sheet_handle {
  display: none;
}

.booking_occupancy_wrapper .occupancy_sheet_header_row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.booking_occupancy_wrapper .occupancy_sheet_close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--vhp-color-text);
  font-size: 24px;
  line-height: 1;
}

.booking_occupancy_wrapper .occupancy_sheet_close:hover,
.booking_occupancy_wrapper .occupancy_sheet_close:focus {
  background: var(--vhp-gray-100);
  outline: none;
}

.booking_occupancy_wrapper .occupancy_sheet_add_room {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--vhp-gray-200);
}

.booking_occupancy_wrapper.occupancy-sheet-portal.occupancy-popover-mode {
  display: block !important;
  z-index: calc(var(--vhp-z-max, 999999) + 2) !important;
}

body.vhp-rate-plan-occupancy-open .occupancy_sheet_backdrop.occupancy-sheet-portal {
  display: block !important;
  position: fixed;
  inset: 0;
  z-index: calc(var(--vhp-z-max, 999999) + 2) !important;
  background: rgba(15, 23, 42, 0.48);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.vhp-rate-plan-occupancy-open
  .booking_occupancy_wrapper.occupancy-sheet-portal.occupancy-detail-booking-mode {
  display: block !important;
  position: fixed !important;
  left: 50% !important;
  right: auto !important;
  top: 50% !important;
  bottom: auto !important;
  width: min(430px, calc(100vw - 28px)) !important;
  min-width: 0 !important;
  max-width: 430px !important;
  max-height: min(680px, calc(100vh - 32px)) !important;
  margin: 0 !important;
  padding: 15px 20px !important;
  overflow-y: auto;
  transform: translate(-50%, -50%) !important;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: calc(var(--vhp-z-max, 999999) + 3) !important;
}

.booking_occupancy_wrapper.occupancy-detail-booking-mode
  .occupancy_select_btn {
  display: none;
}

.booking_occupancy_wrapper.occupancy-detail-booking-mode
  .occupancy_book_now_btn {
  flex-basis: 100%;
}

@media (max-width: 1024px) {
  body.occupancy-sheet-open {
    overflow: hidden;
  }

  .booking_guest_occupancy_conatiner .dropdown .occupancy_sheet_backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: transparent;
    backdrop-filter: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity 0.22s ease,
      visibility 0.22s ease;
    z-index: 1290;
  }

  .booking_guest_occupancy_conatiner
    .dropdown
    .occupancy_sheet_backdrop.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .booking_guest_occupancy_conatiner .dropdown.open .occupancy_sheet_backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .booking_guest_occupancy_conatiner .dropdown .booking_occupancy_wrapper {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: 100vw;
    min-width: 0;
    max-width: 100vw;
    max-height: min(82vh, calc(100vh - 20px));
    margin: 0;
    border-radius: 16px 16px 0 0;
    border: 1px solid var(--vhp-gray-200);
    box-shadow: 0 -20px 46px rgba(2, 6, 23, 0.26);
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      transform 0.26s ease,
      opacity 0.2s ease,
      visibility 0.2s ease;
    display: block !important;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    z-index: 10002;
    will-change: transform, opacity;
  }

  .booking_guest_occupancy_conatiner
    .dropdown
    .booking_occupancy_wrapper.is-visible {
    transform: translate3d(0, 0, 0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .booking_guest_occupancy_conatiner .dropdown.open .booking_occupancy_wrapper {
    transform: translate3d(0, 0, 0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .booking_occupancy_wrapper .occupancy_sheet_header {
    display: block;
    position: sticky;
    top: -10px;
    z-index: 3;
    margin: -10px -14px 10px;
    padding: 8px 14px 10px;
    background: var(--vhp-white);
    border-bottom: 1px solid var(--vhp-gray-200);
  }

  .booking_occupancy_wrapper .occupancy_sheet_handle {
    display: block;
    width: 42px;
    height: 4px;
    margin: 0 auto 8px;
    border-radius: 999px;
    background: var(--vhp-gray-300);
  }

  .booking_occupancy_wrapper .occupancy_sheet_header_row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .booking_occupancy_wrapper .occupancy_sheet_title {
    font-size: 14px;
    color: var(--vhp-color-text);
    line-height: 1.2;
  }

  .booking_occupancy_wrapper .occupancy_sheet_context {
    margin-top: 6px;
    min-width: 0;
  }

  .booking_occupancy_wrapper .occupancy_sheet_context_room,
  .booking_occupancy_wrapper .occupancy_sheet_context_plan {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .booking_occupancy_wrapper .occupancy_sheet_context_label {
    font-weight: 700;
    margin-right: 4px;
  }

  .booking_occupancy_wrapper .occupancy_sheet_context_room {
    font-size: 12px;
    font-weight: 600;
    color: var(--vhp-color-text);
  }

  .booking_occupancy_wrapper .occupancy_sheet_context_plan {
    font-size: 11px;
    color: var(--vhp-color-text-muted);
    margin-top: 2px;
  }

  .booking_occupancy_wrapper .occupancy_sheet_helper {
    margin-top: 10px;
    padding: 10px 12px;
  }

  .booking_occupancy_wrapper .occupancy-close-btn {
    border: none;
    background: #f1f5f9;
    color: var(--vhp-color-text-muted);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
    padding: 0;
    box-shadow: none;
    opacity: 1;
    flex: 0 0 auto;
  }

  .booking_occupancy_wrapper .occupancy-close-btn:hover,
  .booking_occupancy_wrapper .occupancy-close-btn:focus {
    color: var(--vhp-color-text);
    text-decoration: none;
    outline: none;
  }

  .booking_occupancy_wrapper .occupancy_sticky_summary {
    bottom: calc(-10px - env(safe-area-inset-bottom));
    margin: 12px -14px calc(-10px - env(safe-area-inset-bottom));
    padding: 1px 14px calc(12px + env(safe-area-inset-bottom));
  }

  body.occupancy-sheet-open .mobile-quick-fab,
  body.occupancy-sheet-closing .mobile-quick-fab,
  body.occupancy-sheet-open .desktop-quick-fab,
  body.occupancy-sheet-closing .desktop-quick-fab,
  body.occupancy-sheet-open .mobile-cart-summary-modal,
  body.occupancy-sheet-closing .mobile-cart-summary-modal,
  body.occupancy-sheet-open #vhpSessionCartMobileBar,
  body.occupancy-sheet-closing #vhpSessionCartMobileBar,
  body.occupancy-sheet-open #vhpSessionCartSheet,
  body.occupancy-sheet-closing #vhpSessionCartSheet,
  body.occupancy-sheet-open #vhpSessionCartToast,
  body.occupancy-sheet-closing #vhpSessionCartToast {
    display: none !important;
  }

  .occupancy_sheet_backdrop.occupancy-sheet-portal {
    display: block !important;
    position: fixed;
    inset: 0;
    background: transparent;
    backdrop-filter: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity 0.22s ease,
      visibility 0.22s ease;
    z-index: 10000;
  }

  .occupancy_sheet_backdrop.occupancy-sheet-portal.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .booking_occupancy_wrapper.occupancy-sheet-portal {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    bottom: 0 !important;
    width: 100vw !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    max-height: min(82vh, calc(100vh - 20px));
    margin: 0 !important;
    border-radius: 18px 18px 0 0 !important;
    border: 1px solid var(--vhp-gray-200);
    box-shadow: 0 -20px 46px rgba(2, 6, 23, 0.26) !important;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom)) !important;
    transform: translate3d(0, 100%, 0) !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      transform 0.26s ease,
      opacity 0.2s ease,
      visibility 0.2s ease;
    display: block !important;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    z-index: 10002 !important;
    will-change: transform, opacity;
  }

  .booking_occupancy_wrapper.occupancy-sheet-portal.is-visible {
    transform: translate3d(0, 0, 0) !important;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  body.vhp-rate-plan-occupancy-open
    .booking_occupancy_wrapper.occupancy-sheet-portal.occupancy-detail-booking-mode {
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    bottom: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    max-height: calc(100dvh - env(safe-area-inset-top)) !important;
    border-radius: 18px 18px 0 0 !important;
    transform: translate3d(0, 100%, 0) !important;
  }

  body.vhp-rate-plan-occupancy-open
    .booking_occupancy_wrapper.occupancy-sheet-portal.occupancy-detail-booking-mode.is-visible {
    transform: translate3d(0, 0, 0) !important;
  }

  .booking_occupancy_wrapper.occupancy-sheet-portal .occupancy_sheet_header {
    display: block;
  }

  .booking_occupancy_wrapper.occupancy-sheet-portal .occupancy_sticky_summary {
    bottom: calc(-10px - env(safe-area-inset-bottom));
    margin: 12px -14px calc(-10px - env(safe-area-inset-bottom));
    padding: 1px 14px calc(12px + env(safe-area-inset-bottom));
  }
}

/* ========================================
   Occupancy Contract v2 (feature-flagged)
   Enable with window.vhp_enable_occupancy_layout_contract_v2 = true
   ======================================== */
body.occupancy-contract-v2
  .booking_guest_occupancy_conatiner
  .dropdown
  .occupancy_sheet_backdrop {
  display: block;
  position: fixed;
  inset: 0;
  background: transparent;
  backdrop-filter: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
  z-index: 1290;
}

body.occupancy-contract-v2
  .booking_guest_occupancy_conatiner
  .dropdown
  .occupancy_sheet_backdrop.is-visible,
body.occupancy-contract-v2
  .booking_guest_occupancy_conatiner
  .dropdown.open
  .occupancy_sheet_backdrop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Tablet + desktop: anchored popover with JS auto-flip */
@media (min-width: 768px) {
  body.occupancy-contract-v2
    .booking_guest_occupancy_conatiner
    .dropdown
    .booking_occupancy_wrapper {
    position: fixed;
    left: 0;
    top: 0;
    right: auto;
    bottom: auto;
    width: min(520px, calc(100vw - 24px));
    min-width: 320px;
    max-width: calc(100vw - 24px);
    max-height: min(75vh, calc(100vh - 24px));
    margin: 0;
    border-radius: 14px;
    border: 1px solid var(--vhp-gray-200);
    box-shadow: 0 20px 40px rgba(2, 6, 23, 0.22);
    padding: 15px 20px;
    transform: translate3d(0, 8px, 0) scale(0.985);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      transform 0.2s ease,
      opacity 0.2s ease,
      visibility 0.2s ease;
    display: block !important;
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: 1302;
    will-change: transform, opacity, left, top;
  }

  body.occupancy-contract-v2
    .booking_guest_occupancy_conatiner
    .dropdown
    .booking_occupancy_wrapper.is-visible,
  body.occupancy-contract-v2
    .booking_guest_occupancy_conatiner
    .dropdown.open
    .booking_occupancy_wrapper {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  body.occupancy-contract-v2
    .booking_occupancy_wrapper
    .occupancy_sheet_header {
    display: block;
  }

  body.occupancy-contract-v2
    .booking_occupancy_wrapper
    .occupancy_sticky_summary {
    bottom: -15px;
    margin: 12px -20px -15px;
    padding: 1px 20px 12px;
  }
}

/* Mobile-only sheet mode for v2 */
@media (max-width: 767px) {
  body.occupancy-contract-v2.occupancy-sheet-open {
    overflow: hidden;
  }

  body.occupancy-contract-v2
    .booking_guest_occupancy_conatiner
    .dropdown
    .booking_occupancy_wrapper {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: 100vw;
    min-width: 0;
    max-width: 100vw;
    max-height: min(82vh, calc(100vh - 20px));
    margin: 0;
    border-radius: 16px 16px 0 0;
    border: 1px solid var(--vhp-gray-200);
    box-shadow: 0 -20px 46px rgba(2, 6, 23, 0.26);
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      transform 0.26s ease,
      opacity 0.2s ease,
      visibility 0.2s ease;
    display: block !important;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    z-index: 10002;
    will-change: transform, opacity;
  }

  body.occupancy-contract-v2
    .booking_guest_occupancy_conatiner
    .dropdown
    .booking_occupancy_wrapper.is-visible,
  body.occupancy-contract-v2
    .booking_guest_occupancy_conatiner
    .dropdown.open
    .booking_occupancy_wrapper {
    transform: translate3d(0, 0, 0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  body.occupancy-contract-v2
    .booking_occupancy_wrapper
    .occupancy_sheet_header {
    display: block;
  }

  body.occupancy-contract-v2 .occupancy_sheet_backdrop.occupancy-sheet-portal {
    background: transparent;
    backdrop-filter: none;
  }
}
