/* Fix 'N Repair — Chat Widget */
.fnr-chat-root *,.fnr-chat-root *::before,.fnr-chat-root *::after{box-sizing:border-box;}
.fnr-chat-root{
  --fnr-chat-color:#e8312a;
  --fnr-chat-navy:#0e0f38;
  --fnr-chat-ink:#14172a;
  --fnr-chat-muted:#67708d;
  --fnr-chat-line:#e4e6f0;
  --fnr-chat-bg-bot:#f1f3f8;
  --fnr-chat-font:'Manrope',-apple-system,BlinkMacSystemFont,"SF Pro Display","Helvetica Neue",sans-serif;
  font-family:var(--fnr-chat-font);position:fixed;z-index:99998;-webkit-font-smoothing:antialiased;
}
.fnr-chat-root[data-pos="bottom-right"]{right:20px;bottom:20px;}
.fnr-chat-root[data-pos="bottom-left"]{left:20px;bottom:20px;}

/* Launcher */
.fnr-chat-launcher{position:relative;display:inline-flex;align-items:center;gap:10px;padding:14px 20px 14px 18px;background:var(--fnr-chat-color);color:#fff;border:none;border-radius:100px;font-family:var(--fnr-chat-font);font-size:14.5px;font-weight:700;letter-spacing:-.01em;cursor:pointer;box-shadow:0 10px 30px rgba(232,49,42,.35),0 4px 12px rgba(0,0,0,.08);transition:transform .25s cubic-bezier(.22,1,.36,1),box-shadow .25s;}
.fnr-chat-launcher:hover{transform:translateY(-2px);box-shadow:0 14px 36px rgba(232,49,42,.45),0 6px 16px rgba(0,0,0,.1);}
.fnr-chat-launcher-icon,.fnr-chat-launcher-close{width:22px;height:22px;flex-shrink:0;transition:transform .25s,opacity .2s;}
.fnr-chat-launcher-close{position:absolute;left:18px;top:50%;margin-top:-11px;opacity:0;transform:scale(.5) rotate(-90deg);}
.fnr-chat-root.open .fnr-chat-launcher-icon{opacity:0;transform:scale(.5) rotate(90deg);}
.fnr-chat-root.open .fnr-chat-launcher-close{opacity:1;transform:scale(1) rotate(0);}
.fnr-chat-root.open .fnr-chat-launcher-label{opacity:0;transform:translateX(-8px);}
.fnr-chat-launcher-label{transition:opacity .2s,transform .2s;}
.fnr-chat-launcher-pulse{position:absolute;inset:-4px;border-radius:100px;border:2px solid var(--fnr-chat-color);opacity:0;animation:fnrChatPulse 2.4s ease-out infinite;pointer-events:none;}
@keyframes fnrChatPulse{0%{opacity:.4;transform:scale(1);}100%{opacity:0;transform:scale(1.18);}}
.fnr-chat-root.open .fnr-chat-launcher-pulse{display:none;}

/* Panel */
.fnr-chat-panel{position:absolute;bottom:calc(100% + 14px);width:380px;max-width:calc(100vw - 40px);height:560px;max-height:calc(100vh - 120px);background:#fff;border-radius:20px;box-shadow:0 20px 60px rgba(14,15,56,.25),0 8px 24px rgba(14,15,56,.12);display:flex;flex-direction:column;overflow:hidden;opacity:0;transform:translateY(20px) scale(.96);visibility:hidden;transition:opacity .28s cubic-bezier(.22,1,.36,1),transform .28s cubic-bezier(.22,1,.36,1),visibility 0s .28s;}
.fnr-chat-root[data-pos="bottom-right"] .fnr-chat-panel{right:0;}
.fnr-chat-root[data-pos="bottom-left"]  .fnr-chat-panel{left:0;}
.fnr-chat-root.open .fnr-chat-panel{opacity:1;transform:translateY(0) scale(1);visibility:visible;transition:opacity .28s,transform .28s,visibility 0s;}

/* Header */
.fnr-chat-header{display:flex;align-items:center;gap:12px;padding:18px 18px 16px;background:linear-gradient(135deg,var(--fnr-chat-navy) 0%,#2d3180 100%);color:#fff;flex-shrink:0;}
.fnr-chat-header-avatar{width:40px;height:40px;border-radius:50%;background:var(--fnr-chat-color);display:flex;align-items:center;justify-content:center;font-weight:800;font-size:14px;letter-spacing:.04em;flex-shrink:0;}
.fnr-chat-header-text{flex:1;min-width:0;}
.fnr-chat-header-title{font-size:15.5px;font-weight:800;letter-spacing:-.015em;}
.fnr-chat-header-sub{font-size:12px;opacity:.85;margin-top:2px;display:flex;align-items:center;gap:6px;}
.fnr-chat-header-sub::before{content:'';width:7px;height:7px;border-radius:50%;background:#22c55e;box-shadow:0 0 0 0 rgba(34,197,94,.6);animation:fnrChatDot 2s infinite;}
@keyframes fnrChatDot{0%,100%{box-shadow:0 0 0 0 rgba(34,197,94,.6);}50%{box-shadow:0 0 0 5px rgba(34,197,94,0);}}
.fnr-chat-header-close{background:rgba(255,255,255,.12);border:none;color:#fff;width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:background .15s;}
.fnr-chat-header-close:hover{background:rgba(255,255,255,.22);}
.fnr-chat-header-close svg{width:14px;height:14px;}

/* Messages */
.fnr-chat-messages{flex:1;overflow-y:auto;padding:18px;display:flex;flex-direction:column;gap:8px;background:#fafbfd;}
.fnr-chat-msg{display:flex;align-items:flex-end;gap:8px;max-width:85%;animation:fnrChatIn .25s cubic-bezier(.22,1,.36,1) both;}
.fnr-chat-msg.bot{align-self:flex-start;}
.fnr-chat-msg.user{align-self:flex-end;flex-direction:row-reverse;}
.fnr-chat-bubble{padding:10px 14px;border-radius:18px;font-size:14.5px;line-height:1.5;word-wrap:break-word;}
.fnr-chat-msg.bot .fnr-chat-bubble{background:var(--fnr-chat-bg-bot);color:var(--fnr-chat-ink);border-bottom-left-radius:4px;}
.fnr-chat-msg.user .fnr-chat-bubble{background:var(--fnr-chat-color);color:#fff;border-bottom-right-radius:4px;}
.fnr-chat-bubble strong{font-weight:700;}
.fnr-chat-bubble a{color:inherit;text-decoration:underline;}
.fnr-chat-typing{padding:10px 16px;background:var(--fnr-chat-bg-bot);border-radius:18px;border-bottom-left-radius:4px;display:inline-flex;gap:4px;align-self:flex-start;}
.fnr-chat-typing span{width:7px;height:7px;border-radius:50%;background:var(--fnr-chat-muted);animation:fnrChatTyping 1.2s infinite;}
.fnr-chat-typing span:nth-child(2){animation-delay:.2s;}
.fnr-chat-typing span:nth-child(3){animation-delay:.4s;}
@keyframes fnrChatTyping{0%,60%,100%{transform:translateY(0);opacity:.4;}30%{transform:translateY(-5px);opacity:1;}}
@keyframes fnrChatIn{from{opacity:0;transform:translateY(6px);}to{opacity:1;transform:translateY(0);}}

/* Quick Replies */
.fnr-chat-quick{padding:0 14px 6px;display:flex;flex-wrap:wrap;gap:6px;background:#fafbfd;}
.fnr-chat-quick:empty{display:none;}
.fnr-chat-quick-btn{background:#fff;border:1.5px solid var(--fnr-chat-line);color:var(--fnr-chat-navy);font-family:var(--fnr-chat-font);font-size:12.5px;font-weight:600;padding:8px 12px;border-radius:100px;cursor:pointer;transition:border-color .15s,background .15s;animation:fnrChatIn .25s cubic-bezier(.22,1,.36,1) both;}
.fnr-chat-quick-btn:hover{border-color:var(--fnr-chat-color);background:#fff5f5;}

/* Input */
.fnr-chat-input{display:flex;align-items:center;gap:8px;padding:14px;border-top:1px solid var(--fnr-chat-line);background:#fff;}
.fnr-chat-input input{flex:1;padding:11px 14px;border:1.5px solid var(--fnr-chat-line);border-radius:100px;font-family:var(--fnr-chat-font);font-size:14.5px;outline:none;color:var(--fnr-chat-ink);transition:border-color .15s;}
.fnr-chat-input input:focus{border-color:var(--fnr-chat-color);}
.fnr-chat-input button{width:40px;height:40px;border-radius:50%;background:var(--fnr-chat-color);color:#fff;border:none;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;transition:filter .15s,transform .15s;}
.fnr-chat-input button:hover{filter:brightness(1.08);transform:scale(1.05);}
.fnr-chat-input button:active{transform:scale(.95);}
.fnr-chat-input button svg{width:16px;height:16px;}
.fnr-chat-foot{font-size:10.5px;color:var(--fnr-chat-muted);text-align:center;padding:6px 0 10px;background:#fff;letter-spacing:.04em;}

@media(max-width:480px){
  .fnr-chat-launcher-label{display:none;}
  .fnr-chat-launcher{padding:14px;}
  .fnr-chat-root[data-pos="bottom-right"]{right:14px;bottom:14px;}
  .fnr-chat-root[data-pos="bottom-left"]{left:14px;bottom:14px;}
  .fnr-chat-panel{width:calc(100vw - 28px);height:calc(100vh - 100px);max-height:calc(100vh - 100px);}
}
