/* ArcherWorks — live chat widget */
.chat { position: fixed; right: 20px; bottom: 20px; z-index: 70; display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.chat__launch { width: 58px; height: 58px; border-radius: 50%; border: 0; background: var(--navy); color: var(--white); display: grid; place-items: center; cursor: pointer; box-shadow: 0 10px 24px -8px rgba(11,23,54,.6); transition: background-color .15s, transform .15s; }
.chat__launch:hover { background: var(--navy-deep); transform: translateY(-1px); }
.chat__panel { width: 360px; max-width: calc(100vw - 32px); max-height: min(600px, calc(100dvh - 120px)); background: var(--white); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 24px 48px -16px rgba(11,23,54,.4); font-size: .95rem; }
.chat__panel[hidden], .chat__form[hidden], .chat__thread[hidden] { display: none; }
.chat__head { background: var(--navy); color: var(--white); padding: 16px 18px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.chat__head strong { display: block; font-family: var(--display); font-size: 1.08rem; font-weight: 600; }
.chat__status { display: block; color: #C3CCE3; font-size: .86rem; margin-top: 2px; }
.chat__close { background: none; border: 0; color: var(--white); padding: 6px; margin: -4px -6px 0 0; border-radius: 8px; cursor: pointer; }
.chat__close:hover { background: rgba(255,255,255,.14); }
.chat__close:focus-visible { outline-color: var(--amber); }
.chat__form { padding: 18px; display: grid; gap: 14px; overflow-y: auto; }
.chat__form label { display: grid; gap: 6px; font-weight: 600; font-size: .9rem; color: var(--navy); }
.chat__form input, .chat__form textarea, .chat__send input { font: inherit; font-weight: 400; color: var(--ink); padding: 10px 12px; border: 1px solid #C5CCDB; border-radius: 9px; width: 100%; background: var(--white); }
.chat__form textarea { resize: none; }
.chat__form input:focus, .chat__form textarea:focus, .chat__send input:focus { outline: 3px solid rgba(39,71,199,.3); border-color: var(--cobalt); }
.chat__fine { font-size: .8rem; color: var(--slate); text-align: center; }
.chat__thread { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.chat__log { flex: 1; min-height: 260px; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; background: #F7F8FB; }
.chat__msg { max-width: 85%; padding: 9px 13px; border-radius: 14px; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; }
.chat__msg--me { align-self: flex-end; background: var(--navy); color: var(--white); border-bottom-right-radius: 4px; }
.chat__msg--note { align-self: center; max-width: 100%; text-align: center; font-size: .84rem; color: var(--slate); padding: 0; }
.chat__waiting { display: flex; align-items: center; gap: 10px; align-self: flex-start; background: var(--white); border: 1px solid var(--line); border-radius: 14px; border-bottom-left-radius: 4px; padding: 9px 13px; color: var(--slate); font-size: .9rem; }
.chat__dots { display: inline-flex; gap: 4px; }
.chat__dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--slate); animation: chat-dot 1.2s infinite ease-in-out; }
.chat__dots i:nth-child(2) { animation-delay: .15s; }
.chat__dots i:nth-child(3) { animation-delay: .3s; }
@keyframes chat-dot { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }
.chat__send { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--white); }
.chat__send button { flex: none; width: 42px; height: 42px; border-radius: 9px; border: 0; background: var(--amber); color: var(--navy-deep); display: grid; place-items: center; cursor: pointer; }
.chat__send button:hover { background: var(--amber-deep); }
@media (max-width: 460px) { .chat { right: 16px; bottom: 16px; } }
@media (prefers-reduced-motion: reduce) { .chat__dots i { animation: none; opacity: .6; } }
