/* KeyPay support. Every new rule is scoped to support screens. */
.kp-support{position:fixed;z-index:1000;top:var(--kp-top,0px);left:50%;transform:translateX(-50%);width:100%;max-width:480px;height:var(--kp-height,100dvh);display:flex;flex-direction:column;overflow:hidden;isolation:isolate;box-sizing:border-box;padding-top:var(--safe-top);background:var(--bg);color:var(--text);font-family:Manrope,system-ui,-apple-system,"Segoe UI",sans-serif;--kp-red:#ff969f;--kp-green:#70d7ab;--kp-yellow:#ffe27a;--kp-blue:#91baff;--kp-red-bg:#2b1a23;--kp-green-bg:#14271f;--kp-yellow-bg:#2c281a;--kp-blue-bg:#18294b;transition:opacity 130ms ease}
:root[data-theme=light] .kp-support{--kp-red:#b7364b;--kp-green:#16734f;--kp-yellow:#87600b;--kp-blue:#245fce;--kp-red-bg:#fceef0;--kp-green-bg:#eaf6ef;--kp-yellow-bg:#fff6d4;--kp-blue-bg:#eaf0ff}
.kp-support *{box-sizing:border-box}.kp-support [hidden]{display:none!important}.kp-support button,.kp-support textarea,.kp-support select{font-family:inherit}.kp-support button{cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}.kp-support button:disabled{cursor:default;opacity:.48}
.kp-support svg{display:block;width:20px;height:20px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.kp-support button:focus-visible,.kp-support textarea:focus-visible{outline:2px solid var(--blue);outline-offset:3px}
.kp-support-header{display:flex;align-items:center;gap:12px;padding:16px 18px;border-bottom:1px solid var(--border);flex-shrink:0;background:var(--bg);min-height:85px}
.kp-support-brand-slot{display:grid;place-items:center;width:42px;min-width:42px;height:42px}
.kp-support .kp-support-brand{width:32px;height:34px;border-radius:10px;background:var(--blue);transform:rotate(-7deg);display:grid;place-items:center}
.kp-support .kp-support-brand svg{width:22px;height:22px;stroke:white;fill:none;stroke-width:1.8;transform:rotate(7deg)}
.kp-support-heading{flex:1;min-width:0}.kp-support-heading h2{margin:0;font-size:18px;font-weight:800;line-height:1.4;letter-spacing:-.45px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kp-support-heading>p{margin:2px 0 0;color:var(--muted);font-size:11px;line-height:1.7}
.kp-support-header-actions{display:flex;align-items:center;gap:5px;flex-shrink:0}.kp-support-icon{display:grid;place-items:center;width:40px;height:42px;min-width:40px;padding:0;border:0;border-radius:13px;background:var(--surface);color:var(--muted);transition:background-color 140ms,color 140ms,transform 120ms}
.kp-support-icon:hover{background:var(--surface-2);color:var(--text)}.kp-support-icon:active{transform:scale(.96)}.kp-support-back{width:42px;min-width:42px;color:var(--text)}
.kp-support-status{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin-top:4px;min-height:24px;font-size:10px;line-height:1.5;color:var(--muted)}
.kp-support-case-number{font-size:11px;white-space:nowrap}.kp-support-case-number::after{content:"";display:inline-block;width:3px;height:3px;margin-left:7px;vertical-align:middle;border-radius:50%;background:var(--muted);opacity:.55}.kp-support-new-label{font-size:11px}
.kp-support [data-tone=open]{--kp-tone:var(--kp-red);--kp-tone-bg:var(--kp-red-bg)}.kp-support [data-tone=closed]{--kp-tone:var(--kp-green);--kp-tone-bg:var(--kp-green-bg)}.kp-support [data-tone=reopened]{--kp-tone:var(--kp-yellow);--kp-tone-bg:var(--kp-yellow-bg)}.kp-support [data-tone=in_progress]{--kp-tone:var(--kp-blue);--kp-tone-bg:var(--kp-blue-bg)}
.kp-support-status-pill,.kp-support-status-select,.kp-support-ticket-status{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;color:var(--kp-tone);background:var(--kp-tone-bg);border-radius:8px;padding:4px 7px;font-size:10px;font-weight:650;line-height:1.5}
.kp-support-dot{width:5px;height:5px;border-radius:50%;background:currentColor;flex-shrink:0}.kp-support [data-tone=reopened]>.kp-support-dot{background:#ffd43b;box-shadow:0 0 0 1px #b2852555}
.kp-support-status-select{position:relative;padding-right:4px}.kp-support-status-select>svg{width:14px;height:14px}.kp-support-status-select select{position:absolute;left:-3px;top:-9px;width:calc(100% + 6px);height:44px;opacity:0;cursor:pointer;appearance:auto}.kp-support-status-select:focus-within{outline:2px solid var(--blue);outline-offset:3px}
.kp-support-body{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:20px 18px 24px}
.kp-support-messages{display:flex;flex-direction:column;align-items:flex-start;gap:12px;min-width:0;padding-bottom:1px}
.kp-support-bubble{align-self:flex-start;max-width:86%;width:fit-content;min-width:58px;padding:10px 13px 8px;border:1px solid var(--border);border-radius:18px 18px 18px 7px;background:var(--surface);color:var(--text);font-size:14px;font-weight:500;line-height:1.5;overflow-wrap:anywhere}
.kp-support-bubble.is-outgoing{align-self:flex-end;border-color:transparent;border-radius:18px 18px 7px 18px;background:var(--blue);color:white}.kp-support-bubble p{margin:0;white-space:pre-wrap}.kp-support-bubble p:empty{display:none}
.kp-support-message-meta{display:flex;align-items:center;justify-content:flex-end;gap:5px;min-height:14px;margin-top:4px;font-size:9px;line-height:14px;color:var(--muted)}.kp-support-bubble.is-outgoing .kp-support-message-meta{color:#ffffffe0}
.kp-support-message-meta time{white-space:nowrap;font-size:9px;line-height:14px}.kp-support-receipt{display:inline-flex;align-items:center;justify-content:center;width:18px;height:14px;flex-shrink:0}.kp-support-receipt svg{width:18px;height:14px;stroke-width:1.8}
.kp-support-bubble.is-system{width:100%;max-width:100%;padding:10px 0 22px;margin-bottom:2px;border:0;border-radius:0;background:transparent}
.kp-support-bubble.is-system>p{font-size:23px;font-weight:800;line-height:1.35;letter-spacing:-.65px;max-width:290px;white-space:normal}.kp-support-bubble.is-system>p>span{display:block}.kp-support-welcome-note{display:block;max-width:270px;margin-top:9px;color:var(--muted);font-size:12px;font-weight:500;line-height:1.7}
.kp-support-bubble.is-system .kp-support-message-meta{justify-content:flex-start;margin-top:12px;font-size:10px}.kp-support-bubble.is-system .kp-support-message-meta time{font-size:10px}
.kp-support[data-role=admin] .kp-support-bubble.is-system{padding-bottom:15px}.kp-support[data-role=admin] .kp-support-bubble.is-system>p{font-size:17px;font-weight:700;letter-spacing:-.3px;max-width:290px}
.kp-support-image{display:block;max-width:100%;margin:0 0 7px;padding:0;overflow:hidden;border:0;border-radius:11px;background:var(--surface-2);color:var(--muted);text-align:left}.kp-support-bubble.is-outgoing .kp-support-image{background:#ffffff18;color:#ffffffe0}.kp-support-image img{display:block;width:100%;height:100%;object-fit:contain}.kp-support-image span{display:block;padding:12px;font-size:10px;line-height:1.6}
.kp-support-composer{flex-shrink:0;padding:10px 14px max(14px,var(--safe-bottom));background:var(--bg)}
.kp-support-input-row{display:flex;align-items:flex-end;gap:3px;padding:5px;border:1px solid var(--border);border-radius:20px;background:var(--surface);transition:border-color 140ms,box-shadow 140ms}.kp-support-input-row:focus-within{border-color:var(--blue);box-shadow:0 0 0 2px var(--blue-soft)}
.kp-support-composer textarea{display:block;flex:1;min-width:0;min-height:44px;max-height:112px;margin:0;padding:11px 5px 10px;border:0;outline:none;border-radius:0;resize:none;background:transparent;color:var(--text);font-size:16px;font-weight:500;line-height:1.4;box-shadow:none}.kp-support-composer textarea:focus-visible{outline:none}.kp-support-composer textarea::placeholder{color:var(--muted);font-size:13px}
.kp-support-attach{width:38px;min-width:38px;height:44px;background:transparent;color:var(--muted)}.kp-support-attach:hover{background:var(--surface-2)}
.kp-support-send{width:44px;min-width:44px;height:44px;background:var(--blue);color:white;border-radius:14px}.kp-support-send:hover{background:var(--blue-hover);color:white}.kp-support-send svg{width:21px;height:21px}
.kp-support-attachment{display:flex;align-items:center;gap:11px;margin:0 2px 9px;padding:9px 10px;border:1px solid var(--border);border-radius:16px;background:var(--surface);color:var(--muted);font-size:11px;line-height:1.5}.kp-support-attachment>img{width:44px;height:44px;flex-shrink:0;border-radius:9px;object-fit:cover}.kp-support-attachment>span{flex:1;min-width:0;overflow-wrap:anywhere}.kp-support-attachment .kp-support-icon{width:34px;min-width:34px;height:36px}
.kp-support-send-state{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.kp-support-error{display:flex;align-items:flex-start;gap:8px;margin:0 2px 10px;padding:11px 12px;border-radius:13px;background:var(--kp-red-bg);color:var(--kp-red);font-size:11px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere}.kp-support-error>svg{width:17px;height:17px;margin-top:1px}.kp-support-error>span{flex:1;min-width:0}
.kp-support-feedback{margin:0 0 14px;color:var(--muted);font-size:12px;line-height:1.7}.kp-support-feedback:empty,.kp-support-error:empty{display:none}
.kp-support-closed{display:grid;grid-template-columns:34px minmax(0,1fr);gap:10px 12px;padding:15px;border:1px solid var(--border);border-radius:20px;background:var(--surface)}.kp-support-closed-icon{width:34px;height:34px;border-radius:11px;background:var(--kp-green-bg);color:var(--kp-green);display:grid;place-items:center}.kp-support-closed h3{margin:0;font-size:13px;font-weight:800;line-height:1.6}.kp-support-closed p{margin:3px 0 0;color:var(--muted);font-size:11px;line-height:1.65}.kp-support-closed>.kp-support-button{grid-column:1/-1;width:100%;margin-top:2px}
.kp-support-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:11px 14px;border:1px solid var(--border);border-radius:13px;background:var(--surface);color:var(--text);font-size:12px;font-weight:800;line-height:1.5;transition:background-color 140ms,transform 120ms}.kp-support-button svg{width:17px;height:17px}.kp-support-button:active{transform:translateY(1px)}.kp-support-button.primary{border-color:transparent;background:var(--blue);color:white}.kp-support-button.primary:hover{background:var(--blue-hover)}
.kp-support-list-intro{margin:2px 0 20px}.kp-support-list-intro h1{margin:0;font-size:26px;font-weight:800;line-height:1.25;letter-spacing:-.8px}.kp-support-list-intro p{max-width:310px;margin:8px 0 0;color:var(--muted);font-size:12px;line-height:1.75}
.kp-support-list-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.kp-support-count{display:flex;align-items:center;flex-wrap:wrap;gap:7px 14px;color:var(--muted);font-size:11px;line-height:1.7}.kp-support-count strong{color:var(--text);font-weight:800}.kp-support-count span+span{position:relative}.kp-support-count span+span::before{content:"";display:inline-block;width:3px;height:3px;margin-right:10px;vertical-align:middle;border-radius:50%;background:var(--muted);opacity:.5}.kp-support-list-head>.kp-support-button{flex-shrink:0}
.kp-support-tickets{display:flex;flex-direction:column;gap:11px}
.kp-support-ticket{display:block;width:100%;margin:0;padding:15px;text-align:left;border:1px solid var(--border);border-radius:20px;background:var(--surface);color:var(--text);transition:border-color 140ms,background-color 140ms,transform 120ms}.kp-support-ticket:hover{border-color:var(--muted)}.kp-support-ticket:active{transform:scale(.99)}.kp-support-ticket.is-unread{border-color:var(--blue-soft)}
.kp-support-ticket-top{display:flex;align-items:center;gap:10px;min-width:0}.kp-support-ticket-avatar{display:grid;place-items:center;width:35px;height:35px;flex-shrink:0;border-radius:12px;background:var(--blue-soft);color:var(--blue);font-size:14px;font-weight:800}.kp-support-ticket-avatar svg{width:19px;height:19px}
.kp-support-ticket-heading{flex:1;min-width:0}.kp-support-ticket-heading>strong{display:block;font-size:13px;font-weight:800;line-height:1.6;letter-spacing:-.15px}.kp-support-ticket-owner{display:block;margin-top:1px;color:var(--muted);font-size:10px;font-weight:500;line-height:1.6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kp-support-ticket-accessory{flex-shrink:0;color:var(--muted)}.kp-support-ticket-accessory>svg{width:17px;height:17px}
.kp-support-badge{display:inline-flex;align-items:center;justify-content:center;min-width:21px;height:21px;padding:0 6px;border-radius:8px;background:var(--blue);color:#fff;font-size:10px;font-weight:800;line-height:1}
.kp-support-ticket>p{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere;white-space:pre-wrap;margin:13px 0;color:var(--muted);font-size:12px;font-weight:500;line-height:1.65}.kp-support-ticket.is-unread>p{color:var(--text)}
.kp-support-ticket-bottom{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;color:var(--muted);font-size:10px;line-height:1.5}.kp-support-ticket-status{padding:4px 8px;border-radius:8px;font-size:10px}
.kp-support-empty{text-align:center;padding:40px 10px 30px}.kp-support-empty-icon{display:grid;place-items:center;width:64px;height:64px;margin:0 auto 18px;border-radius:22px;background:var(--blue-soft);color:var(--blue)}.kp-support-empty-icon svg{width:29px;height:29px}.kp-support-empty h3{margin:0;font-size:19px;font-weight:800;letter-spacing:-.5px;line-height:1.4}.kp-support-empty p{max-width:250px;margin:10px auto 20px;color:var(--muted);font-size:12px;line-height:1.8}
.kp-support-viewer{position:absolute;inset:0;z-index:5;display:flex;flex-direction:column;padding-top:var(--safe-top);padding-bottom:var(--safe-bottom);background:var(--bg);animation:kp-support-open 120ms ease-out both}.kp-support-viewer-bar{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:16px 18px;border-bottom:1px solid var(--border);flex-shrink:0}.kp-support-viewer-bar h2{margin:0;font-size:18px;font-weight:800;letter-spacing:-.4px}.kp-support-viewer-bar p{margin:3px 0 0;color:var(--muted);font-size:11px}.kp-support-viewer-content{display:flex;align-items:center;justify-content:center;flex:1;min-height:0;max-width:100%;padding:18px;color:var(--muted);font-size:12px;text-align:center}.kp-support-viewer-content img{display:block;max-width:100%;max-height:100%;object-fit:contain;border-radius:12px}
.kp-support-enter>.kp-support-header,.kp-support-enter>.kp-support-body,.kp-support-enter>.kp-support-composer{animation:kp-support-open 140ms ease-out both}.kp-support.is-leaving{opacity:0;pointer-events:none;animation:none}.kp-support-bubble.is-new{animation:kp-support-message 140ms ease-out both}.kp-support-send.is-sending svg{animation:kp-support-spin 700ms linear infinite}
@keyframes kp-support-open{from{opacity:0}to{opacity:1}}@keyframes kp-support-message{from{opacity:0;translate:0 4px}to{opacity:1;translate:0 0}}@keyframes kp-support-spin{to{transform:rotate(360deg)}}
@media(max-width:350px){.kp-support-header{padding-left:14px;padding-right:14px;gap:9px}.kp-support-header-actions{gap:3px}.kp-support-icon{width:37px;min-width:37px}.kp-support-back{width:42px;min-width:42px}.kp-support-heading h2{font-size:17px}.kp-support-body{padding-left:15px;padding-right:15px}.kp-support-composer{padding-left:11px;padding-right:11px}.kp-support-bubble{max-width:90%}.kp-support-bubble.is-system>p{font-size:22px}.kp-support-ticket{padding:13px}.kp-support-list-intro h1{font-size:24px}.kp-support-list-head{gap:9px}.kp-support-list-head>.kp-support-button{padding-left:11px;padding-right:11px;font-size:11px}.kp-support-ticket-bottom{font-size:9px}}
@media(prefers-reduced-motion:reduce){.kp-support,.kp-support *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
/* The approved FAQ transition keeps its existing appearance. */
.notice[data-action=support-chat]{cursor:pointer}.notice[data-action=support-chat]:focus-visible{outline:2px solid var(--blue);outline-offset:3px}.notice[data-action=support-chat] strong:last-child{color:var(--blue)}

/* Only the unsent, new conversation has a centered welcome composition. */
.kp-support-body.has-chat-intro{position:relative;display:flex;flex-direction:column;padding:0}
.has-chat-intro>.kp-support-messages{display:none}
.has-chat-intro>.kp-support-feedback:not(:empty){padding:12px 18px 0}
.kp-support-chat-intro{display:flex;flex:1;min-height:0;padding:18px;opacity:1;transition:opacity 240ms ease,translate 240ms ease;--kp-chat-art-top:#f9fbff;--kp-chat-art-bottom:#dce8ff}
.kp-support-chat-intro-inner{display:flex;flex-direction:column;align-items:center;gap:10px;width:100%;max-width:290px;max-height:100%;margin:auto;text-align:center}
.kp-support-chat-art{width:190px;height:154px;min-height:50px;flex-shrink:1}
.kp-support .kp-support-chat-art svg{display:block;width:100%;height:100%;stroke:none;fill:none;overflow:visible}
.kp-support-chat-intro h3{flex-shrink:0;margin:0;font-size:20px;font-weight:800;line-height:1.45;letter-spacing:-.45px;color:var(--text)}
.kp-support-chat-intro p{flex-shrink:0;max-width:270px;margin:0;color:var(--muted);font-size:12px;font-weight:500;line-height:1.75}
.kp-support-chat-intro.is-leaving{opacity:0;translate:0 -4px;pointer-events:none}
:root[data-theme=light] .kp-support-chat-intro{--kp-chat-art-top:#fff;--kp-chat-art-bottom:#e4edff}
.chat-intro-complete>.kp-support-messages{animation:kp-support-open 140ms ease-out both}
