/**
* 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
*/

/* ========================================
   CATEGORY PAGE - HORIZONTAL FLEX SEARCH
   ======================================== */

/* Wrapper */
.header-rmsearch-wrapper {
  background: #1A4060;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  overflow: visible;
}

.header-rmsearch-wrapper .filter_header {
  display: none;
}

/* ====== FLEX CONTAINER ====== */
#search_hotel_block_form #search_form_fields_wrapper {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 10px !important;
}

/* ====== ALL ITEMS ====== */
#search_hotel_block_form #search_form_fields_wrapper > .grid-item,
#search_hotel_block_form #search_form_fields_wrapper > .form-group {
  flex: 1 1 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  height: 50px !important;
}

/* Submit button */
#search_hotel_block_form #search_form_fields_wrapper > .search_room_submit_block {
  flex: 0 0 auto !important;
}

/* ====== SAME HEIGHT FOR ALL INPUTS ====== */
#search_hotel_block_form .hotel-selector-wrap,
#search_hotel_block_form .dropdown,
#search_hotel_block_form #daterange_value,
#search_hotel_block_form .chosen-container,
#search_hotel_block_form .chosen-single,
#search_hotel_block_form #guest_occupancy,
#search_hotel_block_form .search_room_submit {
  height: 50px !important;
  min-height: 50px !important;
  max-height: 50px !important;
}

/* Full width inside container */
#search_hotel_block_form .hotel-selector-wrap,
#search_hotel_block_form .dropdown {
  width: 100% !important;
}

#search_hotel_block_form .chosen-container {
  width: 100% !important;
}

/* ====== CHOSEN CONTAINER FIX ====== */
#search_hotel_block_form .chosen-container {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
}

#search_hotel_block_form .chosen-container-single .chosen-single {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  border: 1px solid #d6d6d6 !important;
  border-radius: 4px !important;
  background: #fff !important;
  padding: 0 40px 0 35px !important;
  line-height: 50px !important;
  background-position: 10px center !important;
}

#search_hotel_block_form .chosen-container-single .chosen-single span {
  display: block !important;
  line-height: 50px !important;
  height: 72px !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#search_hotel_block_form .chosen-container-single .chosen-single div {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  width: 30px !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transform: none !important;
}

#search_hotel_block_form .chosen-container-single .chosen-single div b {
  background-position: 0 center !important;
}

/* ====== DATE FIELD ====== */
#search_hotel_block_form #daterange_value {
  border: 1px solid #d6d6d6 !important;
  border-radius: 4px !important;
  background: #fff !important;
  padding: 0 16px !important;
  display: flex !important;
  align-items: center !important;
  cursor: pointer;
  width: 100% !important;
}

/* ====== OCCUPANCY FIELD ====== */
#search_hotel_block_form #guest_occupancy {
  border: 1px solid #d6d6d6 !important;
  border-radius: 4px !important;
  background: #fff !important;
  padding: 0 16px !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
}

/* Dropdown panel */
#search_hotel_block_form #search_occupancy_wrapper {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  min-width: 320px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  margin-top: 2px;
}

/* ====== SEARCH BUTTON ====== */
#search_hotel_block_form .search_room_submit {
  height: 50px !important;
  padding: 0 24px !important;
  background: #0066cc !important;
  color: #fff !important;
  border: none !important;
  border-radius: 4px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer;
  text-transform: uppercase;
  white-space: nowrap;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#search_hotel_block_form .search_room_submit:hover {
  background: #0052a3 !important;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 991px) {
  #search_hotel_block_form #search_form_fields_wrapper {
    flex-wrap: wrap !important;
  }
  
  #search_hotel_block_form #search_form_fields_wrapper > .grid-item,
  #search_hotel_block_form #search_form_fields_wrapper > .form-group {
    flex: 1 1 calc(50% - 5px) !important;
    min-width: calc(50% - 5px) !important;
  }
  
  #search_hotel_block_form #search_form_fields_wrapper > .search_room_submit_block {
    flex: 1 1 100% !important;
  }
  
  #search_hotel_block_form .search_room_submit {
    width: 100% !important;
  }
}

@media (max-width: 767px) {
  #search_hotel_block_form #search_form_fields_wrapper > .grid-item,
  #search_hotel_block_form #search_form_fields_wrapper > .form-group {
    flex: 1 1 100% !important;
  }
  
  .header-rmsearch-wrapper {
    padding: 15px;
  }
}
