/* London Baby 2026 - Ask Chat operational polish
   Scope: Ask Chat only. Restores mobile close/new functionality affordances, turns the
   module into a full focused chat sheet, and restyles the four shortcut actions to
   mirror the main header buttons with icons + uniform Apple/glass treatment. */
:root {
  --lb-navy: #071326;
  --lb-muted: #667186;
  --lb-baby-gold: #c99a2e;
  --lb-glass-gold: rgba(201,154,46,.52);
  --lb-glass-panel: rgba(246,251,255,.84);
  --lb-glass-panel-strong: rgba(255,255,255,.92);
}

html.lb-chat-open,
body.lb-chat-open {
  overflow: hidden !important;
  overscroll-behavior: none !important;
}

html body .ask-chat-backdrop,
html body.lb-chat-open .ask-chat-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147482000 !important;
  display: block !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,.96), transparent 38%),
    radial-gradient(circle at 84% 16%, rgba(188,219,238,.76), transparent 42%),
    linear-gradient(180deg, #eef7fd 0%, #dce9f3 52%, #cdd8e1 100%) !important;
  backdrop-filter: blur(20px) saturate(1.08) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.08) !important;
  touch-action: pan-y !important;
}

html body .ask-chat-backdrop[hidden] {
  display: none !important;
}

html body .ask-chat-panel,
html body.lb-chat-open .ask-chat-panel {
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  max-width: none !important;
  height: var(--lb-chat-vv-height, 100dvh) !important;
  min-height: var(--lb-chat-vv-height, 100dvh) !important;
  max-height: var(--lb-chat-vv-height, 100dvh) !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border: 0 !important;
  background:
    radial-gradient(circle at 85% 20%, rgba(213,232,244,.70), transparent 40%),
    linear-gradient(180deg, rgba(255,255,255,.78), rgba(231,241,248,.74) 45%, rgba(211,222,231,.78)) !important;
  color: var(--lb-navy) !important;
  box-shadow: none !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) auto auto !important;
  overflow: hidden !important;
  transform: translateZ(0) !important;
}

html body .ask-chat-header,
html body.lb-chat-open .ask-chat-header {
  position: relative !important;
  z-index: 6 !important;
  display: flex !important;
  align-items: flex-end !important;
  justify-content: space-between !important;
  gap: 16px !important;
  padding: calc(18px + env(safe-area-inset-top)) 30px 24px !important;
  min-height: calc(146px + env(safe-area-inset-top)) !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(244,250,253,.82)) !important;
  border-bottom: 1px solid rgba(201,154,46,.42) !important;
  box-shadow: 0 12px 34px rgba(55,74,96,.08) !important;
  pointer-events: auto !important;
}

html body .ask-chat-header > div:first-child {
  min-width: 0 !important;
}

html body .ask-chat-header .eyebrow,
html body.lb-chat-open .ask-chat-header .eyebrow {
  margin: 0 0 4px !important;
  color: rgba(7,19,38,.56) !important;
  font-size: clamp(14px, 3.4vw, 17px) !important;
  font-weight: 950 !important;
  letter-spacing: .18em !important;
  line-height: 1.05 !important;
  text-transform: uppercase !important;
}

html body .ask-chat-header h2,
html body.lb-chat-open .ask-chat-header h2 {
  margin: 0 !important;
  color: var(--lb-navy) !important;
  font-size: clamp(46px, 11.2vw, 68px) !important;
  font-weight: 950 !important;
  line-height: .92 !important;
  letter-spacing: -.075em !important;
  text-shadow: none !important;
}

html body .ask-chat-header-actions,
html body.lb-chat-open .ask-chat-header-actions {
  position: relative !important;
  z-index: 20 !important;
  display: flex !important;
  gap: 14px !important;
  align-items: center !important;
  flex: 0 0 auto !important;
  pointer-events: auto !important;
}

html body .ask-chat-new,
html body .ask-chat-close,
html body.lb-chat-open .ask-chat-new,
html body.lb-chat-open .ask-chat-close {
  position: relative !important;
  z-index: 21 !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
  display: grid !important;
  place-items: center !important;
  width: 88px !important;
  height: 88px !important;
  min-width: 88px !important;
  min-height: 88px !important;
  border-radius: 999px !important;
  border: 1.5px solid var(--lb-glass-gold) !important;
  background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(237,246,252,.74)) !important;
  color: var(--lb-navy) !important;
  font-family: inherit !important;
  font-weight: 950 !important;
  font-size: 27px !important;
  line-height: 1 !important;
  box-shadow: 0 14px 32px rgba(43,61,82,.12), inset 0 1px 0 rgba(255,255,255,.92) !important;
  cursor: pointer !important;
}

html body .ask-chat-close,
html body.lb-chat-open .ask-chat-close {
  font-size: 58px !important;
  font-weight: 750 !important;
  padding-bottom: 6px !important;
}

html body .ask-chat-new:active,
html body .ask-chat-close:active {
  transform: scale(.975) !important;
}

html body .ask-chat-body,
html body.lb-chat-open .ask-chat-body {
  position: relative !important;
  z-index: 1 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  padding: 28px 30px 24px !important;
  overscroll-behavior: contain !important;
  scroll-padding-bottom: 24px !important;
}

html body .ask-chat-message,
html body.lb-chat-open .ask-chat-message {
  width: fit-content !important;
  max-width: min(82%, 640px) !important;
  border-radius: 24px !important;
  padding: 20px 22px !important;
  font-size: clamp(17px, 4.15vw, 24px) !important;
  font-weight: 850 !important;
  line-height: 1.2 !important;
  letter-spacing: -.02em !important;
  white-space: pre-wrap !important;
}

html body .ask-chat-message.ask-chat-assistant,
html body.lb-chat-open .ask-chat-message.ask-chat-assistant {
  align-self: flex-start !important;
  background: rgba(255,255,255,.82) !important;
  border: 1.5px solid var(--lb-glass-gold) !important;
  color: var(--lb-navy) !important;
  box-shadow: 0 16px 34px rgba(42,61,83,.10), inset 0 1px 0 rgba(255,255,255,.90) !important;
}

html body .ask-chat-message.ask-chat-user,
html body.lb-chat-open .ask-chat-message.ask-chat-user {
  align-self: flex-end !important;
  background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(236,245,251,.80)) !important;
  border: 1.5px solid var(--lb-glass-gold) !important;
  color: var(--lb-navy) !important;
  box-shadow: 0 14px 30px rgba(42,61,83,.11), inset 0 1px 0 rgba(255,255,255,.90) !important;
}

/* No duplicate prompt set in the conversation stream. */
html body .ask-chat-body > .ask-chat-prompts,
html body.lb-chat-open .ask-chat-body > .ask-chat-prompts {
  display: none !important;
}

html body .ask-chat-prompt-dock,
html body.lb-chat-open .ask-chat-prompt-dock {
  position: relative !important;
  z-index: 4 !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
  width: min(760px, calc(100% - 60px)) !important;
  margin: 0 auto !important;
  padding: 18px 0 18px !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
  flex: 0 0 auto !important;
}

html body .ask-chat-backdrop.ask-chat-conversation-active .ask-chat-prompt-dock {
  display: none !important;
}

html body .ask-chat-prompt-dock button,
html body.lb-chat-open .ask-chat-prompt-dock button {
  appearance: none !important;
  -webkit-appearance: none !important;
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 9px !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 112px !important;
  padding: 14px 10px 13px !important;
  border-radius: 28px !important;
  border: 1.5px solid var(--lb-glass-gold) !important;
  background:
    radial-gradient(circle at 50% 14%, rgba(255,255,255,.92), transparent 42%),
    linear-gradient(180deg, rgba(255,255,255,.86), rgba(235,244,250,.72)) !important;
  box-shadow: 0 14px 32px rgba(43,61,82,.12), inset 0 1px 0 rgba(255,255,255,.90) !important;
  color: var(--lb-navy) !important;
  font-family: inherit !important;
  font-weight: 950 !important;
  text-align: center !important;
  text-shadow: none !important;
  cursor: pointer !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
}

html body .ask-chat-prompt-dock button .ask-chat-quick-icon,
html body.lb-chat-open .ask-chat-prompt-dock button .ask-chat-quick-icon {
  display: grid !important;
  place-items: center !important;
  width: 42px !important;
  height: 42px !important;
  border-radius: 999px !important;
  color: var(--lb-navy) !important;
  font-size: 25px !important;
  line-height: 1 !important;
  background: radial-gradient(circle at 50% 28%, rgba(255,255,255,.95), rgba(233,241,247,.72)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.90), 0 8px 18px rgba(43,61,82,.10) !important;
}

html body .ask-chat-prompt-dock button .ask-chat-quick-label,
html body.lb-chat-open .ask-chat-prompt-dock button .ask-chat-quick-label {
  display: block !important;
  color: var(--lb-navy) !important;
  font-size: clamp(12px, 3vw, 15px) !important;
  font-weight: 950 !important;
  letter-spacing: .03em !important;
  line-height: 1.05 !important;
  text-transform: uppercase !important;
  white-space: normal !important;
}

html body .ask-chat-form,
html body.lb-chat-open .ask-chat-form {
  position: relative !important;
  z-index: 5 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 12px !important;
  width: 100% !important;
  padding: 14px 30px calc(14px + env(safe-area-inset-bottom)) !important;
  background: linear-gradient(180deg, rgba(240,248,252,.76), rgba(230,240,247,.94)) !important;
  border-top: 1px solid rgba(201,154,46,.34) !important;
  box-shadow: 0 -20px 40px rgba(54,72,92,.10) !important;
  flex: 0 0 auto !important;
}

html body .ask-chat-form textarea,
html body.lb-chat-open .ask-chat-form textarea {
  min-height: 60px !important;
  max-height: 112px !important;
  resize: none !important;
  border-radius: 24px !important;
  border: 1.5px solid var(--lb-glass-gold) !important;
  background: rgba(255,255,255,.86) !important;
  color: var(--lb-navy) !important;
  padding: 15px 18px !important;
  font-family: inherit !important;
  font-size: 20px !important;
  font-weight: 850 !important;
  line-height: 1.18 !important;
  outline: none !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.90), 0 10px 24px rgba(43,61,82,.08) !important;
}

html body .ask-chat-form textarea::placeholder,
html body.lb-chat-open .ask-chat-form textarea::placeholder {
  color: rgba(7,19,38,.34) !important;
}

html body .ask-chat-form button,
html body.lb-chat-open .ask-chat-form button {
  min-width: 92px !important;
  min-height: 60px !important;
  border-radius: 24px !important;
  border: 1.5px solid var(--lb-glass-gold) !important;
  background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(237,246,252,.74)) !important;
  color: var(--lb-navy) !important;
  font-family: inherit !important;
  font-size: 20px !important;
  font-weight: 950 !important;
  box-shadow: 0 10px 24px rgba(43,61,82,.10), inset 0 1px 0 rgba(255,255,255,.90) !important;
}

html body .ask-chat-form button:disabled {
  opacity: .58 !important;
}

/* Keyboard mode: the panel uses visualViewport height from JS; reduce ornamental space
   and keep the input dock attached immediately above the iOS keyboard. */
html body .ask-chat-backdrop.keyboard-active .ask-chat-header {
  padding-top: calc(10px + env(safe-area-inset-top)) !important;
  padding-bottom: 12px !important;
  min-height: calc(104px + env(safe-area-inset-top)) !important;
}

html body .ask-chat-backdrop.keyboard-active .ask-chat-header h2 {
  font-size: clamp(34px, 9vw, 52px) !important;
}

html body .ask-chat-backdrop.keyboard-active .ask-chat-header .eyebrow {
  font-size: 12px !important;
}

html body .ask-chat-backdrop.keyboard-active .ask-chat-new,
html body .ask-chat-backdrop.keyboard-active .ask-chat-close {
  width: 68px !important;
  height: 68px !important;
  min-width: 68px !important;
  min-height: 68px !important;
}

html body .ask-chat-backdrop.keyboard-active .ask-chat-prompt-dock {
  display: none !important;
}

html body .ask-chat-backdrop.keyboard-active .ask-chat-body {
  padding-top: 18px !important;
  padding-bottom: 18px !important;
}

@media (max-width: 760px) {
  html body .ask-chat-header,
  html body.lb-chat-open .ask-chat-header {
    padding-left: 26px !important;
    padding-right: 26px !important;
  }

  html body .ask-chat-new,
  html body .ask-chat-close,
  html body.lb-chat-open .ask-chat-new,
  html body.lb-chat-open .ask-chat-close {
    width: 76px !important;
    height: 76px !important;
    min-width: 76px !important;
    min-height: 76px !important;
    font-size: 24px !important;
  }

  html body .ask-chat-close,
  html body.lb-chat-open .ask-chat-close {
    font-size: 52px !important;
  }

  html body .ask-chat-body,
  html body.lb-chat-open .ask-chat-body {
    padding-left: 26px !important;
    padding-right: 26px !important;
  }

  html body .ask-chat-message,
  html body.lb-chat-open .ask-chat-message {
    max-width: 88% !important;
    padding: 17px 18px !important;
  }

  html body .ask-chat-prompt-dock,
  html body.lb-chat-open .ask-chat-prompt-dock {
    width: calc(100% - 52px) !important;
    gap: 12px !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
  }

  html body .ask-chat-prompt-dock button,
  html body.lb-chat-open .ask-chat-prompt-dock button {
    min-height: 104px !important;
    border-radius: 24px !important;
  }

  html body .ask-chat-form,
  html body.lb-chat-open .ask-chat-form {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
}
