/* --- ESTILO DA BARRA DE BUSCA (booking-widget.css) --- */
.booking-widget {
  display: flex;
  width: 100%;
  max-width: 1200px;
  position: relative; /* Posição relativa para o z-index */
  z-index: 10;
  margin: -60px auto 0 auto; /* Sobe 60px para sobrepor o Header */
  padding: 16px 20px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  align-items: center;
}

.form-field {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0 15px;
  border-right: 1px solid #e0e0e0;
  position: relative; /* Para os popups */
  min-width: 150px; 
}

.form-field:last-of-type { 
  border-right: none; 
}

.field-icon {
  font-size: 1.1rem;
  color: #555;
  margin-right: 10px;
}

/* Estilo para todos os inputs e triggers */
.form-field input,
.custom-dropdown-trigger {
  border: none;
  background-color: transparent;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: #333;
  padding: 8px 0;
  width: 100%;
  cursor: pointer;
}
.form-field input:focus {
  outline: none;
}
.form-field input::placeholder {
  color: #777;
  font-weight: 400;
}
/* Alvo específico do Flatpickr */
#date-range-picker {
  cursor: pointer;
}

/* Botão de Busca */
.submit-btn-booking { 
  background-color: #1a2b48; /* Cor azul escura da referência */
  color: #fff; 
  border: none; 
  padding: 12px 24px; 
  border-radius: 8px; 
  cursor: pointer; 
  font-weight: 600; 
  font-size: 1rem; 
  transition: background-color 0.3s ease; 
  margin-left: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.submit-btn-booking:hover { 
  background-color: #334a6d; 
}


/* --- ESTILOS DOS POPUPS --- */

/* Popups ocultos por padrão */
.custom-dropdown-menu,
.guest-popup {
  display: none; /* Começa oculto */
  position: absolute; 
  top: calc(100% + 10px); 
  left: 0; 
  background-color: #fff; 
  border-radius: 8px; 
  box-shadow: 0 6px 20px rgba(0,0,0,0.15); 
  z-index: 100; 
}
/* Classe JS para exibir os popups */
.popup-open {
  display: flex; /* Mudei para flex para o .guest-popup */
  flex-direction: column;
}
/* Ajuste para a lista de hoteis */
.custom-dropdown-menu.popup-open {
    display: block;
}


/* Dropdown de Hotéis */
.custom-dropdown-trigger { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  height: 100%; 
}
.custom-dropdown-trigger .select-arrow { 
  font-size: 0.9em; 
  color: #777;
}
.custom-dropdown-menu { 
  width: 100%; 
  list-style: none; 
  padding: 5px 0; 
  margin: 0; 
  overflow: hidden; 
}
.custom-dropdown-menu li { 
  padding: 12px 20px; 
  color: #333; 
  font-weight: 500; 
  cursor: pointer; 
  transition: background-color 0.2s ease; 
}
.custom-dropdown-menu li:hover { 
  background-color: #f0f2f5; 
}

/* Popup de Hóspedes */
.guest-popup { 
  width: 320px; 
  padding: 20px; 
  color: #333; 
  gap: 15px; 
}
.pax-control { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
}
.pax-control > span { 
  font-weight: 500; 
  font-size: 1rem; 
  display: flex; 
  flex-direction: column; 
}
.pax-control > span small { 
  font-weight: 400; 
  font-size: 0.8rem; 
  color: #888; 
}
.pax-counter { 
  display: flex; 
  align-items: center; 
  gap: 15px; 
}
.pax-counter button { 
  width: 32px; 
  height: 32px; 
  border-radius: 50%; 
  border: 1px solid #ddd; 
  background-color: #fff; 
  cursor: pointer; 
  color: #555; 
  font-size: 1rem; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  transition: background-color 0.2s; 
}
.pax-counter button:hover { 
  background-color: #f7f7f7; 
}
.pax-counter > span { 
  font-weight: 600; 
  font-size: 1.1rem; 
  min-width: 20px; 
  text-align: center; 
}

.children-ages { 
  margin-top: 10px; 
  padding-top: 15px; 
  border-top: 1px solid #eee; 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 15px; 
}
.child-age-selector { 
  display: flex; 
  flex-direction: column; 
}
.child-age-selector label { 
  font-size: 0.9rem; 
  color: #555; 
  margin-bottom: 5px; 
}
.select-age-wrapper { 
  position: relative; 
  display: flex; 
  align-items: center; 
}
.age-select { 
  width: 100%; 
  padding: 10px; 
  border: 1px solid #ccc; 
  border-radius: 6px; 
  background-color: #f7f7f7; 
  color: #333; 
  font-weight: 500; 
  font-family: 'Poppins', sans-serif; 
  font-size: 1rem; 
  cursor: pointer; 
  -webkit-appearance: none; 
  -moz-appearance: none; 
  appearance: none; 
}
.select-arrow-age { 
  position: absolute; 
  right: 12px; 
  color: #888; 
  pointer-events: none; 
}

.apply-guests-btn { 
  margin-top: 15px; 
  width: 100%; 
  padding: 12px; 
  font-size: 1rem; 
  font-weight: 600; 
  background-color: #497aa6; 
  color: #fff; 
  border: none; 
  border-radius: 6px; 
  cursor: pointer; 
  transition: opacity 0.2s ease; 
}
.apply-guests-btn:hover { 
  opacity: 0.9; 
}

/* --- RESPONSIVIDADE PARA MOBILE (max-width: 768px) --- */
@media (max-width: 768px) {
  .booking-widget { 
    flex-direction: column; 
    margin: 20px 15px; /* Desce para baixo do header no mobile */
    width: auto; 
    padding: 10px;
  }
  .form-field { 
    flex-direction: row; 
    justify-content: space-between; 
    align-items: center; 
    padding: 12px 10px;
    border-right: none; 
    border-bottom: 1px solid #eee; 
    width: 100%;
  }
  .form-field:last-of-type { 
    border-bottom: none; 
  }
  .custom-dropdown-trigger, 
  .form-field input { 
    padding: 2px 0; 
    font-size: 1rem; 
    height: auto; 
    text-align: right; 
    flex: 1;
    margin-left: 10px;
  }
  .submit-btn-booking { 
    width: 100%; 
    padding: 14px; 
    margin-left: 0; 
    margin-top: 15px; 
    font-size: 1rem; 
  }
  .guest-popup, .custom-dropdown-menu { 
    position: fixed; /* Tela cheia no mobile */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw; 
    max-height: 80vh;
    overflow-y: auto;
  }
}