/* Frieda's chat (Friedas Core, chat.js). Colours, type and radii come from the website theme's tokens (fc.css), with
   fallbacks so the widget also works on a site without them; dark follows the theme's [data-theme="dark"]. */
#fc-chat {
  --fcc-bg: var(--surface, #fbf9f5);
  --fcc-bg-2: var(--bg, #f1ede6);
  --fcc-text: var(--text, #23201d);
  --fcc-muted: var(--muted, #6b625a);
  --fcc-line: var(--line, #d6cec1);
  --fcc-brand: var(--line-strong, #8c8172); /* hover borders: the theme's neutral, no brown */
  --fcc-accent: var(--accent, #e89b3c);
  --fcc-on-accent: var(--on-accent, #23201d);
  --fcc-link: var(--link, #8a4f0e);
  --fcc-focus: var(--focus, #1f6feb);
  --fcc-shadow: var(--shadow-2, 0 2px 6px rgb(35 32 29 / .08), 0 14px 40px rgb(35 32 29 / .1));
  --fcc-r: var(--r-md, 12px);
  position: fixed; right: 20px; bottom: 20px; z-index: 9990;
  font: 400 15px/1.5 var(--font-body, "Inter", ui-sans-serif, system-ui, sans-serif);
  color: var(--fcc-text);
}
#fc-chat *, #fc-chat *::before, #fc-chat *::after { box-sizing: border-box; }
#fc-chat [hidden] { display: none !important; }
#fc-chat :focus-visible { outline: 3px solid var(--fcc-focus); outline-offset: 2px; }

.fc-chat__launch {
  display: flex; align-items: center; gap: 10px; padding: 6px 18px 6px 6px; border: 0; border-radius: 999px;
  background: var(--fcc-bg); color: var(--fcc-text); font: 600 15px/1.2 inherit; font-family: inherit; cursor: pointer;
  box-shadow: var(--fcc-shadow); transition: transform .2s, background .2s;
}
.fc-chat__launch:hover { background: var(--fcc-accent); transform: translateY(-2px); }
/* round: Frieda's face only, in a ring of the brand colour */
#fc-chat .fc-chat__launch { width: 64px; height: 64px; padding: 3px; gap: 0; justify-content: center; border-radius: 50%; }
.fc-chat__launch img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: var(--fcc-bg-2); }

.fc-chat__panel {
  position: absolute; right: 0; bottom: 0; display: flex; flex-direction: column; overflow: hidden;
  width: min(400px, calc(100vw - 24px)); height: min(640px, calc(100dvh - 40px));
  background: var(--fcc-bg); border: 1px solid var(--fcc-line); border-radius: calc(var(--fcc-r) + 6px);
  box-shadow: var(--fcc-shadow); animation: fc-chat-in .18s ease-out; transform-origin: bottom right;
}
.fc-chat__scrim { position: fixed; inset: 0; background: var(--overlay, rgb(20 17 14 / .62)); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fc-chat-fade .18s ease-out; -webkit-tap-highlight-color: transparent; } /* as Core's dialog backdrop */
@keyframes fc-chat-fade { from { opacity: 0; } }
@keyframes fc-chat-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

.fc-chat__head { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; background: var(--fcc-bg); color: var(--fcc-text); border-bottom: 1px solid var(--fcc-line); }
.fc-chat__avatar { width: 46px; height: 46px; flex: none; border-radius: 50%; object-fit: cover; background: var(--fcc-bg-2); box-shadow: 0 0 0 1px var(--fcc-line); } /* Frieda, round and still: chat/frieda-avatar.webp (132 × 132) */
.fc-chat__who { flex: 1; min-width: 0; }
.fc-chat__who strong { display: block; font-size: 16px; }
.fc-chat__who span { display: block; font-size: 12.5px; color: var(--fcc-muted); }
.fc-chat__close, .fc-chat__grow { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--fcc-muted); cursor: pointer; }
.fc-chat__close { font-size: 24px; line-height: 1; }
.fc-chat__close:hover, .fc-chat__grow:hover { background: var(--fcc-bg-2); color: var(--fcc-text); }
.fc-chat__head > button + button { margin-left: -10px; } /* new chat, larger window and close sit close together */

.fc-chat__body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 16px 14px; background: var(--fcc-bg-2); overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--fcc-line) transparent; }
.fc-chat__body::-webkit-scrollbar { width: 6px; }
.fc-chat__body::-webkit-scrollbar-thumb { background: var(--fcc-line); border-radius: 3px; }
.fc-chat__msg { max-width: 88%; padding: 10px 13px; border-radius: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.fc-chat__msg--frieda { align-self: flex-start; background: var(--fcc-bg); border: 1px solid var(--fcc-line); border-bottom-left-radius: 4px; }
.fc-chat__msg--guest { align-self: flex-end; background: var(--fcc-accent); color: var(--fcc-on-accent); border-bottom-right-radius: 4px; }
.fc-chat__msg a { color: var(--fcc-link); }
.fc-chat__msg a.fc-chat__action { color: var(--fcc-text); }

.fc-chat__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fc-chat__chip, .fc-chat__action {
  display: inline-flex; align-items: center; min-height: 36px; padding: 6px 13px; border: 1px solid var(--fcc-line); border-radius: 999px;
  background: var(--fcc-bg); color: var(--fcc-text); font: 600 13.5px/1.25 inherit; font-family: inherit; text-decoration: none; cursor: pointer;
}
.fc-chat__chip:hover, .fc-chat__action:hover { border-color: var(--fcc-brand); }
.fc-chat__action--primary { background: var(--fcc-accent); border-color: var(--fcc-accent); color: var(--fcc-on-accent); }
.fc-chat__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; white-space: normal; }
.fc-chat__sources { margin: 8px 0 0; font-size: 12.5px; color: var(--fcc-muted); white-space: normal; }

.fc-chat__typing { display: inline-flex; align-items: center; gap: 5px; padding: 14px 15px; }
.fc-chat__typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--fcc-muted); opacity: .35; animation: fc-chat-dot 1.3s ease-in-out infinite; }
.fc-chat__typing i:nth-child(2) { animation-delay: .16s; }
.fc-chat__typing i:nth-child(3) { animation-delay: .32s; }
@keyframes fc-chat-dot { 0%, 60%, 100% { opacity: .35; transform: none; } 30% { opacity: 1; transform: translateY(-4px); } } /* a soft wave */

/* new messages slide in; Frieda's words fade in inside a bubble that already has its final size; then her buttons, cards,
   sources and thumbs one after the other */
.fc-chat__msg { animation: fc-chat-msg .24s cubic-bezier(.2, .7, .3, 1) both; }
.fc-chat__msg--guest { transform-origin: bottom right; }
.fc-chat__msg--frieda { transform-origin: bottom left; }
@keyframes fc-chat-msg { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.fc-chat__w { opacity: 0; transition: opacity .32s ease-out; }
.fc-chat__w.is-on { opacity: 1; }
.fc-chat__msg.is-done > :is(.fc-chat__rate, .fc-chat__sources), .fc-chat__msg.is-done > :is(.fc-chat__cards, .fc-chat__actions) > * { animation: fc-chat-up .3s cubic-bezier(.2, .7, .3, 1) both; }
.fc-chat__msg.is-done > * > :nth-child(2) { animation-delay: .07s; }
.fc-chat__msg.is-done > * > :nth-child(3) { animation-delay: .14s; }
.fc-chat__msg.is-done > * > :nth-child(n+4) { animation-delay: .21s; }
@keyframes fc-chat-up { from { opacity: 0; transform: translateY(6px); } }

.fc-chat__handover { align-self: stretch; display: grid; gap: 10px; padding: 14px; background: var(--fcc-bg); border: 1px solid var(--fcc-line); border-radius: var(--fcc-r); }
.fc-chat__field { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.fc-chat__field input { min-height: 40px; padding: 8px 10px; border: 1px solid var(--fcc-line); border-radius: 8px; background: var(--fcc-bg); color: var(--fcc-text); font: 400 15px/1.3 inherit; font-family: inherit; }
.fc-chat__consent { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.fc-chat__consent input { margin-top: 3px; flex: none; }
.fc-chat__row { display: flex; gap: 8px; flex-wrap: wrap; }
.fc-chat__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.fc-chat__error { margin: 0; font-size: 13px; color: var(--danger, #b3261e); }

.fc-chat__foot { padding: 10px 12px 12px; border-top: 1px solid var(--fcc-line); background: var(--fcc-bg); }
.fc-chat__form { display: flex; gap: 8px; align-items: flex-end; }
.fc-chat__input {
  flex: 1; min-width: 0; max-height: 120px; resize: none; padding: 10px 12px; border: 1px solid var(--fcc-line); border-radius: 14px;
  background: var(--fcc-bg); color: var(--fcc-text); font: 400 16px/1.4 inherit; font-family: inherit;
}
.fc-chat__send { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--fcc-accent); color: var(--fcc-on-accent); cursor: pointer; }
.fc-chat__send:disabled { opacity: .5; cursor: wait; }
.fc-chat__restart { display: flex; align-items: center; gap: 10px; margin: 4px 0 2px; animation: fc-chat-up .3s cubic-bezier(.2, .7, .3, 1) both; } /* a quiet line between two hairlines, after the latest reply */
.fc-chat__restart::before, .fc-chat__restart::after { content: ""; flex: 1; height: 1px; background: var(--fcc-line); }
.fc-chat__restart button { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 10px; border: 1px solid var(--fcc-line); border-radius: 999px; background: var(--fcc-bg); color: var(--fcc-muted); font: 600 12.5px/1.3 inherit; font-family: inherit; cursor: pointer; transition: color .15s, border-color .15s; }
.fc-chat__restart button:hover { color: var(--fcc-text); border-color: var(--fcc-brand); }
.fc-chat__note { margin: 7px 2px 0; font-size: 11.5px; line-height: 1.4; color: var(--fcc-muted); }
.fc-chat__note a { color: inherit; }
.fc-chat__note-more { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.fc-chat__note-more:hover, .fc-chat__note a:hover { color: var(--fcc-text); }

@media (max-width: 520px) {
  #fc-chat { right: 12px; bottom: 12px; }
  #fc-chat .fc-chat__launch { width: 58px; height: 58px; }
  .fc-chat__panel { position: fixed; inset: auto 8px 8px 8px; width: auto; height: min(680px, calc(100dvh - 16px)); }
}
@media (prefers-reduced-motion: reduce) {
  .fc-chat__panel, .fc-chat__launch, .fc-chat__typing i, .fc-chat__scrim, .fc-chat__msg, .fc-chat__msg *, .fc-chat__restart { animation: none !important; transition: none !important; }
  .fc-chat__typing i { opacity: .6; }
}

/* thumbs up / down under Frieda's replies */
.fc-chat__rate { display: flex; align-items: center; gap: 2px; margin-top: 6px; white-space: normal; }
.fc-chat__thumb { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--fcc-muted); cursor: pointer; }
.fc-chat__thumb:hover { background: var(--fcc-bg-2); color: var(--fcc-text); }
.fc-chat__thumb[aria-pressed="true"] { color: var(--fcc-accent); background: var(--fcc-bg-2); }
.fc-chat__rate[data-thanks]::after { content: attr(data-thanks); margin-left: 6px; font-size: 12px; color: var(--fcc-muted); }

/* the teaser next to the button */
.fc-chat__teaser { position: absolute; right: 0; bottom: calc(100% + 12px); display: flex; align-items: flex-start; gap: 4px; width: max-content; max-width: min(260px, calc(100vw - 32px)); padding: 11px 6px 11px 14px; background: var(--fcc-bg); color: var(--fcc-text); border: 1px solid var(--fcc-line); border-radius: 18px 18px 4px 18px; box-shadow: var(--fcc-shadow); animation: fc-chat-in .25s ease-out; }
.fc-chat__teaser::after { content: ""; position: absolute; right: 22px; bottom: -7px; width: 12px; height: 12px; background: inherit; border-right: 1px solid var(--fcc-line); border-bottom: 1px solid var(--fcc-line); transform: rotate(45deg); } /* the bubble's tail towards Frieda */
.fc-chat__teaser-text { flex: 1; display: grid; gap: 3px; padding: 0; border: 0; background: none; color: inherit; font-family: inherit; text-align: left; cursor: pointer; }
.fc-chat__teaser-lead { font-size: 12px; font-weight: 500; color: var(--fcc-muted); }
.fc-chat__teaser-q { font-size: 14.5px; font-weight: 600; line-height: 1.35; transition: opacity .25s, transform .25s; }
.fc-chat__teaser-q.is-out { opacity: 0; transform: translateY(4px); }
.fc-chat__teaser-text:hover .fc-chat__teaser-q { text-decoration: underline; text-underline-offset: 3px; }
.fc-chat__teaser-x { width: 26px; height: 26px; flex: none; border: 0; border-radius: 50%; background: transparent; color: var(--fcc-muted); font-size: 18px; line-height: 1; cursor: pointer; }
.fc-chat__launch.is-nudge { animation: fc-chat-nudge 1.2s ease-in-out 2; }
@keyframes fc-chat-nudge { 0%, 100% { transform: none; } 30% { transform: translateY(-4px) rotate(-3deg); } 60% { transform: translateY(0) rotate(2deg); } }

/* while the chat is open the page behind it stays put; on the phone the chat is a full-screen sheet */
html.fc-chat-lock { overflow: hidden; } /* only the page itself: hidden on body too would make body the scroller and the site's sticky header slide away */
html.fc-chat-lock { scrollbar-gutter: stable; } /* the page does not jump sideways when its scrollbar goes */
@media (max-width: 520px) {
  /* below WordPress's admin bar when someone is logged in (it sets --wp-admin--admin-bar--height) */
  .fc-chat__panel { inset: var(--wp-admin--admin-bar--height, 0px) 0 0 0 !important; width: 100% !important; height: calc(100dvh - var(--wp-admin--admin-bar--height, 0px)) !important; border-radius: 0; border: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .fc-chat__teaser, .fc-chat__launch.is-nudge { animation: none; }
  .fc-chat__teaser-q { transition: none; }
}

/* vehicle cards: a free camper with photo and "Jetzt buchen" straight into the booking */
.fc-chat__cards { display: grid; gap: 10px; margin-top: 10px; white-space: normal; }
.fc-chat__card { overflow: hidden; border: 1px solid var(--fcc-line); border-radius: var(--fcc-r); background: var(--fcc-bg-2); }
.fc-chat__card-img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: var(--fcc-line); }
.fc-chat__card-body { display: grid; gap: 3px; padding: 10px 12px 12px; }
.fc-chat__card-title { font-size: 15px; line-height: 1.3; }
.fc-chat__card-facts { font-size: 13px; color: var(--fcc-muted); }
.fc-chat__card-price { font-size: 13.5px; font-weight: 600; }
.fc-chat__card-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.fc-chat__msg .fc-chat__card-row a.fc-chat__action--primary { color: var(--fcc-on-accent); }
.fc-chat__card-more { font-size: 13px; font-weight: 600; color: var(--fcc-link); }


/* a button in the chat opens another page: until it is there, a spinner on the button and a bar running under the header */
.fc-chat__status { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fc-chat__head { position: relative; }
.fc-chat__panel.is-leaving .fc-chat__head::after { content: ""; position: absolute; z-index: 2; left: 0; right: 0; bottom: -2px; height: 3px; background: linear-gradient(90deg, transparent, var(--fcc-accent) 35%, var(--fcc-accent) 65%, transparent); background-size: 40% 100%; background-repeat: no-repeat; animation: fc-chat-run 1.1s ease-in-out infinite; }
@keyframes fc-chat-run { from { background-position: -40% 0; } to { background-position: 140% 0; } }
.fc-chat__panel.is-leaving .fc-chat__body { opacity: .75; transition: opacity .3s; }
.fc-chat__panel.is-leaving a { pointer-events: none; } /* one tap is enough */
a.is-going { position: relative; gap: 8px; }
.fc-chat__action.is-going::before { margin-right: 0; } /* the pill buttons are flex: their gap makes the space; a text link („Details“) is inline, the spinner an inline-block with its own space – as a plain inline box only its left edge showed */
a.is-going::before { content: ""; display: inline-block; box-sizing: border-box; width: 13px; height: 13px; margin-right: 6px; vertical-align: -2px; flex: none; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: fc-chat-spin .7s linear infinite; }
@keyframes fc-chat-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .fc-chat__panel.is-leaving .fc-chat__head::after { animation: none; background: var(--fcc-accent); }
  a.is-going::before { animation: none; border-right-color: currentColor; opacity: .6; }
}
.fc-chat__note a.is-going::before, .fc-chat__sources a.is-going::before { width: 10px; height: 10px; margin-right: 4px; vertical-align: -1px; border-width: 1.5px; } /* the small print's links: a smaller spinner */

/* out of the way while the site's menu (or any Bricks off-canvas, e.g. a filter drawer) is open; it comes back as it was */
html.mm-open #fc-chat, html:has(.brxe-offcanvas.brx-open) #fc-chat { display: none; }
/* a bar fixed at the bottom of the window (booking, a vehicle's enquiry, the filters' "apply"): its buttons sit where
   Frieda's button would – the button and its bubble step aside while it shows (chat.js sets html.fc-has-bar) */
html.fc-has-bar #fc-chat .fc-chat__launch, html.fc-has-bar #fc-chat .fc-chat__teaser { display: none; }

/* the larger window: more room for cards and long answers (desktop and tablet; the phone is full-screen anyway) */
.fc-chat__grow .fc-chat__grow-in, #fc-chat.is-big .fc-chat__grow .fc-chat__grow-out { display: none; }
#fc-chat.is-big .fc-chat__grow .fc-chat__grow-in { display: inline; }
#fc-chat.is-big .fc-chat__panel { width: min(760px, calc(100vw - 40px)); height: calc(100dvh - 40px - var(--wp-admin--admin-bar--height, 0px)); }
#fc-chat.is-big .fc-chat__msg { max-width: 78%; }
#fc-chat.is-big .fc-chat__msg--frieda:has(.fc-chat__cards) { width: 94%; max-width: 94%; }
#fc-chat.is-big .fc-chat__cards { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
@media (max-width: 520px) {
  .fc-chat__grow { display: none; }
}
/* the trip picker (tool ask_trip): travellers, dog, pick-up day, nights – one tap instead of a list of questions */
.fc-chat__trip { display: grid; gap: 10px; margin-top: 12px; padding: 12px; border: 1px solid var(--fcc-line); border-radius: var(--fcc-r); background: var(--fcc-bg-2); white-space: normal; }
.fc-chat__trip-row { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 8px; }
.fc-chat__trip-label { font-size: 12.5px; font-weight: 600; color: var(--fcc-muted); }
.fc-chat__seg { display: flex; flex-wrap: wrap; gap: 3px; }
.fc-chat__seg button { min-width: 30px; height: 30px; padding: 0 9px; border: 1px solid var(--fcc-line); border-radius: 999px; background: var(--fcc-bg); color: var(--fcc-text); font: 600 13.5px/1 inherit; font-family: inherit; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.fc-chat__seg button:hover:not(:disabled) { border-color: var(--fcc-brand); }
.fc-chat__seg--fill { flex-wrap: nowrap; }
.fc-chat__seg--fill button { flex: 1 1 0; min-width: 0; padding: 0; } /* 1–6 share the row evenly */
.fc-chat__seg button[aria-pressed="true"] { background: var(--fcc-accent); border-color: var(--fcc-accent); color: var(--fcc-on-accent); }
.fc-chat__trip-date { width: 100%; min-height: 34px; padding: 5px 9px; border: 1px solid var(--fcc-line); border-radius: 9px; background: var(--fcc-bg); color: var(--fcc-text); font: 400 14px/1.3 inherit; font-family: inherit; color-scheme: light dark; }
.fc-chat__step { display: inline-flex; align-items: center; gap: 2px; justify-self: start; padding: 2px; border: 1px solid var(--fcc-line); border-radius: 999px; background: var(--fcc-bg); }
.fc-chat__step button { width: 30px; height: 28px; border: 0; border-radius: 999px; background: transparent; color: var(--fcc-text); font: 600 17px/1 inherit; font-family: inherit; cursor: pointer; }
.fc-chat__step button:hover:not(:disabled) { background: var(--fcc-bg-2); }
.fc-chat__step button:disabled { opacity: .35; cursor: default; }
.fc-chat__step output { min-width: 26px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.fc-chat__trip-hint { margin: 0; font-size: 12.5px; color: var(--danger, #b3261e); }
.fc-chat__trip-go { justify-content: center; width: 100%; min-height: 40px; }
.fc-chat__trip-go:disabled { opacity: .5; cursor: default; }
.fc-chat__trip.is-used { opacity: .6; }
.fc-chat__trip.is-used .fc-chat__trip-go, .fc-chat__trip.is-used .fc-chat__trip-hint { display: none; }
.fc-chat__msg:has(.fc-chat__trip) { width: 88%; }
.fc-chat__pick .fc-chat__trip-row { grid-template-columns: 1fr; gap: 5px; } /* longer labels and options: the label above its row */
.fc-chat__pick .fc-chat__seg button { height: auto; min-height: 30px; padding: 5px 11px; line-height: 1.2; }
.fc-chat__pick .fc-chat__seg--fill button { padding: 5px 0; }
.fc-chat__msg.is-done > .fc-chat__trip { animation: fc-chat-up .3s cubic-bezier(.2, .7, .3, 1) both; }
.fc-chat__card .fc-chat__action--primary { flex: 1 1 100%; justify-content: center; text-align: center; }
