.fhpe-shell {
  container: estimator / inline-size;
  --fhpe-gold: #f2c66d;
  --fhpe-mint: #8bc9b2;
  background: linear-gradient(145deg, rgba(242, 198, 109, .08), rgba(139, 201, 178, .07));
  border: 1px solid rgba(242, 198, 109, .2);
  border-radius: 26px;
  box-sizing: border-box;
  margin: 1rem 0 3rem;
  max-width: 100%;
  overflow: hidden;
  padding: clamp(1.25rem, 4vw, 3rem);
  width: 100%;
}

.fhpe-intro {
  max-width: 100%;
}

.fhpe-eyebrow {
  color: var(--fhpe-mint);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .18em;
  margin: 0 0 .5rem;
  text-transform: uppercase;
}

.fhpe-intro h2 {
  color: #fff8e8;
  font: 400 clamp(2.2rem, 5vw, 4rem)/1 "Pirata One", Georgia, serif;
  margin: 0 0 .75rem;
}

.fhpe-intro > p:last-child {
  color: #d6d8cf;
  line-height: 1.7;
}

.fhpe-grid {
  display: grid;
  gap: clamp(1.25rem, 4vw, 2.5rem);
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr);
  margin-top: 2rem;
}

.fhpe-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* 1 line layout for all 3 inputs: Animals, Length of stay, ZIP code */
.fhpe-row {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fhpe-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.fhpe-field label {
  color: #fff8e8;
  font-size: 1.25rem;
  font-weight: 750;
}

.fhpe-field small {
  color: #aeb9b5;
  line-height: 1.45;
}

.fhpe-field input,
.fhpe-field select {
  min-width: 0;
  box-sizing: border-box;
  appearance: none;
  background: rgba(4, 9, 12, .7);
  border: 1px solid rgba(242, 198, 109, .25);
  border-radius: 14px;
  color: #fff8e8;
  font: inherit;
  min-height: 52px;
  padding: .8rem 1rem;
  width: 100%;
}

.fhpe-field input:focus,
.fhpe-field select:focus {
  border-color: var(--fhpe-mint);
  outline: 2px solid rgba(139, 201, 178, .22);
  outline-offset: 2px;
}

.fhpe-select-wrap {
  position: relative;
}

.fhpe-select-wrap::after {
  color: var(--fhpe-gold);
  content: "▼";
  font-size: .8rem;
  pointer-events: none;
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.fhpe-select-wrap select {
  padding-right: 3rem;
}

.fhpe-stepper {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
}

.fhpe-stepper input {
  border-radius: 0;
  text-align: center;
}

.fhpe-stepper button {
  background: #203f39;
  border: 1px solid rgba(139, 201, 178, .35);
  color: #fff;
  cursor: pointer;
  font-size: 1.5rem;
}

.fhpe-stepper button:first-child {
  border-radius: 14px 0 0 14px;
}

.fhpe-stepper button:last-child {
  border-radius: 0 14px 14px 0;
}

.fhpe-divider {
  background: linear-gradient(90deg, #227323, #276957);
  border-radius: 999px;
  height: 5px;
  margin-top: .25rem;
  width: 100%;
}

.fhpe-error {
  background: rgba(176, 55, 55, .16);
  border: 1px solid rgba(235, 111, 111, .35);
  border-radius: 12px;
  color: #ffdada;
  margin: 0;
  padding: .75rem;
}

.fhpe-disclaimers {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  margin-top: .75rem;
}

.fhpe-disclaimers p {
  color: #aeb9b5;
  font-size: 1.2rem;
  line-height: 1.55;
  margin: 0;
}

.fhpe-disclaimers strong {
  color: #fff8e8;
  font-weight: 700;
}

.fhpe-result {
  align-self: start;
  background: rgba(4, 9, 12, .7);
  border: 1px solid rgba(242, 198, 109, .22);
  border-radius: 22px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, .28);
  padding: clamp(1.25rem, 3vw, 2rem);
}

/* Header line putting ESTIMATED STAY TOTAL and calculated amount on one line */
.fhpe-header-line {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1rem;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.fhpe-result__kicker {
  color: var(--fhpe-mint);
  font-size: .88rem;
  font-weight: 850;
  letter-spacing: .14em;
  margin: 0;
  text-transform: uppercase;
}

.fhpe-total {
  color: var(--fhpe-gold);
  font: 400 clamp(2rem, 3.5vw, 2.8rem)/1 "Pirata One", Georgia, serif;
  margin: 0;
}

.fhpe-breakdown {
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding: .45rem 0;
}

.fhpe-breakdown div {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: .65rem 0;
}

.fhpe-breakdown span {
  color: #cdd4d1;
}

.fhpe-breakdown strong {
  color: #fff8e8;
  white-space: nowrap;
}

.fhpe-distance {
  color: #d6d8cf;
  line-height: 1.55;
  margin: 1rem 0;
}

.fhpe-fineprint {
  color: #93a19d;
  font-size: .84rem;
  line-height: 1.5;
  margin: 0;
}

.fhpe-appointment-button {
  background: linear-gradient(135deg, #227323, #276957);
  border: 1px solid rgba(242, 198, 109, .35);
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  display: block;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 750;
  line-height: 1.2;
  margin-top: 1.25rem;
  min-height: 52px;
  padding: .9rem 1.25rem;
  width: 100%;
}

.fhpe-appointment-button:hover,
.fhpe-appointment-button:focus-visible {
  filter: brightness(1.12);
  outline: 2px solid var(--fhpe-mint);
  outline-offset: 3px;
}

.fhpe-modal {
  background: transparent;
  border: 0;
  color: #fff8e8;
  max-height: calc(100dvh - 2rem);
  max-width: min(760px, calc(100vw - 2rem));
  padding: 0;
  width: 100%;
}

.fhpe-modal::backdrop {
  background: rgba(2, 5, 8, .82);
  backdrop-filter: blur(5px);
}

.fhpe-modal__panel {
  background: #10171a;
  border: 1px solid rgba(242, 198, 109, .28);
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .6);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  padding: clamp(1rem, 4vw, 2rem);
  scrollbar-width: none;
}

.fhpe-modal__panel::-webkit-scrollbar {
  height: 0;
  width: 0;
}

.fhpe-modal__header {
  display: block;
  margin-bottom: 1rem;
  position: relative;
}

.fhpe-modal__header > div {
  flex: 1 1 auto;
  text-align: center;
}

.fhpe-modal__header h2 {
  color: #fff8e8;
  font: 400 clamp(2rem, 6vw, 3rem)/1 "Pirata One", Georgia, serif;
  margin: .25rem 0 0;
}

.fhpe-modal__close {
  align-items: center;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(242, 198, 109, .25);
  border-radius: 999px;
  color: #fff8e8;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 44px;
  font-size: 1.8rem;
  height: 44px;
  justify-content: center;
  line-height: 1;
  min-width: 44px;
  padding: 0;
  position: absolute;
  right: .35rem;
  top: 0;
  width: 44px;
}

/* The booking plugin adds its own widths; keep the embedded calendar inside the modal. */
.fhpe-modal__booking,
.fhpe-modal__booking .booking_form,
.fhpe-modal__booking .booking_form_div,
.fhpe-modal__booking .wpbc_cal_container,
.fhpe-modal__booking [id^="calendar_booking"],
.fhpe-modal__booking .datepick-inline,
.fhpe-modal__booking .datepick-one-month,
.fhpe-modal__booking table {
  box-sizing: border-box !important;
  max-width: 100% !important;
  width: 100% !important;
}

/* WP Booking Calendar applies a fixed width through #calendar_bookingN.
   Match that specificity so the modal can use its full available width. */
.fhpe-modal__booking [id^="calendar_booking"] .datepick-inline,
.fhpe-modal__booking [id^="calendar_booking"] .datepick-one-month,
.fhpe-modal__booking [id^="calendar_booking"] table.datepick {
  flex-basis: auto !important;
  width: 100% !important;
}

/* Leave a little breathing room around the calendar while keeping it centered. */
.fhpe-modal__booking .wpbc_calendar_wraper {
  width: 100% !important;
}

.fhpe-modal__booking .wpbc_cal_container {
  margin-inline: auto !important;
  width: 90% !important;
}

.fhpe-modal__booking {
  overflow-x: hidden;
}

.fhpe-modal__booking {
  margin: 0;
}

body.fhpe-modal-open {
  overflow: hidden;
}

@media (max-width: 1100px) {
  .fhpe-shell {
    border-radius: 18px;
    padding: 1rem;
  }

  .fhpe-intro h2 {
    font-size: clamp(2rem, 10vw, 2.75rem);
  }

  .fhpe-grid {
    grid-template-columns: 1fr;
  }
  
  .fhpe-row {
    grid-template-columns: 1fr;
  }

  .fhpe-result {
    order: -1;
    padding: 1rem;
  }

  .fhpe-header-line {
    align-items: flex-start;
    flex-direction: column;
  }

  .fhpe-breakdown div {
    align-items: flex-start;
  }

  .fhpe-breakdown strong {
    text-align: right;
    white-space: normal;
  }

  .fhpe-modal {
    max-height: calc(100dvh - 1rem);
    max-width: calc(100vw - 1rem);
  }

  .fhpe-modal__panel {
    border-radius: 18px;
    max-height: calc(100dvh - 1rem);
    padding: .85rem;
  }

  .fhpe-modal__booking {
    padding: .75rem;
  }
}

/* Also supports embedding the estimator in a narrow desktop column. */
@container estimator (max-width: 950px) {
  .fhpe-grid { grid-template-columns: minmax(0, 1fr); }
  .fhpe-result { order: -1; min-width: 0; }
}
@container estimator (max-width: 600px) {
  .fhpe-row { grid-template-columns: minmax(0, 1fr); }
  .fhpe-header-line { flex-direction: column; align-items: flex-start; }
}
