/* London Baby 2026 - Ask Chat mobile glass grid fix
   Purpose: apply the unified Apple/glass system to the MOBILE Ask Chat module,
   remove duplicate top shortcut chips, and convert the remaining shortcut dock
   into a fixed centered 2x2 grid without changing Ask Chat functionality. */
:root {
  --lb-navy: #071326;
  --lb-muted: #667186;
  --lb-baby-gold: #c99a2e;
  --lb-glass-white: rgba(255,255,255,.74);
  --lb-glass-white-strong: rgba(255,255,255,.88);
  --lb-glass-border: rgba(201,154,46,.48);
  --lb-glass-shadow: 0 18px 48px rgba(35,48,70,.16), inset 0 1px 0 rgba(255,255,255,.82);
}

/* Remove the duplicate prompt buttons that render inside the message body. */
html body .ask-chat-body > .ask-chat-prompts,
html body.lb-chat-open .ask-chat-body > .ask-chat-prompts {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* Shared Ask Chat refinement, deliberately loaded after previous module CSS. */
html body .ask-chat-backdrop,
html body.lb-chat-open .ask-chat-backdrop {
  background:
    radial-gradient(circle at 16% 10%, rgba(255,255,255,.92), transparent 32%),
    radial-gradient(circle at 84% 0%, rgba(185,217,236,.72), transparent 36%),
    linear-gradient(180deg, #eef6fb 0%, #dce8f1 48%, #c9d4dd 100%) !important;
  backdrop-filter: blur(18px) saturate(1.08) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.08) !important;
}

html body .ask-chat-panel,
html body.lb-chat-open .ask-chat-panel {
  background:
    linear-gradient(180deg, rgba(255,255,255,.82), rgba(239,247,252,.70) 45%, rgba(218,228,237,.76)) !important;
  color: var(--lb-navy) !important;
  border-color: rgba(201,154,46,.40) !important;
  box-shadow: var(--lb-glass-shadow) !important;
}

html body .ask-chat-header,
html body.lb-chat-open .ask-chat-header {
  background:
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(241,248,252,.72)) !important;
  border-bottom: 1px solid rgba(201,154,46,.35) !important;
  color: var(--lb-navy) !important;
}

html body .ask-chat-header .eyebrow,
html body.lb-chat-open .ask-chat-header .eyebrow {
  color: rgba(7,19,38,.62) !important;
  text-transform: uppercase !important;
  letter-spacing: .18em !important;
  font-weight: 900 !important;
}

html body .ask-chat-header h2,
html body.lb-chat-open .ask-chat-header h2 {
  color: var(--lb-navy) !important;
  text-shadow: none !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 {
  color: var(--lb-navy) !important;
  background: linear-gradient(180deg, rgba(255,255,255,.90), rgba(240,247,251,.68)) !important;
  border: 1.5px solid var(--lb-glass-border) !important;
  box-shadow: 0 10px 26px rgba(35,48,70,.14), inset 0 1px 0 rgba(255,255,255,.88) !important;
}

html body .ask-chat-assistant,
html body.lb-chat-open .ask-chat-assistant {
  background: rgba(255,255,255,.78) !important;
  border: 1px solid rgba(201,154,46,.42) !important;
  color: var(--lb-navy) !important;
  box-shadow: 0 12px 28px rgba(35,48,70,.12), inset 0 1px 0 rgba(255,255,255,.82) !important;
}

html body .ask-chat-user,
html body.lb-chat-open .ask-chat-user {
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(236,244,249,.78)) !important;
  border: 1px solid rgba(201,154,46,.46) !important;
  color: var(--lb-navy) !important;
  box-shadow: 0 12px 28px rgba(35,48,70,.13), inset 0 1px 0 rgba(255,255,255,.86) !important;
}

/* The one remaining prompt control system: bottom dock, fixed visually as a centered 2x2 grid. */
html body .ask-chat-prompt-dock,
html body.lb-chat-open .ask-chat-prompt-dock {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
  overflow: visible !important;
  -webkit-overflow-scrolling: auto !important;
  scrollbar-width: none !important;
  width: min(680px, calc(100% - 36px)) !important;
  align-self: center !important;
  margin: 0 auto !important;
  padding: 14px 0 12px !important;
  border-top: 0 !important;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  flex: 0 0 auto !important;
}

html body .ask-chat-prompt-dock::-webkit-scrollbar,
html body.lb-chat-open .ask-chat-prompt-dock::-webkit-scrollbar {
  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;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 56px !important;
  padding: 0 12px !important;
  border-radius: 22px !important;
  border: 1.5px solid var(--lb-glass-border) !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,.90), rgba(240,247,251,.72)) !important;
  color: var(--lb-navy) !important;
  font-family: inherit !important;
  font-size: clamp(14px, 3.35vw, 17px) !important;
  font-weight: 900 !important;
  line-height: 1.05 !important;
  letter-spacing: -.015em !important;
  text-align: center !important;
  white-space: normal !important;
  box-shadow: 0 12px 28px rgba(35,48,70,.12), inset 0 1px 0 rgba(255,255,255,.86) !important;
  text-shadow: none !important;
}

html body .ask-chat-prompt-dock button:active,
html body.lb-chat-open .ask-chat-prompt-dock button:active {
  transform: scale(.985) !important;
  box-shadow: 0 7px 18px rgba(35,48,70,.12), inset 0 1px 0 rgba(255,255,255,.86) !important;
}

html body .ask-chat-form,
html body.lb-chat-open .ask-chat-form {
  background:
    linear-gradient(180deg, rgba(255,255,255,.78), rgba(232,241,247,.88)) !important;
  border-top: 1px solid rgba(201,154,46,.36) !important;
  box-shadow: 0 -16px 38px rgba(35,48,70,.10) !important;
}

html body .ask-chat-form textarea,
html body.lb-chat-open .ask-chat-form textarea {
  background: rgba(255,255,255,.86) !important;
  border: 1.5px solid rgba(201,154,46,.42) !important;
  color: var(--lb-navy) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.86), 0 10px 24px rgba(35,48,70,.10) !important;
}

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

html body .ask-chat-form button,
html body.lb-chat-open .ask-chat-form button {
  background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(238,246,251,.72)) !important;
  border: 1.5px solid var(--lb-glass-border) !important;
  color: var(--lb-navy) !important;
  box-shadow: 0 10px 24px rgba(35,48,70,.12), inset 0 1px 0 rgba(255,255,255,.86) !important;
}

body.lb-chat-open::after {
  background: linear-gradient(to top, rgba(231,240,247,.98), rgba(231,240,247,0)) !important;
}

@media (max-width: 760px) {
  html body.lb-chat-open .ask-chat-body {
    padding: 14px 16px 18px !important;
  }

  html body.lb-chat-open .ask-chat-message.ask-chat-assistant {
    max-width: min(88%, 620px) !important;
  }

  html body.lb-chat-open .ask-chat-prompt-dock {
    width: calc(100% - 32px) !important;
    max-width: 520px !important;
    gap: 10px !important;
    padding: 12px 0 12px !important;
  }

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

  html body.lb-chat-open .ask-chat-form {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 10px !important;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom)) !important;
  }

  html body.lb-chat-open .ask-chat-form textarea {
    border-radius: 22px !important;
  }

  html body.lb-chat-open .ask-chat-form button {
    border-radius: 22px !important;
    min-width: 74px !important;
  }
}
