/* Ask J chat widget. Phone first; brand colors come from styles.css. */
.askj-launch {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 60;
  display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 5px 18px 5px 5px;
  background: var(--navy); color: var(--alabaster); border: 2px solid #FFFFFF; border-radius: 999px; cursor: pointer;
  font: 700 17px/1 var(--sans); letter-spacing: .01em; box-shadow: 0 10px 28px rgba(26,42,58,.28);
  transition: transform .2s ease, box-shadow .2s ease;
}
.askj-launch:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(26,42,58,.34); }
.askj-launch img { width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--gold); object-fit: cover; background: #E8D5B9; }
.askj-launch .askj-j { color: var(--gold); }
.askj-launch[aria-expanded="true"] { display: none; }

.askj-panel {
  position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column;
  background: var(--alabaster); color: var(--charcoal);
  height: 100dvh; transform: translateY(100%); transition: transform .28s cubic-bezier(.2,.8,.2,1);
}
.askj-panel.open { transform: none; }
@media (prefers-reduced-motion: reduce) { .askj-panel, .askj-launch { transition: none; } }
@media (min-width: 720px) {
  .askj-panel { inset: auto 24px 24px auto; width: 410px; height: min(680px, calc(100dvh - 48px)); border-radius: 22px; overflow: hidden; box-shadow: 0 24px 60px rgba(26,42,58,.32); transform: translateY(24px); opacity: 0; pointer-events: none; transition: transform .22s ease, opacity .22s ease; }
  .askj-panel.open { transform: none; opacity: 1; pointer-events: auto; }
}

.askj-head { display: flex; align-items: center; gap: 12px; padding: 12px 8px 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); background: var(--navy); color: var(--alabaster); }
.askj-head img { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--gold); object-fit: cover; flex: none; }
.askj-title { flex: 1; min-width: 0; }
.askj-title strong { display: block; font: 700 20px/1.1 var(--serif); }
.askj-title strong span { color: var(--gold); }
.askj-title small { display: block; font-size: 13px; line-height: 1.3; color: #C9D3DA; margin-top: 2px; }
.askj-icon { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 0; border-radius: 12px; background: transparent; color: inherit; cursor: pointer; }
.askj-icon:hover { background: rgba(255,255,255,.1); }
.askj-icon svg { width: 22px; height: 22px; }

.askj-log { flex: 1; overflow-y: auto; padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 14px; overscroll-behavior: contain; }
.askj-msg { max-width: 88%; font-size: 16px; line-height: 1.55; }
.askj-msg p + p { margin-top: .7em; }
.askj-msg a { color: var(--sage); font-weight: 700; text-underline-offset: 2px; }
.askj-msg.j { align-self: flex-start; background: #fff; border: 1px solid #E1E6EA; border-radius: 4px 18px 18px 18px; padding: 12px 15px; }
.askj-msg.you { align-self: flex-end; background: var(--navy); color: var(--alabaster); border-radius: 18px 4px 18px 18px; padding: 10px 15px; white-space: pre-wrap; }
.askj-msg sup { font-size: 11px; font-weight: 800; color: var(--sage); margin-left: 1px; }
.askj-msg.err { align-self: center; background: var(--pearl); border-radius: 12px; padding: 10px 14px; font-size: 14px; color: var(--charcoal); text-align: center; }
.askj-typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.askj-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--sage); opacity: .4; animation: askjdot 1s infinite ease-in-out; }
.askj-typing i:nth-child(2) { animation-delay: .15s; } .askj-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes askjdot { 50% { opacity: 1; transform: translateY(-3px); } }

.askj-src { margin-top: 10px; border-top: 1px solid var(--pearl); padding-top: 8px; }
.askj-src summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--sage); min-height: 32px; display: flex; align-items: center; list-style: none; }
.askj-src summary::-webkit-details-marker { display: none; }
.askj-src summary::before { content: '＋'; margin-right: 6px; }
.askj-src[open] summary::before { content: '－'; }
.askj-src ol { margin: 4px 0 0; padding-left: 20px; font-size: 13px; line-height: 1.45; color: #5A6070; }
.askj-src li + li { margin-top: 3px; }

.askj-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 10px; }
.askj-chip { min-height: 44px; padding: 9px 14px; border: 1.5px solid var(--sage); border-radius: 999px; background: #fff; color: var(--navy); font: 600 15px/1.25 var(--sans); text-align: left; cursor: pointer; }
.askj-chip:hover { background: var(--pearl); }

.askj-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; padding-bottom: max(10px, env(safe-area-inset-bottom)); border-top: 1px solid #E1E6EA; background: #fff; }
.askj-form textarea { flex: 1; height: 46px; min-height: 46px; overflow-y: auto; max-height: 140px; resize: none; padding: 11px 14px; border: 1.5px solid #CBD3DA; border-radius: 16px; font: 16px/21px var(--sans); color: var(--charcoal); background: var(--alabaster); }
.askj-form textarea:focus { outline: none; border-color: var(--sage); }
.askj-send { width: 46px; height: 46px; flex: none; border: 0; border-radius: 50%; background: var(--gold); color: var(--navy); display: grid; place-items: center; cursor: pointer; }
.askj-send:disabled { opacity: .45; cursor: default; }
.askj-send svg { width: 22px; height: 22px; }
.askj-note { padding: 0 16px 10px; background: #fff; font-size: 12px; line-height: 1.4; color: #5A6070; }
.askj-note a { color: inherit; }
