.kfs-root{position:fixed!important;z-index:1500!important;right:max(20px,env(safe-area-inset-right));bottom:calc(20px + env(safe-area-inset-bottom));font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;color:#f1efe8;line-height:1.4;box-sizing:border-box}.kfs-root *{box-sizing:border-box}.kfs-root [hidden]{display:none!important}.kfs-launch{display:flex;align-items:center;gap:9px;padding:10px 17px!important;border:1px solid rgba(var(--kyra-ui-184,167,144,207),1)!important;border-radius:30px!important;background:#14191f!important;color:rgba(var(--kyra-ui-243,212,189,253),1)!important;font-size:13px!important;font-weight:700!important;box-shadow:0 8px 35px #0009;cursor:pointer}.kfs-launch img,.kfs-head img{object-fit:contain;flex:0 0 auto}.kfs-launch:hover{border-color:rgba(var(--kyra-ui-239,210,186,252),1)!important}.kfs-panel{position:absolute;bottom:60px;right:0;width:min(370px,calc(100vw - 30px));height:min(570px,calc(100dvh - 120px));min-height:300px;background:#11171d;border:1px solid #45423a;border-radius:16px;overflow:hidden;box-shadow:0 20px 65px #000b;display:flex;flex-direction:column}.kfs-head{background:#1c2329;border-bottom:1px solid #343b41;padding:14px;display:flex;align-items:center;justify-content:space-between;gap:8px}.kfs-head>div{display:flex;align-items:center;gap:9px;min-width:0}.kfs-head span{display:grid;gap:3px;min-width:0}.kfs-head strong{font-size:13px;white-space:nowrap}.kfs-head small{font-size:10px;color:#aeb7bd;line-height:1.4}.kfs-head button{background:none;border:0;color:#f2f0e9;font-size:25px;padding:0 4px;cursor:pointer}.kfs-messages{min-height:0;flex:1;overflow-y:auto;padding:13px;display:flex;flex-direction:column;gap:11px;overscroll-behavior:contain}.kfs-welcome{background:#242e36;border:1px solid #3b454a;color:#e7e8e6;border-radius:10px;align-self:flex-start;max-width:90%;font-size:12px;padding:10px;margin:0}.kfs-msg{background:#29333b;border-radius:12px;padding:10px 12px;border:1px solid #36424b;max-width:88%;align-self:flex-start;overflow-wrap:anywhere}.kfs-msg.staff{background:#2f312e;border-color:rgba(var(--kyra-ui-108,98,84,122),1)}.kfs-msg.mine{background:rgba(var(--kyra-ui-73,66,57,82),1);border-color:rgba(var(--kyra-ui-119,108,93,134),1);align-self:flex-end}.kfs-msg small{font-size:9px;color:#d2c2aa;display:block;margin-bottom:5px}.kfs-msg p{font-size:12px;white-space:pre-wrap;color:#f1efe8;margin:0}.kfs-notice{font-size:11px;background:rgba(var(--kyra-ui-48,44,38,54),1);color:rgba(var(--kyra-ui-236,209,184,252),1);padding:8px 12px}.kfs-form{display:grid;gap:7px;padding:11px;background:#192027;border-top:1px solid #343d44}.kfs-guest{display:grid;grid-template-columns:1fr 1fr;gap:8px}.kfs-form label{font-size:10px;color:#c5cbd0;display:grid;gap:5px}.kfs-form textarea,.kfs-form input{width:100%;color:#f1efe8;background:#0f1419;border:1px solid #45515a;border-radius:7px;padding:9px;font-size:12px;font-family:inherit;outline-offset:2px}.kfs-form textarea{resize:vertical;font:12px -apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;min-height:55px;max-height:100px}.kfs-form input:focus,.kfs-form textarea:focus{outline:2px solid rgba(var(--kyra-ui-188,170,147,212),1)}.kfs-actions{display:flex;justify-content:space-between;align-items:center;gap:8px}.kfs-actions small{font-size:10px;color:#adb4bd}.kfs-actions a{color:rgba(var(--kyra-ui-224,203,175,252),1);text-decoration:underline}.kfs-actions button{border:1px solid rgba(var(--kyra-ui-215,195,168,242),1)!important;background:rgba(var(--kyra-ui-215,195,168,242),1)!important;color:#151310!important;border-radius:8px!important;padding:9px 14px!important;font-size:12px!important;font-weight:750!important;cursor:pointer!important}.kfs-actions button:disabled{opacity:.55;cursor:default!important}.kfs-launch:focus-visible,.kfs-head button:focus-visible,.kfs-actions button:focus-visible{outline:2px solid rgba(var(--kyra-ui-239,210,186,252),1);outline-offset:3px}@media(max-width:650px){.kfs-root{right:max(13px,env(safe-area-inset-right));bottom:calc(76px + env(safe-area-inset-bottom))}.kfs-panel{height:min(510px,calc(100dvh - 195px));bottom:57px}.kfs-launch{padding:9px 12px!important}}@media(prefers-reduced-motion:reduce){.kfs-root *{transition:none!important}}

/* Unified KF emoji picker and compact single-paperclip attachment controls. */
.kfs-compose-wrap{position:relative;min-width:0}
.kfs-compose-wrap textarea{width:100%;padding-right:78px!important}
.kfs-compose-tools{position:absolute;right:7px;top:6px;display:flex;gap:2px;align-items:center}
.kfs-tool{display:grid;place-items:center;width:30px;height:30px;padding:5px!important;min-height:0;border:0!important;border-radius:6px!important;background:transparent!important;color:#b7c5cb!important;cursor:pointer}
.kfs-tool:hover,.kfs-tool[aria-expanded=true],.kfs-tool:focus-visible{background:#29373e!important;color:rgba(var(--kyra-ui-226,204,176,252),1)!important}
.kfs-tool svg{height:19px;width:19px;stroke:currentColor;fill:none}
.kfs-attach-menu{position:absolute;right:0;bottom:calc(100% + 8px);z-index:31;width:205px;background:#0e1920;border:1px solid rgba(var(--kyra-ui-97,88,76,109),1);border-radius:9px;box-shadow:0 15px 35px #0009;padding:5px}
.kfs-attach-menu[hidden],.kfs-emoji-panel[hidden],.kfs-previews[hidden]{display:none!important}
.kfs-attach-menu button{display:block;width:100%;border:0;background:transparent;color:#f0e9db;text-align:left;padding:10px;border-radius:5px;font-size:12px;cursor:pointer}
.kfs-attach-menu button:hover{background:#28343b}
.kfs-emoji-panel{position:absolute;right:0;bottom:calc(100% + 10px);z-index:32;width:min(390px,calc(100vw - 55px));padding:12px;border:1px solid rgba(var(--kyra-ui-97,88,76,109),1);border-radius:10px;background:#0b171b;box-shadow:0 15px 35px #0009}
.kfs-emoji-panel .chat-emoji-panel-heading{display:flex;justify-content:space-between;gap:10px;margin-bottom:9px;color:rgba(var(--kyra-ui-235,208,183,252),1)}
.kfs-emoji-panel .chat-emoji-panel-heading span{color:#91a1a1;font-size:11px}
.kfs-emoji-panel .chat-emoji-search{display:block;width:100%;height:36px;padding:7px 10px;background:#071115;border:1px solid #3c4b51;border-radius:5px;color:#eee;font-size:12px}
.kfs-emoji-panel .chat-emoji-tabs{display:flex;gap:3px;overflow-x:auto;padding:7px 0;border-bottom:1px solid #2b3940}
.kfs-emoji-panel .chat-emoji-tabs button{flex:none;border:0;background:transparent;color:#acb6ba;padding:6px;font-size:11px;border-radius:4px;cursor:pointer}
.kfs-emoji-panel .chat-emoji-tabs button[aria-selected=true]{background:#28343b;color:rgba(var(--kyra-ui-235,208,183,252),1)}
.kfs-emoji-panel .chat-emoji-grid{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:2px;max-height:210px;overflow-y:auto;padding-top:7px}
.kfs-emoji-panel .chat-emoji-grid button{min-height:0;height:34px;padding:0;border:0;border-radius:5px;background:transparent;color:#fff;font:20px system-ui,'Apple Color Emoji','Segoe UI Emoji',sans-serif;cursor:pointer}
.kfs-emoji-panel .chat-emoji-grid button:hover{background:#29373e}
.kfs-emoji-panel .chat-emoji-empty{color:#abb;text-align:center}
.kfs-previews{display:flex;flex-wrap:wrap;gap:5px}
.kfs-preview{display:flex;align-items:center;gap:6px;min-width:0;max-width:100%;padding:5px 7px;border:1px solid #41505b;border-radius:6px;color:#cad4d8;background:#101a21;font-size:11px}
.kfs-preview img{height:30px;width:30px;object-fit:cover;border-radius:4px}
.kfs-preview>span:not(.kfs-pdf){max-width:175px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.kfs-preview button{padding:0 4px;border:0;background:none;color:rgba(var(--kyra-ui-240,211,187,252),1);font-size:20px;cursor:pointer}
.kfs-message-file,.sa-attachment{display:flex;flex-direction:column;gap:5px;color:rgba(var(--kyra-ui-227,204,177,252),1);font-size:11px;text-decoration:none;max-width:220px;margin-top:7px;overflow-wrap:anywhere}
.kfs-message-file img,.sa-attachment img{display:block;width:auto;max-height:155px;max-width:100%;border-radius:7px;object-fit:contain}
.sa-attachments{display:flex;gap:9px;flex-wrap:wrap}
@media(max-width:520px){.kfs-emoji-panel .chat-emoji-grid{grid-template-columns:repeat(7,minmax(0,1fr))}}


/* Support Chat: keep the attachment input strictly behind the single paperclip.
   app.js auto-enhances generic file inputs; never show its generated Choose file UI. */
.kfs-root input[type="file"][data-kfs-files]{display:none!important;position:absolute!important;width:0!important;height:0!important;opacity:0!important;pointer-events:none!important}
.kfs-root input[data-kfs-files]+.custom-file-control{display:none!important}


/* KF v22 — public Support Chat: single-line composer + square send button. */
.kfs-root .kfs-form{
  display:grid!important;grid-template-columns:minmax(0,1fr) 40px!important;
  grid-template-areas:'guest guest' 'label label' 'field send' 'previews previews' 'privacy privacy';
  column-gap:8px!important;row-gap:5px!important;align-items:center!important;
}
.kfs-root .kfs-guest{grid-area:guest;min-width:0}
.kfs-root .kfs-form>.kfs-label{grid-area:label}
.kfs-root .kfs-form>.kfs-compose-wrap{grid-area:field;min-width:0;height:40px}
.kfs-root .kfs-form>.kfs-previews{grid-area:previews;min-width:0}
.kfs-root .kfs-form>.kfs-actions{display:contents!important}
.kfs-root .kfs-form>.kfs-actions small{grid-area:privacy;min-width:0}
.kfs-root .kfs-form>.kfs-actions button{
  grid-area:send;display:grid!important;place-items:center!important;
  box-sizing:border-box!important;width:40px!important;height:40px!important;
  min-width:40px!important;max-width:40px!important;
  min-height:40px!important;max-height:40px!important;
  margin:0!important;padding:0!important;border-radius:7px!important;
  font-size:0!important;line-height:0!important;justify-self:end;
}
.kfs-root .kfs-form>.kfs-actions button::after{
  content:'↑';font:700 20px/1 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
}
.kfs-root .kfs-compose-wrap textarea{
  box-sizing:border-box!important;display:block!important;
  height:40px!important;min-height:40px!important;max-height:40px!important;
  padding:9px 75px 8px 11px!important;margin:0!important;
  line-height:20px!important;resize:none!important;
  white-space:pre!important;overflow-y:hidden!important;overflow-x:auto!important;
}
.kfs-root .kfs-compose-tools{
  right:5px!important;top:50%!important;bottom:auto!important;
  transform:translateY(-50%);align-items:center!important;
}

/* Keep long one-line placeholders from painting underneath the emoji / paperclip controls. */
.kfs-root .kfs-compose-tools{background:#0f1419;padding-left:5px;border-radius:5px}

/* KF v23: precise visual centering of send arrow inside 40x40 square. */
.kfs-root .kfs-form>.kfs-actions button{
  position:relative!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  text-align:center!important;
}
.kfs-root .kfs-form>.kfs-actions button::after{
  position:absolute!important;left:50%!important;top:50%!important;
  transform:translate(-50%,-52%)!important;
  display:block!important;width:auto!important;height:auto!important;
  margin:0!important;padding:0!important;line-height:1!important;
}
