.operator-avatar{display:block;object-fit:cover;border-radius:50%;flex:none;background:#e5ddca}
.operator-profile-control{position:relative;display:inline-flex;align-items:center;gap:7px!important;padding:3px 8px 3px 4px!important;min-height:40px!important;background:var(--chat-bg,#fff);border:1px solid var(--chat-line,#deded8);border-radius:24px!important;color:var(--chat-ink,#24261f)}
.operator-profile-control>.operator-avatar{width:32px;height:32px}.operator-profile-copy{display:flex;flex-direction:column;align-items:flex-start;line-height:1.25}.operator-profile-copy strong{font-size:10px;font-weight:650}.operator-profile-copy small{font-size:9px;white-space:nowrap;color:var(--chat-muted,#737569)}
.operator-presence-dot{display:inline-block;width:8px;height:8px;min-width:8px;border-radius:50%;background:#d65353;box-shadow:0 0 0 3px #d6535318}.operator-profile-control[data-status=online] .operator-presence-dot,.operator-presence-dot[data-status=online]{background:#2c9a71;box-shadow:0 0 0 3px #2c9a7118}.operator-profile-control[data-status=away] .operator-presence-dot,.operator-presence-dot[data-status=away]{background:#e3b341;box-shadow:0 0 0 3px #e3b34118}
.operator-profile-dialog{color:var(--text,#282b24);background:var(--surface,#fff);border:1px solid var(--border,#dcded5);border-radius:22px;padding:24px;width:min(440px,calc(100vw - 24px));max-height:calc(100dvh - 32px);overflow:auto;box-shadow:0 20px 90px #0004;font:13px/1.5 system-ui,sans-serif}.operator-profile-dialog::backdrop{background:#10161199;backdrop-filter:blur(5px)}.operator-profile-dialog *{box-sizing:border-box}.operator-profile-dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px}.operator-profile-dialog h2{margin:0;font-size:22px;letter-spacing:-.5px}.operator-dialog-close{display:grid;place-items:center;width:40px;height:40px;border:1px solid var(--border,#deded5);border-radius:12px;background:transparent;color:inherit;font-size:25px;cursor:pointer}.operator-profile-current{color:var(--muted,#77796d);margin:6px 0 20px}.operator-profile-dialog fieldset{border:0;padding:0;margin:0 0 20px;min-width:0}.operator-profile-dialog legend{font-size:12px;font-weight:700;margin-bottom:10px}.operator-status-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.operator-status-option{display:flex;align-items:center;justify-content:center;gap:7px;min-height:44px;border:1px solid var(--border,#dcded5);border-radius:11px;cursor:pointer;font-size:12px}.operator-status-option:has(input:checked){border-color:#b99b58;background:#b99b5815}.operator-status-option input{position:absolute;opacity:0;width:1px}.operator-status-option:has(input:focus-visible){outline:3px solid #b99b5866;outline-offset:2px}.operator-profile-field{display:flex;flex-direction:column;gap:6px;margin-top:12px}.operator-profile-field select{min-height:42px;background:var(--surface,#fff);border:1px solid var(--border,#ddd);border-radius:10px;padding:8px;color:inherit;font:inherit}.operator-profile-help{color:var(--muted,#737569);font-size:12px;margin:0 0 22px}.operator-avatar-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.operator-avatar-choice{display:grid;place-items:center;min-height:66px;padding:5px;border:2px solid transparent;border-radius:16px;background:transparent;cursor:pointer}.operator-avatar-choice img{width:56px;height:56px}.operator-avatar-choice[aria-pressed=true]{border-color:#b99b58;background:#b99b5818}.operator-profile-dialog footer{display:flex;justify-content:flex-end}.operator-profile-dialog button:focus-visible{outline:3px solid #b99b5880;outline-offset:3px}.operator-profile-dialog .chat-button{padding:11px 18px;border:1px solid #a28543;background:#a28543;color:#fff;border-radius:10px;font:600 13px system-ui;cursor:pointer}.operator-profile-dialog button:disabled{opacity:.5;cursor:wait}.operator-profile-error{color:#a85042;background:#a8504210;border-radius:9px;padding:10px;margin:10px 0}.operator-profile-dialog [hidden]{display:none!important}
html[data-theme=dark] .operator-profile-dialog,body[data-theme=dark] .operator-profile-dialog{--surface:#242520;--text:#f2f0e8;--muted:#b1b1a5;--border:#424339;color:var(--text);background:var(--surface)}
@media(max-width:600px){.operator-profile-control{min-width:45px;min-height:40px!important;padding:3px 5px!important;gap:3px!important}.operator-profile-copy{display:none}.operator-profile-control>.operator-avatar{width:29px;height:29px}.operator-profile-control>.operator-presence-dot{position:absolute;margin:24px 0 0 25px;width:7px;height:7px;min-width:7px;box-shadow:0 0 0 2px var(--chat-bg,#fff)}.operator-profile-dialog{padding:20px}.operator-avatar-choice img{width:50px;height:50px}}

@media(max-width:760px){#workspace .organized-chat-header.mobile-chat-focus .chat-toolbar-actions>.operator-profile-control{display:inline-flex!important;order:0;flex:0 0 42px;width:42px!important;min-width:42px;min-height:44px!important;padding:4px!important;border:0!important;background:transparent!important}.operator-profile-control>.operator-presence-dot{right:3px;bottom:4px;margin:0}.operator-status-option{gap:5px}.operator-profile-control>.operator-profile-copy{display:none}}

.operator-profile-dialog .operator-return{margin:0 0 20px;width:100%;background:#397c60;border-color:#397c60}

/* The existing profile replaces the queue caption; keep its state and dialog. */
.chat-queue-heading.has-operator-profile{flex:0 0 44px;gap:0;margin:0}
.chat-queue-heading.has-operator-profile>h3,.chat-queue-heading.has-operator-profile>.chat-count{display:none}
.chat-queue-heading>.operator-profile-control{display:inline-flex;justify-content:center;width:44px!important;min-width:44px;min-height:44px!important;height:44px;padding:4px!important;border:0;background:transparent;box-shadow:none}
.chat-queue-heading>.operator-profile-control>.operator-profile-copy{display:none}
.chat-queue-heading>.operator-profile-control>.operator-avatar{width:34px;height:34px}
.chat-queue-heading>.operator-profile-control>.operator-presence-dot,#workspace .chat-toolbar-actions>.operator-profile-control>.operator-presence-dot{display:block!important;position:absolute;right:3px;bottom:3px;margin:0;width:10px;height:10px;min-width:10px;box-shadow:0 0 0 2px var(--chat-bg,var(--surface,#fff))}
body.chat-workspace-active.chat-keyboard-open .chat-queue-heading.has-operator-profile{display:flex}

/* Keep keyboard focus visible; pointer activation does not select the avatar. */
#workspace .operator-profile-control[data-pointer-focus]:focus{outline:none!important;box-shadow:none!important}

/* Press feedback uses the shared pointer lifecycle; the hit target stays still. */
#workspace .operator-profile-control{cursor:pointer;scale:1}
#workspace .operator-profile-control>.operator-avatar{transition:transform 120ms ease-out,filter 120ms ease-out}
@media(hover:hover) and (pointer:fine){#workspace .operator-profile-control:not(:disabled):hover>.operator-avatar{transform:translateY(-1px);filter:brightness(1.06)}}
#workspace .operator-profile-control:not(:disabled):is(:active,.linx-pressed)>.operator-avatar{transform:translateY(1px) scale(.92);filter:brightness(.94);transition-duration:60ms}
@media(prefers-reduced-motion:reduce){#workspace .operator-profile-control{filter:none}#workspace .operator-profile-control>.operator-avatar{transition:none;transform:none!important}}
