
#pc2fix-chat-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--lore-accent, #1a73e8) 0%, var(--lore-accent-dark, #0d5dbf) 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(var(--lore-accent-rgb, 26,115,232),.45);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s, box-shadow .2s;
}
#pc2fix-chat-btn:hover  { transform: scale(1.08); box-shadow: 0 6px 20px rgba(var(--lore-accent-rgb, 26,115,232),.55); }
#pc2fix-chat-btn:active { transform: scale(.96); }

#pc2fix-chat-btn::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(var(--lore-accent-rgb, 26,115,232),.35);
    animation: pc2fix-pulse 2.4s ease-out infinite;
}
@keyframes pc2fix-pulse {
    0%   { transform: scale(1);   opacity: 1; }
    70%  { transform: scale(1.3); opacity: 0; }
    100% { transform: scale(1.3); opacity: 0; }
}

#pc2fix-chat-btn svg { width: 28px; height: 28px; }

#pc2fix-chat-window {
    position: fixed;
    bottom: 96px;
    right: 24px;
    width: 360px;
    max-height: 520px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(0,0,0,.16), 0 2px 8px rgba(0,0,0,.08);
    display: flex;
    flex-direction: column;
    z-index: 9999;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;

    transform-origin: bottom right;
    transform: scale(.85) translateY(12px);
    opacity: 0;
    pointer-events: none;
    transition: transform .22s cubic-bezier(.34,1.3,.64,1), opacity .18s ease;
}
#pc2fix-chat-window.open {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: auto;
}
#pc2fix-chat-window.hidden { display: none; }

#pc2fix-chat-header {
    background: linear-gradient(135deg, var(--lore-accent, #1a73e8) 0%, var(--lore-accent-dark, #0d5dbf) 100%);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.pc2fix-avatar {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    border: 2px solid rgba(255,255,255,.5);
    overflow: hidden;
    flex-shrink: 0;
}
.pc2fix-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pc2fix-header-info { flex: 1; line-height: 1.3; }
.pc2fix-header-info strong { display: block; font-size: 14px; font-weight: 700; }
.pc2fix-header-info small  { font-size: 11px; opacity: .85; display: flex; align-items: center; gap: 4px; }
.pc2fix-online-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #4cff8f;
    display: inline-block;
    box-shadow: 0 0 0 2px rgba(76,255,143,.3);
}
#pc2fix-chat-close {
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    width: 30px; height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    flex-shrink: 0;
}
#pc2fix-chat-close:hover { background: rgba(255,255,255,.28); }

#pc2fix-contact-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: #f0f4ff;
    border-bottom: 1px solid #dde3ed;
    padding: 7px 12px;
}
.pc2fix-contact-wa, .pc2fix-contact-tel {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 14px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 20px;
    transition: background .15s;
}
.pc2fix-contact-wa  { color: #1a8a40; }
.pc2fix-contact-tel { color: var(--lore-accent, #1a73e8); }
.pc2fix-contact-wa:hover  { background: rgba(37,211,102,.12); }
.pc2fix-contact-tel:hover { background: rgba(var(--lore-accent-rgb, 26,115,232),.10); }
.pc2fix-contact-divider {
    width: 1px; height: 16px;
    background: #cdd5e0;
    flex-shrink: 0;
}

#pc2fix-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 14px 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #f6f8fb;
    scroll-behavior: smooth;
}
#pc2fix-chat-messages::-webkit-scrollbar       { width: 4px; }
#pc2fix-chat-messages::-webkit-scrollbar-track  { background: transparent; }
#pc2fix-chat-messages::-webkit-scrollbar-thumb  { background: #c5d0e0; border-radius: 4px; }

.pc2fix-msg {
    max-width: 80%;
    padding: 9px 13px;
    border-radius: 16px;
    line-height: 1.5;
    word-break: break-word;
    animation: pc2fix-pop .18s ease;
}
@keyframes pc2fix-pop {
    from { transform: scale(.92) translateY(4px); opacity: 0; }
    to   { transform: scale(1)   translateY(0);   opacity: 1; }
}
.pc2fix-msg.bot {
    background: #fff;
    color: #1a1a1a;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
}
.pc2fix-msg.user {
    background: linear-gradient(135deg, var(--lore-accent, #1a73e8) 0%, var(--lore-accent-dark, #0d5dbf) 100%);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
.pc2fix-msg.error {
    background: #fff0f0;
    color: #c0392b;
    align-self: flex-start;
    border: 1px solid #f5c6c6;
    font-size: 13px;
}

.pc2fix-meta-hint {
    align-self: stretch;
    margin: 6px 4px;
    padding: 10px 12px;
    background: #f4f7fc;
    border-left: 3px solid var(--lore-accent, #1a73e8);
    border-radius: 6px;
    color: #4a5666;
    font-size: 12.5px;
    line-height: 1.45;
    animation: pc2fix-pop .18s ease;
}

#pc2fix-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 14px 10px;
    background: #f6f8fb;
}
.pc2fix-context-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.pc2fix-chip {
    background: #fff;
    border: 1.5px solid var(--lore-accent, #1a73e8);
    color: var(--lore-accent, #1a73e8);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: background .15s, color .15s;
    white-space: nowrap;
}
.pc2fix-chip:hover { background: var(--lore-accent, #1a73e8); color: #fff; }

#pc2fix-chat-typing {
    padding: 4px 14px 8px;
    background: #f6f8fb;
    display: none;
    align-items: center;
    gap: 4px;
}
#pc2fix-chat-typing span {
    display: inline-block;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #9ab0cc;
    animation: pc2fix-bounce .9s ease-in-out infinite;
}
#pc2fix-chat-typing span:nth-child(3) { animation-delay: .15s; }
#pc2fix-chat-typing span:nth-child(4) { animation-delay: .30s; }
@keyframes pc2fix-bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30%            { transform: translateY(-6px); }
}

#pc2fix-chat-form {
    display: flex;
    align-items: flex-end;
    padding: 10px 12px;
    border-top: 1px solid #e8edf3;
    gap: 8px;
    background: #fff;
    flex-shrink: 0;
}
#pc2fix-chat-input {
    flex: 1;
    box-sizing: border-box;
    border: 1.5px solid #dde3ed;
    border-radius: 22px;
    padding: 9px 16px;
    font-size: 13.5px;
    font-family: inherit;
    resize: none;
    overflow: hidden;
    min-height: 38px;
    max-height: 100px;
    line-height: 1.4;
    color: #1a1a1a;
    background: #f6f8fb;
    transition: border-color .15s, background .15s;
}
#pc2fix-chat-input:focus {
    border-color: var(--lore-accent, #1a73e8);
    background: #fff;
}
#pc2fix-chat-input::placeholder { color: #9aa5b4; }
#pc2fix-chat-input:placeholder-shown { max-height: none; }

#pc2fix-chat-send {
    background: linear-gradient(135deg, var(--lore-accent, #1a73e8) 0%, var(--lore-accent-dark, #0d5dbf) 100%);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 46px; height: 46px;
    min-width: 46px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .15s, transform .15s;
    box-shadow: 0 2px 8px rgba(var(--lore-accent-rgb, 26,115,232),.35);
}
#pc2fix-chat-send:hover   { opacity: .9; transform: scale(1.05); }
#pc2fix-chat-send:active  { transform: scale(.93); }
#pc2fix-chat-send:disabled { background: #c5d3e8; box-shadow: none; cursor: default; transform: none; }
#pc2fix-chat-send svg { width: 24px; height: 24px; }

#pc2fix-chat-window > .pc2fix-chat-privacy {
    margin: 0;
    padding: 0 12px 6px;
    background: #fff;
    text-align: center;
    line-height: 16px;
    flex-shrink: 0;
}
.pc2fix-powered { color: #5f6b7d; }
.pc2fix-powered-merk { display: inline-block; vertical-align: -1px; }
.pc2fix-powered-merk svg { display: block; width: 51px; height: 10px; }

.pc2fix-rating {
    align-self: center;
    background: #fff;
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
    text-align: center;
    margin: 4px 0;
    animation: pc2fix-pop .18s ease;
}
.pc2fix-rating > p {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}
.pc2fix-stars {
    display: flex;
    gap: 2px;
    justify-content: center;
}
.pc2fix-stars button {
    background: none;
    border: none;
    font-size: 26px;
    color: #d0d8e4;
    cursor: pointer;
    padding: 2px 3px;
    transition: color .1s, transform .1s;
    line-height: 1;
}
.pc2fix-stars button.hover,
.pc2fix-stars button.selected { color: #f5a623; }
.pc2fix-stars button:not(:disabled):hover { transform: scale(1.18); }
.pc2fix-stars button:disabled { cursor: default; }
.pc2fix-rating-thanks {
    font-size: 12px;
    color: var(--lore-accent, #1a73e8);
    margin-top: 8px;
}
.pc2fix-feedback {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.pc2fix-feedback-input {
    width: 100%;
    border: 1.5px solid #dde3ed;
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 12px;
    font-family: inherit;
    resize: none;
    color: #1a1a1a;
    background: #f6f8fb;
    transition: border-color .15s;
    box-sizing: border-box;
}
.pc2fix-feedback-input:focus { border-color: var(--lore-accent, #1a73e8); background: #fff; }
.pc2fix-feedback-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}
.pc2fix-feedback-skip {
    background: none;
    border: none;
    font-size: 11px;
    color: #9aa5b4;
    cursor: pointer;
    padding: 4px 6px;
}
.pc2fix-feedback-skip:hover { color: #666; }
.pc2fix-feedback-send {
    background: var(--lore-accent, #1a73e8);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 11px;
    padding: 5px 12px;
    cursor: pointer;
    transition: opacity .15s;
}
.pc2fix-feedback-send:hover { opacity: .88; }

.pc2fix-callback-form {
    align-self: stretch;
    background: #fff;
    border: 1.5px solid #dde3ed;
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    animation: pc2fix-pop .18s ease;
    margin: 2px 0;
}
.pc2fix-callback-form > p {
    font-size: 12px;
    color: #555;
    margin: 0;
    line-height: 1.4;
}
.pc2fix-callback-form input,
.pc2fix-callback-form textarea {
    border: 1.5px solid #dde3ed;
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 12.5px;
    font-family: inherit;
    color: #1a1a1a;
    background: #f6f8fb;
    transition: border-color .15s, background .15s;
    resize: none;
    width: 100%;
    box-sizing: border-box;
}
.pc2fix-callback-form input:focus,
.pc2fix-callback-form textarea:focus { border-color: var(--lore-accent, #1a73e8); background: #fff; }
.pc2fix-callback-form input::placeholder,
.pc2fix-callback-form textarea::placeholder { color: #9aa5b4; }
.pc2fix-cb-send {
    background: linear-gradient(135deg, var(--lore-accent, #1a73e8) 0%, var(--lore-accent-dark, #0d5dbf) 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 0;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s;
    width: 100%;
}
.pc2fix-cb-send:hover    { opacity: .9; }
.pc2fix-cb-send:disabled { opacity: .6; cursor: default; }
.pc2fix-cb-thanks {
    font-size: 12px;
    color: var(--lore-accent, #1a73e8);
    text-align: center;
    margin: 4px 0;
}

.pc2fix-intake-lbl {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #455066;
    margin-bottom: 3px;
    letter-spacing: .02em;
}
.pc2fix-req { color: #e74c3c; }
.pc2fix-opt { font-weight: 400; color: #9aa5b4; }
.pc2fix-cb-privacy { font-size: 11px; color: #5f6b7d; margin: 6px 0 0; }
.pc2fix-cb-privacy a { color: inherit; text-decoration: underline; }
.pc2fix-intake-select {
    appearance: none;
    -webkit-appearance: none;
    background: #f6f8fb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%239aa5b4'/%3E%3C/svg%3E") no-repeat right 10px center;
    border: 1.5px solid #dde3ed;
    border-radius: 8px;
    padding: 7px 28px 7px 10px;
    font-size: 12.5px;
    font-family: inherit;
    color: #1a1a1a;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    transition: border-color .15s, background .15s;
}
.pc2fix-intake-select:focus { border-color: var(--lore-accent, #1a73e8); background-color: #fff; }
.pc2fix-intake-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.pc2fix-intake-radios {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.pc2fix-intake-radios label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    color: #3a3a3a;
    cursor: pointer;
    line-height: 1.3;
}
.pc2fix-intake-radios input[type="radio"] {
    accent-color: var(--lore-accent, #1a73e8);
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    cursor: pointer;
}
.pc2fix-step { display: flex; flex-direction: column; gap: 7px; }
.pc2fix-intake-progress { font-size: 10.5px; font-weight: 600; color: #9aa5b4; letter-spacing: .03em; }
.pc2fix-intake-nav { display: flex; gap: 8px; margin-top: 2px; }
.pc2fix-intake-nav > button { flex: 1; }
.pc2fix-cb-next, .pc2fix-cb-back {
    border-radius: 8px;
    padding: 8px 0;
    font-size: 12.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none;
}
.pc2fix-cb-next { background: linear-gradient(135deg, var(--lore-accent, #1a73e8) 0%, var(--lore-accent-dark, #0d5dbf) 100%); color: #fff; }
.pc2fix-cb-next:hover { opacity: .9; }
.pc2fix-cb-back { background: #f0f3f8; color: #455066; border: 1.5px solid #dde3ed; }
.pc2fix-cb-back:hover { background: #e6ebf2; }

.pc2fix-cta-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 8px 0 4px 44px;
    padding: 8px 16px;
    background: var(--lore-accent, #1a73e8);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(var(--lore-accent-rgb, 26,115,232),.30);
    transition: background .15s, transform .1s, box-shadow .15s;
    letter-spacing: .01em;
}
.pc2fix-cta-chip svg { flex-shrink: 0; }
.pc2fix-cta-chip:hover  { background: var(--lore-accent-hover, #1558b0); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(var(--lore-accent-rgb, 26,115,232),.38); }
.pc2fix-cta-chip:active { transform: translateY(0); box-shadow: 0 1px 4px rgba(var(--lore-accent-rgb, 26,115,232),.25); }

#pc2fix-proactive {
    position: fixed;
    bottom: 96px;
    right: 24px;
    background: #fff;
    border-radius: 12px 12px 4px 12px;
    padding: 12px 32px 12px 14px;
    box-shadow: 0 4px 16px rgba(0,0,0,.15), 0 1px 4px rgba(0,0,0,.08);
    max-width: 210px;
    z-index: 9998;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    animation: pc2fix-slide-up .28s cubic-bezier(.34,1.3,.64,1);
}
#pc2fix-proactive p {
    margin: 0;
    font-size: 13.5px;
    color: #1a1a1a;
    line-height: 1.45;
}
#pc2fix-proactive:hover { box-shadow: 0 6px 20px rgba(0,0,0,.18); }
#pc2fix-proactive-close {
    position: absolute;
    top: 6px;
    right: 7px;
    background: none;
    border: none;
    color: #aab4c0;
    font-size: 13px;
    cursor: pointer;
    padding: 2px 4px;
    line-height: 1;
}
#pc2fix-proactive-close:hover { color: #555; }
@keyframes pc2fix-slide-up {
    from { transform: translateY(10px) scale(.92); opacity: 0; }
    to   { transform: translateY(0)    scale(1);   opacity: 1; }
}

#pc2fix-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #e74c3c;
    color: #fff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    pointer-events: none;
    animation: pc2fix-pop .2s ease;
    border: 2px solid #fff;
}

.pc2fix-escalation {
    align-self: flex-start;
    background: #fff;
    border: 1.5px solid #dde3ed;
    border-radius: 12px;
    padding: 10px 14px;
    margin: 4px 0;
    animation: pc2fix-pop .18s ease;
    max-width: 85%;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.pc2fix-escalation > p {
    font-size: 12px;
    color: #555;
    margin: 0 0 8px;
}
.pc2fix-escalation-btns {
    display: flex;
    gap: 6px;
}
.pc2fix-esc-wa,
.pc2fix-esc-tel {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity .15s, transform .1s;
    white-space: nowrap;
}
.pc2fix-esc-wa:hover,
.pc2fix-esc-tel:hover { opacity: .85; transform: translateY(-1px); }
.pc2fix-esc-wa  { background: #25d366; color: #fff; }
.pc2fix-esc-tel { background: var(--lore-accent, #1a73e8); color: #fff; }

#pc2fix-chat-btn:focus-visible,
#pc2fix-chat-close:focus-visible,
#pc2fix-chat-send:focus-visible,
#pc2fix-chat-input:focus-visible,
#pc2fix-proactive-close:focus-visible,
.pc2fix-chip:focus-visible,
.pc2fix-cta-chip:focus-visible,
.pc2fix-stars button:focus-visible,
.pc2fix-feedback-input:focus-visible,
.pc2fix-feedback-skip:focus-visible,
.pc2fix-feedback-send:focus-visible,
.pc2fix-intake-select:focus-visible,
.pc2fix-intake-radios input[type="radio"]:focus-visible,
.pc2fix-callback-form input:focus-visible,
.pc2fix-callback-form textarea:focus-visible,
.pc2fix-cb-next:focus-visible,
.pc2fix-cb-back:focus-visible,
.pc2fix-cb-send:focus-visible,
.pc2fix-contact-wa:focus-visible,
.pc2fix-contact-tel:focus-visible,
.pc2fix-esc-wa:focus-visible,
.pc2fix-esc-tel:focus-visible {
    outline: 2px solid var(--lore-accent, #1a73e8);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    #pc2fix-chat-btn::before { animation: none; }
}

@media (max-width: 420px) {
    #pc2fix-chat-window { width: calc(100vw - 16px); right: 8px; bottom: 84px; border-radius: 14px; }
    #pc2fix-chat-btn    { bottom: 16px; right: 16px; }
    #pc2fix-proactive   { right: 8px; bottom: 84px; }
}
