/* HotelPack — Paccky (launcher + floating chat panel) */

/* ── Launcher (search bar CTA) ───────────────────────────────────────── */

.hp-paccky-launcher-wrap {
  display: flex;
  justify-content: center;
  margin: 12px auto 0;
  max-width: 1000px;
  padding: 0 4px;
}

.hp-paccky-launcher {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #ed8b0b;
  background: #ed8b0b;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  padding: 12px 22px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(237, 139, 11, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.hp-paccky-launcher:hover {
  transform: translateY(-1px);
  background: #d97600;
  border-color: #d97600;
  box-shadow: 0 10px 26px rgba(237, 139, 11, 0.34);
}

.hp-paccky-launcher:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.hp-paccky-launcher__dot {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}

/* ── Widget shell (inert anchor; panel/FAB are the visible surfaces) ─── */

#hpPacckyWidget {
  position: fixed;
  right: 0;
  bottom: 0;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
  overflow: visible;
  pointer-events: none;
  z-index: 100010;
  border: 0;
}

#hpPacckyWidget[hidden] {
  display: none !important;
}

/* ── Chat panel — compact floating assistant card ────────────────────── */

#hpPacckyPanel {
  box-sizing: border-box;
  display: none;
  flex-direction: column;
  width: 372px;
  max-width: calc(100vw - 32px);
  max-height: min(420px, calc(100dvh - 80px));
  height: auto;
  margin: 0;
  padding: 0;
  overflow: hidden;
  pointer-events: auto;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 16px;
  box-shadow:
    0 12px 40px rgba(15, 23, 42, 0.14),
    0 2px 10px rgba(15, 23, 42, 0.06);
  font-family: var(--wp--preset--font-family--raleway, Raleway, Arial, sans-serif);
  font-size: 14px;
  line-height: 1.45;
  color: #1e293b;
}

#hpPacckyWidget.is-open:not(.is-minimized) #hpPacckyPanel {
  display: flex;
  position: fixed;
  right: 24px;
  bottom: calc(24px + var(--hp-paccky-support-lift, 0px));
  top: auto;
  left: auto;
  max-height: min(420px, calc(100dvh - 80px - var(--hp-paccky-support-lift, 0px)));
}

/* ── Header — must beat body.home header { display:block; padding:0 } in hp-home-public.css */

body.home #hpPacckyWidget #hpPacckyPanel header.hp-paccky-widget__head,
body.front-page #hpPacckyWidget #hpPacckyPanel header.hp-paccky-widget__head,
body.hp-frontpage #hpPacckyWidget #hpPacckyPanel header.hp-paccky-widget__head {
  box-sizing: border-box !important;
  display: flex !important;
  flex: 0 0 auto !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  width: 100% !important;
  min-height: 56px !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative !important;
  z-index: auto !important;
  overflow: visible !important;
  background: #fff !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.07) !important;
  box-shadow: none !important;
}

body.home #hpPacckyWidget #hpPacckyPanel .hp-paccky-widget__head-text,
body.front-page #hpPacckyWidget #hpPacckyPanel .hp-paccky-widget__head-text,
body.hp-frontpage #hpPacckyWidget #hpPacckyPanel .hp-paccky-widget__head-text {
  box-sizing: border-box !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: flex-start !important;
  gap: 3px !important;
  margin: 0 !important;
  padding: 12px 8px 10px 16px !important;
}

body.home #hpPacckyWidget #hpPacckyPanel h2#hpPacckyTitle.hp-paccky-widget__title,
body.front-page #hpPacckyWidget #hpPacckyPanel h2#hpPacckyTitle.hp-paccky-widget__title,
body.hp-frontpage #hpPacckyWidget #hpPacckyPanel h2#hpPacckyTitle.hp-paccky-widget__title {
  box-sizing: border-box !important;
  display: block !important;
  position: static !important;
  margin: 0 !important;
  margin-block: 0 !important;
  padding: 0 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  text-align: left !important;
  color: #0f172a !important;
  white-space: nowrap !important;
  overflow: visible !important;
}

body.home #hpPacckyWidget #hpPacckyPanel .hp-paccky-widget__subtitle,
body.front-page #hpPacckyWidget #hpPacckyPanel .hp-paccky-widget__subtitle,
body.hp-frontpage #hpPacckyWidget #hpPacckyPanel .hp-paccky-widget__subtitle {
  box-sizing: border-box !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
  color: #64748b !important;
}

body.home #hpPacckyWidget #hpPacckyPanel .hp-paccky-widget__actions,
body.front-page #hpPacckyWidget #hpPacckyPanel .hp-paccky-widget__actions,
body.hp-frontpage #hpPacckyWidget #hpPacckyPanel .hp-paccky-widget__actions {
  box-sizing: border-box !important;
  flex: 0 0 auto !important;
  align-self: center !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  margin: 0 !important;
  padding: 0 14px 0 0 !important;
}

#hpPacckyPanel .hp-paccky-widget__btn-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #f1f5f9;
  color: #475569;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

#hpPacckyPanel .hp-paccky-widget__btn-icon:hover {
  background: #e2e8f0;
}

/* ── Transcript (grows with content, scrolls inside cap) ───────────── */

#hpPacckyPanel .hp-paccky-widget__log {
  flex: 1 1 auto;
  min-height: 64px;
  max-height: min(240px, calc(100dvh - 220px));
  overflow-x: hidden;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fafafa;
  -webkit-overflow-scrolling: touch;
}

#hpPacckyPanel .hp-paccky-widget__msg {
  max-width: 90%;
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}

#hpPacckyPanel .hp-paccky-widget__msg--user {
  align-self: flex-end;
  background: #ed8b0b;
  color: #fff;
  border-bottom-right-radius: 4px;
}

#hpPacckyPanel .hp-paccky-widget__msg--paccky {
  align-self: flex-start;
  background: #fff;
  color: #1e293b;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-bottom-left-radius: 4px;
}

/* ── Input row ───────────────────────────────────────────────────────── */

#hpPacckyPanel .hp-paccky-widget__form {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: 10px 12px 12px;
  margin: 0;
  border-top: 1px solid rgba(15, 23, 42, 0.07);
  background: #fff;
}

#hpPacckyPanel .hp-paccky-widget__form.is-busy {
  opacity: 0.72;
}

#hpPacckyPanel .hp-paccky-widget__mic,
#hpPacckyPanel .hp-paccky-widget__mic.is-disabled,
#hpPacckyPanel .hp-paccky-widget__mic:disabled {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  background: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
  opacity: 0.72;
  font-size: 15px;
  line-height: 1;
  pointer-events: none;
}

#hpPacckyPanel .hp-paccky-widget__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 36px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.4;
}

#hpPacckyPanel .hp-paccky-widget__send {
  flex: 0 0 auto;
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: #ed8b0b;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

/* ── Minimized FAB ───────────────────────────────────────────────────── */

#hpPacckyFab {
  display: none;
  pointer-events: auto;
  margin: 0;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  background: #ed8b0b;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(237, 139, 11, 0.32);
  font-family: var(--wp--preset--font-family--raleway, Raleway, Arial, sans-serif);
}

#hpPacckyWidget.is-open.is-minimized #hpPacckyFab {
  display: inline-block;
  position: fixed;
  right: 24px;
  bottom: calc(24px + var(--hp-paccky-support-lift, 0px));
  top: auto;
  left: auto;
}

#hpPacckyWidget.is-open.is-minimized #hpPacckyPanel {
  display: none !important;
}

@media (max-width: 640px) {
  .hp-paccky-launcher {
    font-size: 14px;
    padding: 11px 18px;
    gap: 8px;
  }

  #hpPacckyPanel {
    width: min(calc(100vw - 24px), 372px);
    max-height: min(400px, calc(100dvh - 96px - var(--hp-paccky-support-lift, 0px)));
  }

  #hpPacckyPanel .hp-paccky-widget__log {
    max-height: min(240px, calc(100dvh - 240px - var(--hp-paccky-support-lift, 0px)));
  }

  #hpPacckyWidget.is-open:not(.is-minimized) #hpPacckyPanel,
  #hpPacckyWidget.is-open.is-minimized #hpPacckyFab {
    right: 16px;
    bottom: calc(16px + var(--hp-paccky-support-lift, 0px));
  }
}
