/* Forest Heaven WhatsApp Booking */

/* ---------- Floating button ---------- */
#fhwb .fhwb-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99990;
  width: 60px;
  height: 60px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  cursor: grab;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
#fhwb.fhwb--left .fhwb-button {
  right: auto;
  left: 20px;
}
#fhwb .fhwb-button:hover {
  transform: scale(1.06);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
}
#fhwb .fhwb-button:focus-visible {
  outline: 3px solid #359900;
  outline-offset: 3px;
}
#fhwb .fhwb-button.is-dragging {
  cursor: grabbing;
  transition: none;
  transform: scale(1.1);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}
#fhwb .fhwb-button::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55);
  animation: fhwb-pulse 2.4s ease-out infinite;
  pointer-events: none;
}
#fhwb .fhwb-button.is-dragging::after {
  animation: none;
}
#fhwb .fhwb-button svg {
  pointer-events: none;
}
@keyframes fhwb-pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55); }
  70% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ---------- Modal ---------- */
html.fhwb-lock,
html.fhwb-lock body {
  overflow: hidden !important;
}
#fhwb-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483000; /* above the Responsive Menu trigger (999999) */
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  font-family: inherit;
}
#fhwb-modal[aria-hidden="false"] {
  display: flex;
}
#fhwb-modal .fhwb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 25, 10, 0.55);
  animation: fhwb-fade 0.2s ease;
}
#fhwb-modal .fhwb-dialog {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  color: #222;
  border-radius: 16px;
  padding: 22px 22px 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  animation: fhwb-pop 0.22s ease;
  text-align: left;
}
#fhwb-modal .fhwb-dialog:focus {
  outline: none;
}
#fhwb-modal .fhwb-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #555;
  font-size: 28px;
  line-height: 40px;
  cursor: pointer;
}
#fhwb-modal .fhwb-close:hover,
#fhwb-modal .fhwb-close:focus-visible {
  background: #f0f3f0;
  color: #111;
}
#fhwb-modal .fhwb-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 40px 16px 0;
}
#fhwb-modal .fhwb-head-icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
#fhwb-modal .fhwb-title {
  margin: 0;
  padding: 0;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 700;
  color: #1b1b1b;
  letter-spacing: 0;
  text-transform: none;
}
#fhwb-modal .fhwb-sub {
  margin: 2px 0 0;
  font-size: 14px;
  line-height: 1.3;
  color: #359900;
}

/* ---------- Form ---------- */
#fhwb-modal .fhwb-form {
  margin: 0;
}
#fhwb-modal .fhwb-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
#fhwb-modal .fhwb-field {
  margin: 0 0 12px;
  min-width: 0;
}
#fhwb-modal label {
  display: block;
  margin: 0 0 5px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: #333;
}
#fhwb-modal input,
#fhwb-modal select,
#fhwb-modal textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 9px 12px;
  border: 1px solid #c9d3c9;
  border-radius: 10px;
  background: #fff;
  color: #222;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.3;
  box-shadow: none;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}
#fhwb-modal select {
  padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, #555 50%), linear-gradient(135deg, #555 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
#fhwb-modal textarea {
  min-height: 64px;
  resize: vertical;
}
#fhwb-modal input:focus,
#fhwb-modal select:focus,
#fhwb-modal textarea:focus {
  outline: none;
  border-color: #359900;
  box-shadow: 0 0 0 3px rgba(53, 153, 0, 0.18);
}
#fhwb-modal [aria-invalid="true"] {
  border-color: #c62828;
}
#fhwb-modal .fhwb-error {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.3;
  color: #c62828;
}
#fhwb-modal .fhwb-error:empty {
  display: none;
}
#fhwb-modal .fhwb-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  margin: 6px 0 0;
  padding: 12px 16px;
  border: 0;
  border-radius: 10px;
  background: #25d366;
  color: #fff;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s ease;
}
#fhwb-modal .fhwb-submit:hover {
  background: #1eb257;
}
#fhwb-modal .fhwb-submit:focus-visible {
  outline: 3px solid #359900;
  outline-offset: 2px;
}
#fhwb-modal .fhwb-hint {
  margin: 10px 0 0;
  font-size: 12.5px;
  line-height: 1.4;
  color: #666;
  text-align: center;
}

@keyframes fhwb-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fhwb-pop { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes fhwb-sheet { from { transform: translateY(100%); } to { transform: none; } }

/* ---------- Phones: bottom sheet ---------- */
@media (max-width: 480px) {
  #fhwb .fhwb-button {
    width: 56px;
    height: 56px;
    bottom: 16px;
    right: 16px;
  }
  #fhwb.fhwb--left .fhwb-button {
    left: 16px;
  }
  #fhwb-modal {
    align-items: flex-end;
    padding: 0;
  }
  #fhwb-modal .fhwb-dialog {
    max-width: none;
    max-height: 92vh;
    max-height: 92dvh;
    border-radius: 18px 18px 0 0;
    padding: 20px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    animation: fhwb-sheet 0.25s ease;
  }
  #fhwb-modal .fhwb-row {
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #fhwb .fhwb-button::after,
  #fhwb-modal .fhwb-backdrop,
  #fhwb-modal .fhwb-dialog {
    animation: none;
  }
}
