/* LawyerNow support chat widget */
.support-btn { display: inline-flex; align-items: center; gap: 7px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 99px; padding: 4px 12px 4px 5px; font-size: 14px; font-weight: 500; color: var(--ink); transition: border-color .15s, transform .15s; }
.support-btn:hover { border-color: var(--ink); transform: translateY(-1px); }
.support-btn img { width: 24px; height: 24px; border-radius: 50%; }
.support-btn .live { width: 7px; height: 7px; border-radius: 50%; background: #1FA463; box-shadow: 0 0 0 3px rgba(31,164,99,.18); }

.support { position: fixed; z-index: 70; inset-block-end: 20px; inset-inline-end: 20px; width: min(380px, calc(100vw - 24px)); height: min(580px, calc(100dvh - 40px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 24px 80px rgba(21,23,26,.22); overflow: hidden; animation: pop .28s cubic-bezier(.2,.8,.2,1) both; }
.support-head { display: flex; align-items: center; gap: 11px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--paper); }
.support-head .face { position: relative; flex: none; }
.support-head .face img { width: 42px; height: 42px; border-radius: 50%; display: block; }
.support-head .face::after { content: ""; position: absolute; inset-block-end: 0; inset-inline-end: 0; width: 11px; height: 11px; border-radius: 50%; background: #1FA463; border: 2px solid var(--paper); }
.support-head .id { flex: 1; min-width: 0; line-height: 1.3; }
.support-head .id b { display: block; font-weight: 600; }
.support-head .id span { font-size: 12.5px; color: var(--muted); }
.support-head .x { border: 0; background: var(--tint); width: 32px; height: 32px; border-radius: 50%; font-size: 17px; line-height: 1; }

.support-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; overflow-anchor: none; }
.s-msg { display: flex; gap: 8px; align-items: flex-end; max-width: 88%; animation: rise .25s ease both; }
.s-msg img { width: 26px; height: 26px; border-radius: 50%; flex: none; }
.s-msg .b { padding: 9px 13px; border-radius: 18px; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
.s-msg.agent { align-self: flex-start; }
.s-msg.agent .b { background: var(--tint); border-end-start-radius: 6px; }
.s-msg.agent + .s-msg.agent img { visibility: hidden; }
.s-msg.user { align-self: flex-end; }
.s-msg.user .b { background: var(--ink); color: #fff; border-end-end-radius: 6px; }
.s-msg .b a { color: var(--green); }
.s-typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.s-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.1s infinite; }
.s-typing i:nth-child(2) { animation-delay: .15s; }
.s-typing i:nth-child(3) { animation-delay: .3s; }

.support-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; }
.support-quick button { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 99px; padding: 5px 12px; font-size: 13.5px; color: var(--ink-2); transition: border-color .15s, color .15s; }
.support-quick button:hover { border-color: var(--ink); color: var(--ink); }
.support-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.support-form textarea { flex: 1; min-width: 0; border: 1px solid var(--line-strong); border-radius: 18px; padding: 9px 13px; resize: none; outline: 0; max-height: 110px; line-height: 1.45; background: var(--paper); font-size: 15px; }
.support-form textarea:focus { border-color: var(--ink); background: #fff; }
.support-form button { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; display: grid; place-items: center; }
.support-form button:disabled { background: var(--line-strong); cursor: default; }
.support-note { font-size: 11.5px; color: var(--muted); text-align: center; margin: 0; padding: 0 12px 10px; }

@media (max-width: 720px) {
  .support { inset: 0; width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
  .support-btn span.t { display: none; }
  .support-btn { padding: 4px 8px 4px 5px; }
}

/* Phones: the support chat is a full screen of its own, sized to what is visible so the keyboard never covers the message box. */
@media (max-width: 720px) {
  .support { inset: 0 0 auto 0; height: var(--app-h, 100dvh); animation: sheet .28s cubic-bezier(.2,.8,.2,1) both; }
  .support-head { padding-top: calc(12px + env(safe-area-inset-top)); }
  .support-head .x { width: 38px; height: 38px; font-size: 20px; }
  .support-form { padding-bottom: 8px; }
  .support-form textarea { font-size: 16px; } /* below 16px iOS zooms the page when the field is tapped */
  .support-form button { width: 42px; height: 42px; }
  .support-note { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .support-quick button { padding: 8px 14px; font-size: 14.5px; }
  .s-msg .b { font-size: 16px; }
}
@keyframes sheet { from { transform: translateY(24px); opacity: 0; } }

/* Same sides as the main chat: the person on the right, the assistant on the left. */
.s-msg.user { align-self: flex-start; }
.s-msg.user .b { border-end-end-radius: 18px; border-end-start-radius: 6px; }
.s-msg.agent { align-self: flex-end; flex-direction: row-reverse; }
.s-msg.agent .b { border-end-start-radius: 18px; border-end-end-radius: 6px; }
