/* ==========================================================================
   BEL-AIR public site — "Chat with us" panel (behaviour in js/public/chat.js)
   A glass panel in the dark cinema: warm white type, gold for the live
   officer, DM Mono labels. Docked bottom-right; a full sheet on phones.
   ========================================================================== */
.chat { position: fixed; inset: auto 1.5rem 1.5rem auto; margin: 0; width: min(100% - 2rem, 26rem); height: min(100vh - 3rem, 40rem); display: none; flex-direction: column; background: var(--panel); color: var(--ink); border: 1px solid var(--glass-line); border-radius: var(--r-photo); box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .9); overflow: hidden; }
.chat[open] { display: flex; }
.chat::backdrop { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.chat__head { display: flex; justify-content: space-between; align-items: start; gap: 1rem; padding: 1rem 1rem .9rem 1.1rem; border-bottom: 1px solid var(--glass-line); background: var(--panel-2); }
.chat__who { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.chat__seal { width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--white); flex: none; }
.chat__head h2 { font-family: var(--font-display); font-size: 1.35rem; line-height: 1.05; }
.chat__status { font-family: var(--font-mono); font-size: var(--t-xs); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-top: .25rem; }
.chat.is-onduty .chat__status { color: var(--gold); }
.chat__x { width: 2.75rem; height: 2.75rem; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: var(--r-ui); font-size: 1.1rem; flex: none; }
.chat__body { flex: 1; min-height: 0; overflow-y: auto; padding: 1rem 1.1rem; }
.chat__lead { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: .9rem; }
.chat__card { display: flex; align-items: center; gap: .85rem; width: 100%; text-align: left; padding: .85rem .9rem; margin-bottom: .6rem; border: 1px solid var(--glass-line); border-radius: var(--r-ui); background: var(--night-2); transition: border-color var(--d-micro), transform var(--d-micro) var(--ease-premium); }
.chat__card:hover { border-color: var(--gold); transform: translateY(-1px); }
.chat__card-text { display: block; min-width: 0; }
.chat__card b { display: block; font-weight: 700; }
.chat__card small { display: block; color: var(--ink-3); font-size: var(--t-sm); margin-top: .15rem; }
.chat__ava { width: 2.5rem; height: 2.5rem; flex: none; display: grid; place-items: center; border-radius: 50%; font-family: var(--font-display); font-size: 1.2rem; color: var(--night); }
.chat__ava--bot { background: var(--gold); }
.chat__ava--officer { background: var(--blue); color: var(--on-blue); }
.chat__dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--ink-3); box-shadow: 0 0 0 2px var(--night-2); }
.chat.is-onduty .chat__dot { background: var(--gold); box-shadow: 0 0 0 2px var(--night-2), 0 0 12px rgba(255, 210, 63, .7); }
.chat__link { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 700; color: var(--gold); text-decoration: none; }
.chat__link:hover { text-decoration: underline; text-underline-offset: .2em; }
.chat__thread { display: flex; flex-direction: column; gap: .7rem; }
.msg { max-width: 88%; padding: .6rem .8rem; border-radius: var(--r-ui); border: 1px solid var(--glass-line); background: var(--night-2); line-height: 1.45; font-size: 1rem; }
.msg p { margin: 0; }
.msg__who { display: block; font-family: var(--font-mono); font-size: var(--t-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .25rem; }
.msg--me { align-self: flex-end; background: var(--ink); color: var(--night); border-color: var(--ink); }
.msg--me .msg__who { color: rgba(7, 11, 20, .82); }
.msg--officer { border-left: 3px solid var(--gold); }
.msg--officer .msg__who { color: var(--gold); }
.msg--sys { align-self: center; max-width: 100%; background: none; border: 0; border-top: 1px solid var(--glass-line); border-radius: 0; text-align: center; font-family: var(--font-mono); font-size: var(--t-sm); letter-spacing: .02em; color: var(--ink-3); padding: .6rem .5rem 0; }
.msg--typing { display: inline-flex; gap: .3rem; align-items: center; padding: .7rem .8rem; }
.msg--typing span { width: .4rem; height: .4rem; border-radius: 50%; background: var(--ink-3); animation: chat-dot 1.2s infinite ease-in-out; }
.msg--typing span:nth-child(2) { animation-delay: .2s; } .msg--typing span:nth-child(3) { animation-delay: .4s; }
@keyframes chat-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.chat__chips { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 1.1rem .6rem; }
.chat__chips button { min-height: 2.75rem; padding: 0 .9rem; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 1rem; font-weight: 700; color: var(--ink); transition: background var(--d-micro), color var(--d-micro); }
.chat__chips button:hover { background: var(--gold); color: var(--night); border-color: var(--gold); }
.chat__form { display: flex; gap: .5rem; padding: .6rem 1.1rem; border-top: 1px solid var(--glass-line); }
.chat__form input { flex: 1; min-width: 0; min-height: 2.75rem; padding: 0 .9rem; border: 1px solid var(--line-strong); border-radius: var(--r-ui); background: var(--night-2); font: inherit; font-size: 1rem; color: var(--ink); }
.chat__form input::placeholder { color: var(--ink-3); opacity: 1; }
.chat__form input:focus { border-color: var(--gold); } /* plus the global 3 px gold :focus-visible ring */
.chat__send { width: 2.75rem; min-height: 2.75rem; flex: none; border-radius: var(--r-ui); background: var(--gold); color: var(--night); font-size: 1.1rem; font-weight: 700; }
.chat__send:hover { background: var(--ink); }
.chat__foot { display: flex; flex-wrap: wrap; gap: .25rem 1rem; align-items: center; padding: .5rem 1.1rem .7rem; font-family: var(--font-mono); font-size: var(--t-xs); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.chat__back { font: inherit; font-size: var(--t-sm); letter-spacing: 0; text-transform: none; color: var(--ink-3); text-decoration: underline; text-underline-offset: .2em; min-height: 2.75rem; }
.chat__back:hover { color: var(--gold); }
.chat__back { margin-left: auto; }
/* phones (<= 900 px): no floating pill; the chat opens from the bottom bar (BRD M2-SHELL-21, -60). The mock re-showed it here. */
@media (max-width: 600px) {
  .chat { inset: 0; width: 100%; height: 100%; border: 0; border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) { .msg--typing span { animation: none; opacity: .6; } }
/* a short window (a phone on its side, or 400 % zoom): the quick replies keep to one scrolling row so the conversation keeps its room */
@media (max-height: 420px) { .chat__chips { flex-wrap: nowrap; overflow-x: auto; } .chat__chips button { flex: none; } }
