/* Help chat bubble on the website and in the panel (resources/views/assistant/widget.blade.php). */
.pgt-help {
    --h-bg: #ffffff; --h-bg-2: #f2f2f7; --h-text: #1d1d1f; --h-text-2: #6e6e73; --h-line: #e5e5ea; --h-blue: #0071e3;
    position: fixed; right: 20px; bottom: 20px; z-index: 60;
    font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--h-text);
}
.dark .pgt-help { --h-bg: #1c1c1e; --h-bg-2: #2c2c2e; --h-text: #f5f5f7; --h-text-2: #a1a1a6; --h-line: #3a3a3c; --h-blue: #0a84ff; }
.pgt-help-open {
    display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 18px 0 14px; border: 0; border-radius: 24px;
    background: var(--h-blue); color: #fff; font: inherit; font-weight: 600; cursor: pointer;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
}
.pgt-help-open svg { width: 22px; height: 22px; }
.pgt-help.is-open .pgt-help-open { display: none; }
.pgt-help-panel {
    margin: 0; padding: 0; box-sizing: border-box;
    display: flex; flex-direction: column; width: 380px; height: min(620px, calc(100vh - 40px));
    background: var(--h-bg); border: 1px solid var(--h-line); border-radius: 20px; overflow: hidden;
    box-shadow: 0 12px 48px rgba(0, 0, 0, .22);
}
.pgt-help-panel[hidden] { display: none; }
.pgt-help-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--h-line); }
.pgt-help-head strong { display: block; font-size: 16px; }
.pgt-help-head small { color: var(--h-text-2); font-size: 12.5px; }
.pgt-help-close { width: 32px; height: 32px; border: 0; border-radius: 16px; background: var(--h-bg-2); color: var(--h-text); font-size: 20px; line-height: 1; cursor: pointer; }
.pgt-help-log { flex: 1; overflow-y: auto; padding: 14px 14px 6px; display: flex; flex-direction: column; gap: 8px; }
.pgt-help-msg { max-width: 88%; padding: 9px 13px; border-radius: 18px; overflow-wrap: anywhere; }
.pgt-help-msg p { margin: 0 0 6px; }
.pgt-help-msg p:last-child { margin-bottom: 0; }
.pgt-help-msg ol, .pgt-help-msg ul { margin: 4px 0 6px; padding-left: 20px; }
.pgt-help-msg ol { list-style: decimal; }
.pgt-help-msg ul { list-style: disc; }
.pgt-help-msg li { margin: 2px 0; }
.pgt-help-msg a { color: inherit; text-decoration: underline; }
.pgt-help-assistant { align-self: flex-start; background: var(--h-bg-2); border-bottom-left-radius: 6px; }
.pgt-help-user { align-self: flex-end; background: var(--h-blue); color: #fff; border-bottom-right-radius: 6px; }
.pgt-help-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.pgt-help-chips button { border: 1px solid var(--h-line); background: var(--h-bg); color: var(--h-blue); border-radius: 16px; padding: 6px 12px; font: inherit; font-size: 13.5px; cursor: pointer; }
.pgt-help-typing { display: flex; gap: 4px; padding: 4px 0; }
.pgt-help-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--h-text-2); animation: pgt-help-dot 1.2s infinite; }
.pgt-help-typing span:nth-child(2) { animation-delay: .15s; }
.pgt-help-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes pgt-help-dot { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }
.pgt-help-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--h-line); }
.pgt-help-form textarea {
    flex: 1; resize: none; max-height: 120px; padding: 9px 12px; border: 1px solid var(--h-line); border-radius: 18px;
    background: var(--h-bg); color: var(--h-text); font: inherit; outline: none;
}
.pgt-help-form textarea:focus { border-color: var(--h-blue); }
.pgt-help-form button { flex: none; width: 38px; height: 38px; border: 0; border-radius: 19px; background: var(--h-blue); color: #fff; cursor: pointer; }
.pgt-help-form button svg { width: 18px; height: 18px; }
.pgt-help-human { padding: 0 12px 12px; text-align: center; }
.pgt-help-human-open { border: 0; background: none; color: var(--h-text-2); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.pgt-help-human-form { display: grid; gap: 8px; margin-top: 8px; text-align: left; }
.pgt-help-human-form[hidden] { display: none; }
.pgt-help-human-form p { margin: 0; color: var(--h-text-2); font-size: 13px; }
.pgt-help-human-form input { padding: 9px 12px; border: 1px solid var(--h-line); border-radius: 12px; background: var(--h-bg); color: var(--h-text); font: inherit; }
.pgt-help-human-form button { padding: 10px; border: 0; border-radius: 12px; background: var(--h-text); color: var(--h-bg); font: inherit; font-weight: 600; cursor: pointer; }
@media (max-width: 1023px) {
    /* Above the panel's bottom tab bar. */
    .fi-body .pgt-help { bottom: calc(84px + env(safe-area-inset-bottom)); }
}
@media (max-width: 520px) {
    .pgt-help { right: 12px; bottom: 12px; }
    .pgt-help.is-open { inset: 0; }
    .pgt-help.is-open .pgt-help-panel { width: 100%; height: 100%; border-radius: 0; border: 0; }
    .pgt-help-open span { display: none; }
    .pgt-help-open { width: 52px; height: 52px; padding: 0; justify-content: center; border-radius: 26px; }
}
