.fyc { position: fixed; right: 20px; bottom: 20px; z-index: 9990; font-family: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.fyc.is-raised { bottom: var(--fyc-lift, 150px); }
.fyc *, .fyc *::before, .fyc *::after { box-sizing: border-box; }

.fyc .fyc-toggle {
  width: 58px; height: 58px; border-radius: 50%; border: 0; padding: 0; margin: 0;
  display: flex; align-items: center; justify-content: center;
  background: #000; color: #fff; cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,.22); transition: transform .2s ease;
}
.fyc .fyc-toggle:hover { transform: scale(1.05); background: #000; color: #fff; }
.fyc .fyc-ic-close { display: none; }
.fyc.is-open .fyc-ic-chat { display: none; }
.fyc.is-open .fyc-ic-close { display: block; }

.fyc-panel {
  position: absolute; right: 0; bottom: 72px; width: 370px; max-width: calc(100vw - 32px);
  height: 560px; max-height: calc(100vh - 120px); max-height: calc(100dvh - 120px);
  display: flex; flex-direction: column; background: #fff; color: #1f1a17;
  border-radius: 18px; overflow: hidden; box-shadow: 0 18px 50px rgba(0,0,0,.2);
  opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .2s ease, transform .2s ease, visibility 0s .2s;
}
.fyc.is-open .fyc-panel { opacity: 1; visibility: visible; transform: none; transition: opacity .2s ease, transform .2s ease; }

.fyc-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 14px 18px; background: #000; color: #fff; }
.fyc-head > div { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.fyc-head strong { font-size: 16px; font-weight: 500; }
.fyc-head span { font-size: 12px; opacity: .7; }
.fyc .fyc-human {
  flex: 0 0 auto; border: 1px solid rgba(255,255,255,.6); background: transparent; color: #fff;
  border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap;
}
.fyc .fyc-human:hover { background: #fff; color: #000; }
.fyc .fyc-close { border: 0; background: transparent; color: #fff; font-size: 26px; line-height: 1; padding: 0 2px; cursor: pointer; }
.fyc .fyc-close:hover { background: transparent; color: #fff; opacity: .7; }

.fyc-list { flex: 1 1 auto; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: #f6f3ef; }
.fyc-msg { max-width: 85%; padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }
.fyc-msg a { color: inherit; text-decoration: underline; }
.fyc-msg--assistant { align-self: flex-start; background: #fff; border-bottom-left-radius: 4px; }
.fyc-msg--user { align-self: flex-end; background: #000; color: #fff; border-bottom-right-radius: 4px; }

.fyc-typing { display: flex; gap: 4px; align-items: center; padding: 14px; }
.fyc-typing span { width: 7px; height: 7px; border-radius: 50%; background: #999; animation: fyc-dot 1s infinite ease-in-out; }
.fyc-typing span:nth-child(2) { animation-delay: .15s; }
.fyc-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes fyc-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.fyc-cta { padding: 10px 16px 0; background: #f6f3ef; }
.fyc-cta[hidden] { display: none; }
.fyc .fyc-human--big { width: 100%; background: #000; color: #fff; border-color: #000; padding: 10px; font-size: 14px; }
.fyc .fyc-human--big:hover { background: #333; color: #fff; }

.fyc-input { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; margin: 0; border-top: 1px solid #eee; background: #fff; }
.fyc .fyc-input textarea {
  flex: 1 1 auto; resize: none; border: 1px solid #ddd; border-radius: 12px; padding: 10px 12px;
  font: inherit; font-size: 14px; line-height: 1.4; max-height: 110px; min-height: 42px; background: #fff; color: #1f1a17; box-shadow: none;
}
.fyc .fyc-input textarea:focus { outline: none; border-color: #000; }
.fyc .fyc-send { width: 42px; height: 42px; flex: 0 0 42px; border: 0; border-radius: 50%; background: #000; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.fyc .fyc-send:hover { background: #333; color: #fff; }
.fyc .fyc-send:disabled { opacity: .4; cursor: default; }
.fyc-note { margin: 0; padding: 0 14px 10px; font-size: 12px; color: #595959; background: #fff; line-height: 1.4; }
.fyc-note a { color: #595959; }

.fyc-form { align-self: stretch; background: #fff; border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.fyc-form__title { margin: 0; font-size: 14px; font-weight: 500; }
.fyc-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #555; }
.fyc .fyc-form input[type="text"], .fyc .fyc-form input[type="email"], .fyc .fyc-form textarea {
  border: 1px solid #ddd; border-radius: 10px; padding: 9px 11px; font: inherit; font-size: 14px; color: #1f1a17; background: #fff; box-shadow: none;
}
.fyc .fyc-form input:focus, .fyc .fyc-form textarea:focus { outline: none; border-color: #000; }
.fyc-form .fyc-form__check { flex-direction: row; align-items: flex-start; gap: 8px; line-height: 1.4; }
.fyc-form__check input { margin-top: 2px; }
.fyc-form__check a { color: #000; }
.fyc-form__err { margin: 0; color: #a33; font-size: 12px; }
.fyc-form__err[hidden] { display: none; }
.fyc .fyc-form__submit { background: #000; color: #fff; border: 0; border-radius: 999px; padding: 11px; font: inherit; font-size: 14px; cursor: pointer; }
.fyc .fyc-form__submit:hover { background: #333; color: #fff; }
.fyc .fyc-form__submit:disabled { opacity: .5; }

.fiyonk-cart-open .fyc { display: none; }

@media (max-width: 520px) {
  .fyc { right: 14px; bottom: 14px; }
  .fyc.is-raised { bottom: var(--fyc-lift, 200px); }
  .fyc.is-open { inset: 0; right: 0; bottom: 0; }
  .fyc.is-open .fyc-toggle { display: none; }
  .fyc-panel { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; border-radius: 0; bottom: 0; }
}
