/* HatchDesk theme: "Ask HatchDesk" assistant (Views/Shared/_Assistant.cshtml). Loaded without blocking by the partial. */

.hd.hd-as { position: fixed; right: 20px; bottom: 20px; z-index: 1030; display: flex; flex-direction: column-reverse; align-items: flex-end; gap: 12px; pointer-events: none; }
.hd.hd-as > * { pointer-events: auto; }
.hd.hd-as template { display: none; }

/* launcher */
.hd .hd-as-fab { display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 22px 0 8px; border-radius: 999px; background: var(--hd-ink); font-family: var(--hd-display); font-size: 15px; font-weight: 700; color: #fff; box-shadow: 0 18px 40px -14px rgba(11, 16, 32, .6), 0 0 0 1px rgba(255, 255, 255, .08) inset; transition: transform .3s var(--hd-ease), background-color .25s; animation: hd-as-in .6s 1.2s var(--hd-ease) both; }
.hd .hd-as-fab:hover { transform: translateY(-2px); background: #141b33; }
.hd .hd-as-fab-ic { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; background: var(--hd-lime); color: var(--hd-ink); font-size: 16px; }
.hd .hd-as-fab-ic::after { content: ""; position: absolute; inset: -4px; border-radius: inherit; border: 2px solid var(--hd-lime); opacity: 0; animation: hd-as-ping 3s 2s ease-out infinite; }
.hd.hd-as.is-open .hd-as-fab-ic::after { animation: none; }

/* panel */
.hd .hd-as-panel { display: flex; flex-direction: column; width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 120px)); overflow: hidden; border-radius: 24px; background: #fff; box-shadow: 0 40px 80px -24px rgba(11, 16, 32, .5), 0 0 0 1px rgba(11, 16, 32, .06); transform-origin: 100% 100%; animation: hd-as-pop .35s var(--hd-ease); }
.hd .hd-as-panel[hidden] { display: none; }
.hd .hd-as-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 16px 18px; background: var(--hd-grad); color: #fff; }
.hd .hd-as-av { display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 14px; background: var(--hd-lime); font-family: var(--hd-display); font-size: 13px; font-weight: 800; color: var(--hd-ink); }
.hd .hd-as-head p { font-family: var(--hd-display); font-size: 16px; font-weight: 700; color: #fff; }
.hd .hd-as-head small { display: flex; align-items: center; gap: 6px; font-size: 12px; color: rgba(255, 255, 255, .85); }
.hd .hd-as-head small i { width: 7px; height: 7px; border-radius: 999px; background: #34D399; box-shadow: 0 0 0 3px rgba(52, 211, 153, .25); }
.hd .hd-as-x { display: grid; place-items: center; width: 36px; height: 36px; margin-left: auto; border-radius: 999px; background: rgba(255, 255, 255, .15); color: #fff; transition: background-color .2s; }
.hd .hd-as-x:hover { background: rgba(255, 255, 255, .28); }

.hd .hd-as-log { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 18px 16px 8px; overflow-y: auto; overscroll-behavior: contain; background: var(--hd-paper); }
.hd .hd-as-msg { max-width: 88%; padding: 11px 14px; border-radius: 16px; font-size: 14px; line-height: 1.55; animation: hd-as-msg .3s var(--hd-ease); }
.hd .hd-as-msg.is-bot { align-self: flex-start; border-bottom-left-radius: 6px; background: #fff; color: rgba(11, 16, 32, .82); box-shadow: 0 0 0 1px rgba(11, 16, 32, .05); }
.hd .hd-as-msg.is-me { align-self: flex-end; border-bottom-right-radius: 6px; background: var(--hd-ink); color: #fff; }
.hd .hd-as-msg b { color: var(--hd-ink); font-weight: 700; }
.hd .hd-as-msg.is-typing { display: flex; gap: 4px; padding: 14px; }
.hd .hd-as-msg.is-typing::before, .hd .hd-as-msg.is-typing::after, .hd .hd-as-msg.is-typing span { content: ""; width: 6px; height: 6px; border-radius: 999px; background: rgba(11, 16, 32, .35); animation: hd-dot 1.2s infinite; }
.hd .hd-as-msg.is-typing span { animation-delay: .2s; }
.hd .hd-as-msg.is-typing::after { animation-delay: .4s; }
.hd .hd-as-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-family: var(--hd-display); font-size: 13.5px; font-weight: 700; color: var(--hd-brand); }
.hd .hd-as-link i { font-size: 10px; transition: transform .25s var(--hd-ease); }
.hd .hd-as-link:hover { color: var(--hd-indigo); }
.hd .hd-as-link:hover i { transform: translateX(3px); }
.hd .hd-as-acts { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.hd .hd-as-link.is-ghost { color: rgba(11, 16, 32, .65); }

.hd .hd-as-chips { display: flex; gap: 6px; padding: 10px 12px; overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--hd-line); background: #fff; }
.hd .hd-as-chips::-webkit-scrollbar { display: none; }
.hd .hd-as-chips button { flex-shrink: 0; padding: 8px 12px; border-radius: 999px; border: 1px solid rgba(11, 16, 32, .12); font-size: 12.5px; font-weight: 500; color: var(--hd-ink); white-space: nowrap; transition: border-color .2s, background-color .2s; }
.hd .hd-as-chips button:hover { border-color: var(--hd-brand); background: rgba(15, 117, 189, .06); }
.hd .hd-as-chips button.is-human { border-color: var(--hd-ink); background: var(--hd-ink); color: #fff; }
.hd .hd-as-chips button.is-human i { margin-right: 4px; }

.hd .hd-as-form { display: flex; align-items: center; gap: 8px; padding: 10px 12px 12px; background: #fff; }
.hd .hd-as-form input { flex: 1; min-width: 0; height: 44px; padding: 0 16px; border: 1px solid rgba(11, 16, 32, .12); border-radius: 999px; background: var(--hd-paper); box-shadow: none; outline: 0; font-size: 14.5px; color: var(--hd-ink); transition: border-color .2s; }
.hd .hd-as-form input:focus { border-color: var(--hd-brand); background: #fff; }
.hd .hd-as-form button { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: 999px; background: var(--hd-lime); color: var(--hd-ink); transition: transform .2s var(--hd-ease); }
.hd .hd-as-form button:hover { transform: translateY(-2px); }

@keyframes hd-as-in { from { opacity: 0; transform: translateY(16px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes hd-as-ping { 0% { opacity: .7; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.5); } }
@keyframes hd-as-pop { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes hd-as-msg { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (max-width: 639px) {
    .hd.hd-as { right: 14px; bottom: 14px; }
    .hd .hd-as-fab { width: 56px; padding: 0; justify-content: center; }
    .hd .hd-as-fab-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .hd .hd-as-fab-ic { width: 44px; height: 44px; }
    .hd .hd-as-panel { height: min(560px, calc(100vh - 100px)); }
}
@media (prefers-reduced-motion: reduce) {
    .hd .hd-as-fab, .hd .hd-as-fab-ic::after, .hd .hd-as-panel, .hd .hd-as-msg, .hd .hd-as-msg.is-typing::before, .hd .hd-as-msg.is-typing::after, .hd .hd-as-msg.is-typing span { animation: none; }
}

/* live chat tab (Tawk.to): right edge, vertically centred */
.hd.hd-chat-tab { position: fixed; right: 0; top: 50%; z-index: 1029; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 9px; border: 0; border-radius: 14px 0 0 14px; background: var(--hd-brand); font-family: var(--hd-display); font-size: 13px; font-weight: 700; color: #fff; box-shadow: -8px 10px 30px -12px rgba(11, 16, 32, .55); transform: translateY(-50%); transition: padding .25s var(--hd-ease), background-color .25s; cursor: pointer; }
.hd.hd-chat-tab:hover, .hd.hd-chat-tab:focus-visible { padding-right: 14px; background: var(--hd-indigo); }
.hd.hd-chat-tab i { font-size: 17px; }
.hd.hd-chat-tab span { writing-mode: vertical-rl; transform: rotate(180deg); letter-spacing: .04em; }
@media (max-width: 639px) {
    .hd.hd-chat-tab { gap: 0; padding: 12px 8px; }
    .hd.hd-chat-tab span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
    .hd.hd-chat-tab { transition: none; }
}
