/* ============================================================
   Padel Holidays Thailand - enquiry pop-up (every page)
   Floating message button: bottom right on every screen - an "Enquire" pill
   with a message icon on desktop/tablet, a round icon on phones. Opens a pop-up enquiry form with a smooth
   scale + fade from the button's corner. Built by enquiry-*.js.
   Edit the values marked <<<.
   ============================================================ */

/* ---------- floating button ---------- */
.pht-fab {
  position: fixed;
  bottom: calc(32px + env(safe-area-inset-bottom, 0px));   /* <<< space from the bottom (desktop) */
  right: 24px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 20px 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  font-family: var(--font);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .01em;
  box-shadow: 0 14px 34px rgba(109, 40, 217, .38);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .25s ease, box-shadow .25s ease, opacity .25s ease;
  animation: pht-fab-in .6s cubic-bezier(.2, .9, .3, 1.2) .6s both;
}
.pht-fab:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(109, 40, 217, .46); }
.pht-fab:focus-visible { outline: 3px solid var(--violet-300); outline-offset: 3px; }
.pht-fab svg { width: 26px; height: 26px; flex: 0 0 auto; }
.pht-fab .pht-dot { fill: var(--violet-700); }
.pht-fab[aria-expanded="true"] { opacity: 0; pointer-events: none; transform: scale(.85); }
/* soft pulse ring to draw the eye (stops after a few beats) */
.pht-fab::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(139, 92, 246, .55);
  animation: pht-pulse 2.4s ease-out 1.4s 3;
  pointer-events: none;
}
@keyframes pht-fab-in { from { opacity: 0; transform: translateY(14px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes pht-pulse { 0% { box-shadow: 0 0 0 0 rgba(139, 92, 246, .55); } 100% { box-shadow: 0 0 0 18px rgba(139, 92, 246, 0); } }

/* ---------- backdrop + pop-up ---------- */
.pht-pop-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(28, 23, 51, .28);         /* <<< light violet-ink veil */
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility 0s linear .3s;
}
.pht-pop-backdrop.is-open { opacity: 1; visibility: visible; transition: opacity .3s ease, visibility 0s; }

.pht-pop {
  position: fixed;
  bottom: calc(32px + env(safe-area-inset-bottom, 0px));   /* <<< opens upwards from the button's corner */
  right: 24px;
  z-index: 80;
  width: 400px;                               /* <<< pop-up width (desktop) */
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  padding: 26px 26px 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-family: var(--font);
  color: var(--ink);
  transform-origin: bottom right;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(.92);
  transition: opacity .28s ease, transform .38s cubic-bezier(.2, .9, .3, 1.1), visibility 0s linear .38s;
}
.pht-pop.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .28s ease, transform .38s cubic-bezier(.2, .9, .3, 1.1), visibility 0s;
}
.pht-pop__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--violet-50);
  color: var(--violet-800);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease, transform .2s ease;
}
.pht-pop__close:hover { background: var(--violet-100); transform: rotate(90deg); }
.pht-pop__close svg { width: 16px; height: 16px; }
.pht-pop__eyebrow { font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--violet-600); }
.pht-pop__title { margin: 4px 40px 6px 0; font-size: 1.35rem; font-weight: 800; line-height: 1.25; letter-spacing: -.01em; }
.pht-pop__intro { margin: 0 0 16px; font-size: .9rem; color: var(--slate); line-height: 1.55; }
.pht-pop form { display: grid; gap: 12px; }
.pht-pop .pht-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pht-pop label { display: block; margin-bottom: 5px; font-size: .8rem; font-weight: 700; color: var(--slate); }
.pht-pop input,
.pht-pop select,
.pht-pop textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font: inherit;
  font-size: .92rem;
  color: var(--ink);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.pht-pop textarea { min-height: 90px; resize: vertical; }
.pht-pop input:focus,
.pht-pop select:focus,
.pht-pop textarea:focus { outline: none; border-color: var(--violet-400); background: #fff; box-shadow: 0 0 0 4px var(--violet-100); }
.pht-pop .pht-submit { width: 100%; justify-content: center; margin-top: 2px; }
.pht-pop .pht-submit[disabled] { opacity: .7; cursor: progress; transform: none; }
.pht-pop .pht-small { margin: 2px 0 0; font-size: .76rem; color: var(--muted); text-align: center; }
.pht-pop .pht-error { margin: 0; padding: 11px 13px; border-radius: 12px; background: #fdecec; color: #9b1c1c; font-size: .86rem; font-weight: 600; }
.pht-pop .cf-turnstile { min-height: 0; }
/* thank-you state */
.pht-pop__done { text-align: center; padding: 18px 4px 6px; }
.pht-pop__done .pht-tick {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--violet-100); color: var(--violet-700);
  animation: pht-pop-tick .5s cubic-bezier(.2, .9, .3, 1.3);
}
.pht-pop__done .pht-tick svg { width: 30px; height: 30px; }
.pht-pop__done h3 { font-size: 1.3rem; font-weight: 800; margin-bottom: 6px; }
.pht-pop__done p { color: var(--slate); font-size: .92rem; margin-bottom: 16px; }
@keyframes pht-pop-tick { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- phones: button + pop-up at the bottom right ---------- */
@media (max-width: 680px) {
  .pht-fab {
    top: auto;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px)); /* <<< space from the bottom (phones; clears the iPhone home bar) */
    right: 18px;
    width: 60px;
    height: 60px;
    padding: 0;
    justify-content: center;
    animation-name: pht-fab-in-up;
  }
  .pht-fab .pht-fab__label { display: none; }  /* icon only on phones */
  .pht-fab svg { width: 27px; height: 27px; }
  .pht-pop {
    top: auto;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
    max-height: calc(100vh - 32px);
    padding: 22px 18px 18px;
    transform-origin: bottom right;
    transform: translateY(16px) scale(.94);
  }
  .pht-pop .pht-row { grid-template-columns: 1fr; }
  @keyframes pht-fab-in-up { from { opacity: 0; transform: translateY(14px) scale(.9); } to { opacity: 1; transform: none; } }
}
html.pht-pop-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .pht-fab, .pht-fab::after, .pht-pop, .pht-pop-backdrop, .pht-pop__done .pht-tick { animation: none !important; transition: none !important; }
}
