/* Enkel svarsbot (Tommy 2026-11-19) – marinblått + vitt som "Vad gäller det?"-menyn */
.fc-knapp { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 900; width: 60px; height: 60px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .85); background: #0F1E2E; color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .55); transition: transform .15s ease; }
.fc-knapp:hover { transform: scale(1.05); }
.fc-knapp svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fc-panel { margin: 0 !important; padding: 0 !important; min-height: 0 !important; position: fixed; right: 18px; bottom: calc(90px + env(safe-area-inset-bottom)); z-index: 900; width: min(380px, calc(100vw - 24px)); height: min(560px, calc(100svh - 130px)); display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; background: #fff; color: #0F1E2E; box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .6); font-family: inherit; animation: fcUpp .25s cubic-bezier(.2, .8, .2, 1); }
.fc-panel[hidden] { display: none; }
@keyframes fcUpp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.fc-topp { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; background: #0F1E2E; color: #fff; }
.fc-topp img { width: 40px; height: 40px; border-radius: 50%; background: #fff; }
.fc-topp div { flex: 1; min-width: 0; }
.fc-topp strong { display: block; font-size: 15.5px; font-weight: 800; }
.fc-topp small { display: block; font-size: 12.5px; opacity: .8; }
.fc-stang { width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; display: grid; place-items: center; cursor: pointer; }
.fc-stang svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.fc-logg { flex: 1; overflow-y: auto; padding: 16px 14px 10px; background: #F4F7FA; display: flex; flex-direction: column; gap: 10px; }
.fc-bubbla { white-space: pre-line; max-width: 86%; padding: 11px 14px; border-radius: 18px; font-size: 16px; line-height: 1.5; }
.fc-jag { align-self: flex-start; background: #fff; color: #0F1E2E; border-bottom-left-radius: 6px; box-shadow: 0 1px 3px rgba(15, 30, 46, .08); }
.fc-du { align-self: flex-end; background: #0F1E2E; color: #fff; border-bottom-right-radius: 6px; }
.fc-lank { display: inline-block; margin-top: 8px; font-weight: 800; color: #0F1E2E; text-decoration: underline; text-underline-offset: 3px; }
.fc-val { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.fc-val-rubrik { flex: 0 0 100%; margin: 4px 0 0; font-size: 13px; font-weight: 700; color: #5B6B7C; }
.fc-chip { min-height: 42px; padding: 10px 16px; border: 1.5px solid #0F1E2E; border-radius: 99px; background: #fff; color: #0F1E2E; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.fc-chip:hover { background: #0F1E2E; color: #fff; }
.fc-fot { display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid #E8ECF0; background: #fff; }
.fc-fot a { flex: 1; text-align: center; padding: 11px 8px; border-radius: 99px; background: #F1F5F9; color: #0F1E2E; font-size: 14px; font-weight: 800; text-decoration: none; }
.fc-fot a:first-child { background: #0F1E2E; color: #fff; }
@media (max-width: 520px) {
  .fc-panel { right: 0; left: 0; bottom: 0; width: 100%; height: min(80svh, 620px); border-radius: 22px 22px 0 0; }
  .fc-knapp { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); width: 56px; height: 56px; }
  .fc-panel:not([hidden]) ~ .fc-knapp { display: none; }
}
@media (prefers-reduced-motion: reduce) { .fc-panel { animation: none; } }
/* Liten gubbe i stället för loggan (Tommy 2026-11-19) */
.fc-gubbe { flex: none; width: 40px; height: 40px; border-radius: 50%; background: #fff; color: #0F1E2E; display: grid; place-items: center; }
html body .fc-panel .fc-gubbe svg { width: 24px; height: 24px; fill: none; stroke: #0F1E2E !important; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
html body .fc-panel .fc-fot a { color: #0F1E2E !important; opacity: 1 !important; -webkit-text-fill-color: currentColor; }
html body .fc-panel .fc-fot a:first-child { color: #fff !important; }
/* Skrivruta i stället för Ring/Skriv-knapparna (Tommy 2026-11-19) */
.fc-skriv-rad { display: flex; gap: 8px; margin: 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid #E8ECF0; background: #fff; }
html body .fc-panel .fc-input { flex: 1; min-width: 0; height: 46px; margin: 0; padding: 0 16px; border: 1.5px solid #D5DBE2; border-radius: 99px; background: #fff !important; color: #0F1E2E !important; font: inherit; font-size: 16px; box-shadow: none !important; }
html body .fc-panel .fc-input:focus { outline: none; border-color: #0F1E2E; }
html body .fc-panel .fc-input::placeholder { color: #8A97A6; }
.fc-skicka { flex: none; width: 46px; height: 46px; border: 0; border-radius: 50%; background: #0F1E2E; color: #fff; display: grid; place-items: center; cursor: pointer; }
html body .fc-panel .fc-skicka svg { width: 20px; height: 20px; fill: none; stroke: #fff !important; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
html body section.fc-panel form.fc-skriv-rad input.fc-input[type=text] { background: #fff !important; background-color: #fff !important; }
/* Flik "Vanliga frågor" ovanför skrivrutan + "skriver…" (Tommy 2026-11-19) */
.fc-flik-yta { border-top: 1px solid #E8ECF0; background: #fff; }
.fc-flik { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 12px 16px; border: 0; background: #fff; color: #0F1E2E; font: inherit; font-size: 14.5px; font-weight: 800; cursor: pointer; }
.fc-flik span { width: 8px; height: 8px; border-right: 2.4px solid #0F1E2E; border-top: 2.4px solid #0F1E2E; transform: rotate(-45deg); margin-top: 4px; transition: transform .2s ease, margin .2s ease; }
.fc-flik[aria-expanded="true"] span { transform: rotate(135deg); margin-top: -4px; }
.fc-flik-yta .fc-val { max-height: 42vh; overflow-y: auto; margin: 0; padding: 0 12px 12px; }
.fc-flik-yta .fc-val[hidden] { display: none; }
.fc-flik-yta + .fc-skriv-rad { border-top: 0; padding-top: 2px; }
.fc-skriver { display: flex; gap: 5px; padding: 15px 16px; }
.fc-skriver i { width: 7px; height: 7px; border-radius: 50%; background: #8A97A6; animation: fcPrick 1s infinite ease-in-out; }
.fc-skriver i:nth-child(2) { animation-delay: .15s; }
.fc-skriver i:nth-child(3) { animation-delay: .3s; }
@keyframes fcPrick { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
/* Tommys chattrobot – bara huvudet ur images/chatt-robot.webp (Tommy 2026-11-19) */
.fc-robot { flex: none; width: 42px; height: 42px; border-radius: 50%; background: #0F1E2E url("/images/chatt-fonstergubbe.svg") no-repeat center / cover; box-shadow: none; } /* Fönstergubben – det fyrrutiga fönstret som glad figur (2026-11-19) */
.fc-topp .fc-robot { box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); } /* vit ring så fönstergubben syns mot den mörka toppen */
/* Vinkande maskot: Tommys GIF (Animerad vinkande maskotfigur) uppdelad i 4 skarpa bilder (180 ms var), spelas med CSS */
@keyframes fc-vinka { to { background-position: 133.333% 0; } }
@media (prefers-reduced-motion: reduce) { .fc-robot { animation: none; } }
.fc-robot-liten { width: 30px; height: 30px; box-shadow: none; align-self: flex-end; }
.fc-rad { display: flex; align-items: flex-end; gap: 8px; max-width: 92%; }
.fc-rad .fc-bubbla { max-width: none; }
/* Svarsknappar inne i chatten (detektiven och quizet) */
.fc-logg .fc-val-logg { margin: 2px 0 4px 38px; }

/* Lugn påminnelse vid chattknappen (en gång per besök) – Tommy 2026-11-19 */
.fc-puff { position: fixed; right: 18px; bottom: calc(88px + env(safe-area-inset-bottom)); z-index: 901; display: flex; align-items: flex-start; gap: 4px; max-width: 260px; padding: 12px 8px 12px 16px; border-radius: 18px 18px 4px 18px; background: #fff; color: #0F1E2E; box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .45); animation: fc-puff-in .35s ease both; }
.fc-puff-text { flex: 1; padding: 0; border: 0; background: none; color: inherit; font: inherit; font-size: 16px; font-weight: 700; line-height: 1.4; text-align: left; cursor: pointer; }
.fc-puff-stang { flex: none; width: 32px; height: 32px; border: 0; border-radius: 50%; background: #EEF1F4; color: #0F1E2E; font-size: 20px; line-height: 1; cursor: pointer; }
@keyframes fc-puff-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fc-puff { animation: none; } }

/* Renare chatt (Tommy 2026-11-20, IKEA-chatten som förebild): vit yta, tunna ramar, inga små ikoner vid varje bubbla */
html body .fc-panel .fc-logg { background: #fff; padding: 18px 16px 12px; gap: 8px; }
html body .fc-panel .fc-bubbla { font-size: 15.5px; line-height: 1.5; padding: 11px 14px; border-radius: 16px; }
html body .fc-panel .fc-jag { background: #fff; color: #0F1E2E; border: 1px solid #E1E6EC; border-bottom-left-radius: 16px; box-shadow: none; }
html body .fc-panel .fc-du { background: #EEF1F5; color: #0F1E2E; border-bottom-right-radius: 16px; }
html body .fc-panel .fc-robot-liten { display: none; }
html body .fc-panel .fc-rad { max-width: 88%; }
html body .fc-panel .fc-logg .fc-val-logg { margin: 4px 0 6px; }
html body .fc-panel .fc-chip { min-height: 40px; padding: 9px 15px; border: 1px solid #C9D1DA; font-size: 14.5px; font-weight: 600; }
html body .fc-panel .fc-chip:hover { border-color: #0F1E2E; background: #0F1E2E; color: #fff; }
html body .fc-panel .fc-lank { display: inline-block; margin: 10px 8px 0 0; padding: 8px 14px; border-radius: 99px; background: #0F1E2E; color: #fff !important; font-size: 14px; font-weight: 700; text-decoration: none; }
html body .fc-panel .fc-lank ~ .fc-lank { background: #fff; color: #0F1E2E !important; border: 1px solid #C9D1DA; }

/* Topp och skrivruta som IKEA-chatten, med Tommys logga och chattbubbla (Tommy 2026-11-20) */
html body .fc-panel .fc-topp-ikea { gap: 10px; padding: 14px 10px 14px 18px; background: #0F1E2E; }
.fc-topp-ikon { flex: none; width: 24px; height: 24px; color: #fff; }
html body .fc-panel .fc-topp-ikon svg { width: 24px; height: 24px; fill: none; stroke: #fff !important; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
html body .fc-panel .fc-topp-logga { width: auto; height: 24px; border-radius: 0; background: none; }
html body .fc-panel .fc-topp-namn { flex: 1; display: block; font-size: 16px; font-weight: 800; color: #fff; }
.fc-ner { flex: none; width: 36px; height: 36px; border: 0; background: none; color: #fff; display: grid; place-items: center; cursor: pointer; }
html body .fc-panel .fc-ner svg { width: 22px; height: 22px; fill: none; stroke: #fff !important; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
html body .fc-panel .fc-topp-ikea .fc-stang { background: none; }
html body .fc-panel .fc-topp-ikea .fc-stang svg { width: 20px; height: 20px; }
html body .fc-panel .fc-status { margin: 0 0 4px; font-size: 15px; color: #6B7785; }
html body .fc-panel .fc-skriv-rad { position: relative; padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); }
html body .fc-panel .fc-input { height: 54px; padding: 0 60px 0 18px; border: 1px solid #C9D1DA; border-radius: 28px; font-size: 16px; }
html body .fc-panel .fc-skicka { position: absolute; right: 24px; top: 50%; transform: translateY(calc(-50% - 2px)); width: 40px; height: 40px; }

/* Skarpare text i chatten (Tommy 2026-11-20): telefonens eget typsnitt som IKEA, i stället för breda Montserrat */
html body .fc-panel, html body .fc-panel :is(.fc-bubbla, .fc-chip, .fc-input, .fc-flik, .fc-status, .fc-lank, .fc-topp-namn), html body .fc-puff, html body .fc-puff-text {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Apple Color Emoji", sans-serif !important;
  letter-spacing: 0 !important;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
html body .fc-panel .fc-bubbla { font-size: 16px; line-height: 1.45; font-weight: 400; color: #111 !important; }
html body .fc-panel .fc-du { color: #111 !important; }
html body .fc-panel .fc-chip { font-size: 15px; font-weight: 600; color: #111; }
html body .fc-panel .fc-status { font-size: 15px; color: #767676; }
html body .fc-panel .fc-input { color: #111 !important; }
html body .fc-panel .fc-input::placeholder { color: #767676; }
html body .fc-panel .fc-topp-namn { font-size: 17px; font-weight: 700; }
/* 3D-emojis i bubblorna (Tommy 2026-11-20) */
html body .fc-panel img.fc-emoji { display: inline-block; width: 1.25em; height: 1.25em; margin: 0 .05em; vertical-align: -0.25em; border: 0; background: none; box-shadow: none; }
