/* Felnath Web — chat assistant */
.fc-launch { position: fixed; right: 24px; bottom: 24px; z-index: 10001; width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer; background: var(--brand, #4f7cff); color: #fff; display: grid; place-items: center; box-shadow: 0 14px 34px -10px rgba(79,124,255,.75); transition: transform .25s ease, background .2s; }
.fc-launch:hover { background: var(--brand-deep, #3a63e6); transform: translateY(-2px); }
.fc-launch svg { width: 28px; height: 28px; fill: currentColor; transition: transform .3s ease, opacity .2s; }
.fc-launch .fc-x { position: absolute; opacity: 0; transform: rotate(-90deg); }
.fc-open .fc-launch .fc-bubble-ico { opacity: 0; transform: rotate(90deg); }
.fc-open .fc-launch .fc-x { opacity: 1; transform: none; }
.fc-dot { position: absolute; top: 3px; right: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--marigold, #f2b544); border: 2px solid #070b14; }
.fc-open .fc-dot, .fc-seen .fc-dot { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .fc-launch::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--brand, #4f7cff); animation: fc-ring 2.4s ease-out 3; }
  @keyframes fc-ring { from { transform: scale(1); opacity: .7; } to { transform: scale(1.6); opacity: 0; } }
}

/* teaser bubble */
.fc-teaser { position: fixed; right: 24px; bottom: 96px; z-index: 10001; max-width: 270px; background: #fff; color: #10142a; border-radius: 16px 16px 4px 16px; padding: 14px 36px 14px 16px; font: 500 .95rem/1.45 var(--body, Inter, sans-serif); box-shadow: 0 20px 40px -12px rgba(0,0,0,.6); cursor: pointer; opacity: 0; transform: translateY(10px) scale(.96); transform-origin: bottom right; pointer-events: none; transition: opacity .3s ease, transform .35s cubic-bezier(.2,.7,.2,1); }
.fc-teaser.is-on { opacity: 1; transform: none; pointer-events: auto; }
.fc-teaser b { display: block; font-family: var(--display, inherit); font-size: 1rem; margin-bottom: 2px; }
.fc-teaser button { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border: 0; background: transparent; color: #6b7290; font-size: 18px; cursor: pointer; border-radius: 50%; }
.fc-teaser button:hover { background: #eef0f8; }

/* panel */
.fc-panel { position: fixed; right: 24px; bottom: 96px; z-index: 10002; width: min(390px, calc(100vw - 32px)); height: min(620px, calc(100vh - 130px)); display: flex; flex-direction: column; background: #0d1322; border: 1px solid #263150; border-radius: 20px; overflow: hidden; box-shadow: 0 40px 80px -20px rgba(0,0,0,.85); font-family: var(--body, Inter, sans-serif); color: var(--text, #e9edf6); opacity: 0; visibility: hidden; transform: translateY(16px) scale(.97); transform-origin: bottom right; transition: opacity .25s ease, transform .3s cubic-bezier(.2,.7,.2,1), visibility 0s linear .3s; }
.fc-open .fc-panel { opacity: 1; visibility: visible; transform: none; transition: opacity .25s ease, transform .3s cubic-bezier(.2,.7,.2,1), visibility 0s; }
.fc-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 14px; background: linear-gradient(135deg, #1a2550, #121a33); border-bottom: 1px solid #263150; }
.fc-ava { position: relative; width: 42px; height: 42px; border-radius: 12px; background: #fff; display: grid; place-items: center; flex: none; }
.fc-ava img { width: 30px; height: 30px; border-radius: 6px; }
.fc-ava::after { content: ""; position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border-radius: 50%; background: #1fa855; border: 2px solid #16204a; }
.fc-head h2 { font: 700 1.02rem var(--display, inherit); margin: 0; letter-spacing: -.01em; }
.fc-head p { margin: 2px 0 0; font-size: .8rem; color: #9ba5bc; }
.fc-close { margin-left: auto; width: 34px; height: 34px; border-radius: 10px; border: 0; background: transparent; color: #9ba5bc; cursor: pointer; font-size: 20px; }
.fc-close:hover { background: rgba(255,255,255,.06); color: #fff; }

.fc-log { flex: 1; overflow-y: auto; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; overscroll-behavior: contain; }
.fc-msg { max-width: 86%; padding: 10px 13px; border-radius: 14px; font-size: .92rem; line-height: 1.5; white-space: pre-line; word-wrap: break-word; }
.fc-bot { align-self: flex-start; background: #182139; border: 1px solid #243052; border-top-left-radius: 4px; }
.fc-user { align-self: flex-end; background: var(--brand, #4f7cff); color: #fff; border-top-right-radius: 4px; }
.fc-msg a { color: var(--marigold, #f2b544); }
.fc-msg b { color: #fff; }
@media (prefers-reduced-motion: no-preference) { .fc-msg { animation: fc-pop .28s cubic-bezier(.2,.7,.2,1); } @keyframes fc-pop { from { opacity: 0; transform: translateY(6px); } } }
.fc-typing { display: inline-flex; gap: 4px; padding: 13px 14px; }
.fc-typing i { width: 7px; height: 7px; border-radius: 50%; background: #8892ab; animation: fc-blink 1s infinite ease-in-out; }
.fc-typing i:nth-child(2) { animation-delay: .15s; } .fc-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes fc-blink { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.fc-chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 2px 0 4px; }
.fc-chip { border: 1px solid #34416a; background: transparent; color: var(--text, #e9edf6); border-radius: 999px; padding: 7px 12px; font: 500 .84rem var(--body, Inter, sans-serif); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.fc-chip:hover { border-color: var(--marigold, #f2b544); color: #fff; }
.fc-chip.wa { background: #1fa855; border-color: #1fa855; color: #fff; }
.fc-chip.wa:hover { background: #18914a; }
.fc-chip.pri { background: var(--brand, #4f7cff); border-color: var(--brand, #4f7cff); color: #fff; }

.fc-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #263150; background: #0d1322; }
.fc-form input { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 12px; border: 1px solid #263150; background: #070b14; color: #fff; font: 400 16px var(--body, Inter, sans-serif); }
.fc-form input::placeholder { color: #6f7893; }
.fc-form input:focus { outline: 2px solid var(--brand, #4f7cff); outline-offset: 0; border-color: transparent; }
.fc-send { width: 46px; flex: none; border: 0; border-radius: 12px; background: var(--brand, #4f7cff); color: #fff; cursor: pointer; display: grid; place-items: center; }
.fc-send svg { width: 20px; height: 20px; fill: currentColor; }
.fc-send:disabled { opacity: .5; cursor: default; }
.fc-foot { text-align: center; font-size: .72rem; color: #6f7893; padding: 0 12px 10px; background: #0d1322; }
.fc-foot a { color: #9ba5bc; }

/* play nicely with existing floating buttons */
body.has-chat .call-float { display: none !important; }
body.has-chat .whatsapp-float { right: 30px !important; bottom: 96px !important; width: 48px !important; height: 48px !important; padding: 0 !important; justify-content: center !important; border-radius: 50% !important; }
body.has-chat .whatsapp-float span { display: none !important; }
body.has-chat .whatsapp-float svg { width: 24px; height: 24px; }
body.has-chat.fc-open .whatsapp-float, body.has-chat.fc-teasing .whatsapp-float { opacity: 0 !important; pointer-events: none !important; }

@media (max-width: 600px) {
  .fc-launch { right: 16px; bottom: 16px; width: 56px; height: 56px; }
  .fc-teaser { right: 16px; bottom: 84px; }
  .fc-panel { right: 0; bottom: 0; width: 100vw; height: 100dvh; max-height: none; border-radius: 0; border: 0; }
  .fc-open .fc-launch { display: none; }
  body.has-chat .whatsapp-float { right: 20px !important; bottom: 84px !important; }
}

/* ===== Agent look (v2) ===== */
.fc-launch { width: 66px; height: 66px; padding: 0; background: transparent; box-shadow: 0 14px 34px -8px rgba(91,124,255,.7), 0 0 0 3px rgba(255,255,255,.95); overflow: visible; }
.fc-launch:hover { background: transparent; transform: translateY(-2px) scale(1.03); }
.fc-launch .fc-agent { width: 100%; height: 100%; border-radius: 50%; display: block; transition: transform .3s ease, opacity .2s; }
.fc-launch svg.fc-agent { fill: initial; }
.fc-xwrap { position: absolute; inset: 0; border-radius: 50%; background: var(--brand, #4f7cff); display: grid; place-items: center; opacity: 0; transform: rotate(-90deg) scale(.6); transition: opacity .2s, transform .3s ease; }
.fc-xwrap svg { width: 26px; height: 26px; fill: #fff; position: static; opacity: 1; transform: none; }
.fc-open .fc-xwrap { opacity: 1; transform: none; }
.fc-open .fc-launch .fc-agent { opacity: 0; }
.fc-online { position: absolute; right: 2px; bottom: 2px; width: 16px; height: 16px; border-radius: 50%; background: #22c55e; border: 3px solid #fff; }
.fc-open .fc-online { display: none; }
.fc-dot { display: none !important; }
.fc-launch::after { border-color: rgba(124,140,255,.9); }
@media (prefers-reduced-motion: no-preference) {
  .fc-launch .fc-agent { animation: fc-wave 6s ease-in-out 2s infinite; transform-origin: 50% 90%; }
  @keyframes fc-wave { 0%, 88%, 100% { transform: rotate(0); } 91% { transform: rotate(-8deg); } 94% { transform: rotate(7deg); } 97% { transform: rotate(-4deg); } }
  .fc-eyes { animation: fc-eyeblink 4.5s infinite; transform-box: fill-box; transform-origin: center; }
  @keyframes fc-eyeblink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
  .fc-online { animation: fc-onl 2s ease-in-out infinite; }
  @keyframes fc-onl { 50% { box-shadow: 0 0 0 5px rgba(34,197,94,.25); } }
}

/* header avatar */
.fc-ava { background: transparent; width: 46px; height: 46px; border-radius: 50%; }
.fc-ava svg { width: 46px; height: 46px; border-radius: 50%; display: block; }
.fc-ava::after { background: #22c55e; border-color: #16204a; }
.fc-head p { display: flex; align-items: center; gap: 6px; }
.fc-live { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; display: inline-block; }

/* message rows with mini avatar */
.fc-row { display: flex; align-items: flex-end; gap: 8px; max-width: 92%; }
.fc-row .fc-msg { max-width: 100%; }
.fc-mini { width: 28px; height: 28px; flex: none; }
.fc-mini svg { width: 28px; height: 28px; border-radius: 50%; display: block; }
.fc-row + .fc-row .fc-mini, .fc-row + .fc-chips + .fc-row .fc-mini { visibility: visible; }
.fc-chips { padding-left: 36px; }

/* teaser with avatar */
.fc-teaser { display: flex; gap: 10px; align-items: flex-start; padding: 12px 34px 12px 12px; bottom: 102px; }
.fc-teaser-ava svg { width: 38px; height: 38px; border-radius: 50%; display: block; flex: none; }
.fc-teaser > span:nth-child(2) { display: block; }

@media (max-width: 600px) {
  .fc-launch { width: 60px; height: 60px; right: 16px; bottom: 18px; }
  .fc-teaser { bottom: 92px; }
  body.has-chat .whatsapp-float { bottom: 92px !important; }
}
