/* Bookwell AI pomočnik – Frajton Center (barve iz teme strani) */
.fc-chat { --c-ink: var(--ink, #2a2017); --c-bg: var(--bg, #fcf8f2); --c-paper: var(--paper, #f5ede0); --c-acc: var(--accent, #c9a052); --c-acc-ink: var(--accent-ink, #8a6a2c); --c-line: var(--line, rgba(42, 32, 23, 0.12)); --c-muted: var(--muted, #7a6b5b); font-family: var(--sans, system-ui, sans-serif); }

/* Gumb */
.fc-chat-launch {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  display: inline-flex; align-items: center; gap: 10px; height: 58px; padding: 0 22px 0 8px;
  border: 0; border-radius: 40px; cursor: pointer;
  background: var(--c-ink); color: #fff; font: 600 15px/1 var(--sans, system-ui); letter-spacing: 0.01em;
  box-shadow: 0 18px 40px -16px rgba(42, 32, 23, 0.7), 0 0 0 1px rgba(201, 160, 82, 0.35) inset;
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1), bottom 0.45s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.25s;
}
.fc-chat-launch:hover { transform: translateY(-2px); }
.fc-chat-launch:focus-visible { outline: 3px solid var(--c-acc); outline-offset: 3px; }
.fc-chat-avatar { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(160deg, #e6c272, var(--c-acc)); color: var(--c-ink); flex: none; }
.fc-chat-avatar svg { width: 22px; height: 22px; }
.fc-chat-avatar::after { content: ''; position: absolute; right: 0; bottom: 1px; width: 11px; height: 11px; border-radius: 50%; background: #6fbf73; box-shadow: 0 0 0 2px var(--c-ink); }
.fc-chat-launch .fc-chat-label small { display: block; margin-top: 3px; font-weight: 400; font-size: 12px; opacity: 0.72; }
.fc-chat.is-open .fc-chat-launch { opacity: 0; pointer-events: none; transform: scale(0.9); }

/* Pozdravni oblaček */
.fc-chat-hello {
  position: fixed; right: 20px; bottom: 90px; z-index: 60; max-width: 270px;
  padding: 14px 36px 14px 16px; border-radius: 14px 14px 4px 14px;
  background: #fff; color: var(--c-ink); font-size: 14.5px; line-height: 1.45;
  box-shadow: 0 20px 50px -20px rgba(42, 32, 23, 0.55), 0 0 0 1px var(--c-line);
  cursor: pointer; animation: fc-pop 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.fc-chat-hello[hidden] { display: none; }
.fc-chat-hello button { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent; color: var(--c-muted); font-size: 18px; line-height: 1; cursor: pointer; }
.fc-chat-hello button:hover { background: var(--c-paper); }
.fc-chat.is-open .fc-chat-hello { display: none; }

/* Okno */
.fc-chat-panel {
  position: fixed; right: 20px; bottom: 20px; z-index: 96;
  display: flex; flex-direction: column; width: min(400px, calc(100vw - 32px)); height: min(640px, calc(100vh - 40px)); height: min(640px, calc(100dvh - 40px));
  border-radius: 18px; overflow: hidden; background: var(--c-bg); color: var(--c-ink);
  box-shadow: 0 40px 90px -30px rgba(42, 32, 23, 0.6), 0 0 0 1px var(--c-line);
  transform-origin: bottom right; animation: fc-pop 0.35s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.fc-chat-panel[hidden] { display: none; }
@keyframes fc-pop { from { opacity: 0; transform: translateY(12px) scale(0.97); } to { opacity: 1; transform: none; } }

.fc-chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 12px 14px 16px; background: var(--c-ink); color: #fff; }
.fc-chat-head .fc-chat-avatar { width: 40px; height: 40px; }
.fc-chat-title { flex: 1; min-width: 0; }
.fc-chat-title strong { display: block; font: 500 17px/1.15 var(--serif, sans-serif); letter-spacing: 0.04em; text-transform: uppercase; }
.fc-chat-title span { display: block; margin-top: 3px; font-size: 12.5px; opacity: 0.72; }
.fc-chat-head a, .fc-chat-head button { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; }
.fc-chat-head a:hover, .fc-chat-head button:hover { background: rgba(255, 255, 255, 0.1); }
.fc-chat-head svg { width: 20px; height: 20px; }

.fc-chat-log { position: relative; flex: 1; overflow-y: auto; padding: 18px 16px 8px; scroll-behavior: smooth; overscroll-behavior: contain; background: radial-gradient(120% 60% at 100% 0, rgba(201, 160, 82, 0.09), transparent 60%), var(--c-bg); }
.fc-msg { display: flex; margin: 0 0 10px; }
.fc-msg p { margin: 0; max-width: 86%; padding: 10px 14px; border-radius: 16px; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-line; }
.fc-msg--bot p { background: #fff; border: 1px solid var(--c-line); border-bottom-left-radius: 5px; }
.fc-msg--me { justify-content: flex-end; }
.fc-msg--me p { background: var(--c-ink); color: #fff; border-bottom-right-radius: 5px; }
.fc-msg a { color: var(--c-acc-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.fc-msg--me a { color: #f0d79a; }
.fc-msg--err p { background: #fbefe9; border-color: #e8c7b7; }
.fc-msg--ok p { background: #eef5e7; border-color: #cfe0bd; }
.fc-typing p { display: inline-flex; gap: 5px; padding: 14px 16px; }
.fc-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--c-acc); animation: fc-dot 1.1s infinite ease-in-out; }
.fc-typing i:nth-child(2) { animation-delay: 0.15s; } .fc-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes fc-dot { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-4px); } }

.fc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.fc-chips button { padding: 8px 13px; border: 1px solid rgba(201, 160, 82, 0.55); border-radius: 30px; background: #fff; color: var(--c-ink); font: 500 13.5px/1.2 var(--sans, system-ui); cursor: pointer; transition: background 0.2s, border-color 0.2s; }
.fc-chips button:hover { background: var(--c-paper); border-color: var(--c-acc); }

.fc-chat-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px 8px; border-top: 1px solid var(--c-line); background: #fff; }
.fc-chat-form textarea { flex: 1; min-height: 44px; max-height: 120px; padding: 11px 14px; border: 1px solid var(--c-line); border-radius: 22px; background: var(--c-bg); color: var(--c-ink); font: 16px/1.35 var(--sans, system-ui); resize: none; }
.fc-chat-form textarea:focus { outline: 0; border-color: var(--c-acc); box-shadow: 0 0 0 3px rgba(201, 160, 82, 0.2); }
.fc-chat-form button { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: linear-gradient(160deg, #e6c272, var(--c-acc)); color: var(--c-ink); cursor: pointer; }
.fc-chat-form button:disabled { opacity: 0.45; cursor: default; }
.fc-chat-form button svg { width: 20px; height: 20px; }
.fc-chat-note { margin: 0; padding: 0 14px 10px; background: #fff; color: var(--c-muted); font-size: 11.5px; line-height: 1.4; text-align: center; }
.fc-chat-note a { color: inherit; }
.fc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Telefon: nad mobilnim gumbom »Pokliči / Povpraševanje«, okno čez cel zaslon */
@media (max-width: 767px) {
  .fc-chat-launch { right: 14px; bottom: 14px; height: 54px; padding: 0 8px; }
  .fc-chat-launch .fc-chat-label { display: none; }
  .fc-chat-hello { right: 14px; bottom: 80px; }
  body:has(.sticky-cta.is-visible) .fc-chat-launch { bottom: 84px; }
  body:has(.sticky-cta.is-visible) .fc-chat-hello { bottom: 150px; }
  .menu-open .fc-chat-launch, .menu-open .fc-chat-hello,
  body:has(.cookie-bar:not([hidden])) .fc-chat-launch, body:has(.cookie-bar:not([hidden])) .fc-chat-hello { opacity: 0; pointer-events: none; }
  .fc-chat-panel { inset: 0; width: 100%; height: 100%; border-radius: 0; padding-bottom: env(safe-area-inset-bottom); }
}
@media (prefers-reduced-motion: reduce) { .fc-chat-panel, .fc-chat-hello { animation: none; } .fc-typing i { animation: none; opacity: 0.7; } }
