.pw-chatt { --c-bg: #fff; --c-yta: #F6F8FA; --c-kant: #E4E7EC; --c-text: #0F172A; --c-dim: #64748B; --c-acc: var(--pw-smaragd, #047857); --c-natt: var(--pw-natt, #0B1220); --c-cyan: var(--pw-cyan, #22D3EE);
	position: fixed; z-index: 99990; right: 16px; bottom: 16px; font: 400 15px/1.5 var(--pw-brod, system-ui, sans-serif); color: var(--c-text); }
.pw-chatt *, .pw-chatt *::before, .pw-chatt *::after { box-sizing: border-box; }

.pw-chatt__knapp { display: flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; border: 0; border-radius: 99px; background: var(--c-natt); color: #fff; font: 600 14px var(--pw-rubrik, system-ui); cursor: pointer; box-shadow: 0 8px 24px rgba(11, 18, 32, .28); transition: transform .2s ease; }
.pw-chatt__knapp:hover { transform: translateY(-2px); }
.pw-chatt__knapp:focus-visible { outline: 3px solid var(--c-cyan); outline-offset: 3px; }
.pw-chatt__bubbla { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: #F59E0B; color: #111; font: 700 12px/20px var(--pw-rubrik, system-ui); text-align: center; }
.pw-chatt--oppen .pw-chatt__knapp { display: none; }

.pw-chatt__panel { position: absolute; right: 0; bottom: 0; display: none; flex-direction: column; width: 384px; height: min(620px, calc(100vh - 32px)); overflow: hidden; border: 1px solid var(--c-kant); border-radius: 16px; background: var(--c-bg); box-shadow: 0 24px 64px rgba(11, 18, 32, .22); }
.pw-chatt--oppen .pw-chatt__panel { display: flex; }
@media (max-width: 520px) {
	.pw-chatt { right: 12px; bottom: 12px; }

	body.pw-val-synlig .pw-chatt:not(.pw-chatt--oppen) { display: none; }

	body:has(.pw-val) #ast-scroll-top { display: none !important; }
	.pw-chatt--oppen { inset: 0; }
	.pw-chatt__panel { position: fixed; inset: 0; width: 100%; height: 100%; border-radius: 0; border: 0; }
}

.pw-chatt__topp { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; background: var(--c-natt); color: #fff; }
.pw-chatt__vem { flex: 1 1 auto; min-width: 0; }
.pw-chatt__vem b { display: block; font: 600 16px/1.2 var(--pw-rubrik, system-ui); }
.pw-chatt__vem span { display: flex; align-items: center; gap: 6px; color: #94A3B8; font-size: 12.5px; }
.pw-chatt__vem span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #10B981; }
.pw-chatt__stang { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; }
.pw-chatt__stang:hover { background: rgba(255, 255, 255, .16); }
.pw-chatt__stang:focus-visible { outline: 2px solid var(--c-cyan); }

.pw-chatt__drift { margin: 0; padding: 10px 16px; border-bottom: 1px solid #FDE68A; background: #FFFBEB; color: #78350F; font-size: 13.5px; }
.pw-chatt__drift[hidden] { display: none; }

.pw-chatt__flode { flex: 1 1 auto; overflow-y: auto; padding: 16px; background: var(--c-yta); scroll-behavior: smooth; }
.pw-chatt__rad { display: flex; gap: 8px; margin-bottom: 12px; animation: pw-c-in .28s ease-out both; }
.pw-chatt__rad--kund { justify-content: flex-end; }
.pw-chatt__msg { max-width: 82%; padding: 10px 13px; border-radius: 14px; background: #fff; border: 1px solid var(--c-kant); overflow-wrap: anywhere; }
.pw-chatt__msg p { margin: 0 0 8px; }
.pw-chatt__msg p:last-child { margin-bottom: 0; }
.pw-chatt__msg a { color: var(--c-acc); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.pw-chatt__rad--bot .pw-chatt__msg { border-top-left-radius: 4px; }
.pw-chatt__rad--kund .pw-chatt__msg { border: 0; border-top-right-radius: 4px; background: var(--c-natt); color: #fff; }
.pw-chatt__rad--team .pw-chatt__msg { border-color: #A7F3D0; background: #ECFDF5; }
.pw-chatt__rad--system .pw-chatt__msg { background: transparent; border: 0; color: var(--c-dim); font-size: 13px; text-align: center; max-width: 100%; margin: 0 auto; }
.pw-chatt__msg small { display: block; margin-bottom: 4px; color: var(--c-dim); font-size: 11.5px; font-weight: 600; }

.pw-chatt__msg .pw-kort { margin-top: 8px; }
.pw-chatt__msg .pw-kort__rub { font-size: 13px; }
.pw-chatt__msg .pw-kort .pw-status { margin: 6px 0 0; gap: 8px; }
.pw-chatt__msg .pw-kort .pw-status__rad { padding: 10px; border-radius: 12px; gap: 6px; }
.pw-chatt__msg .pw-kort .pw-status__robot { padding: 6px 8px; }
.pw-chatt__msg .pw-kort h3 { font-size: 14px; }
.pw-chatt__msg .pw-bild { margin-top: 8px; }
.pw-chatt__msg .pw-bild img { display: block; max-width: 100%; height: auto; border-radius: 10px; }
.pw-chatt__msg .pw-chatt__drift { margin: 0 0 8px; padding: 8px 10px; border: 1px solid #FDE68A; border-radius: 8px; }
.pw-chatt__liten { flex: none; width: 30px; height: 30px; margin-top: 2px; }

.pw-chatt__skriver { display: inline-flex; gap: 4px; padding: 12px 14px; }

.pw-chatt__skriver i { --pw-h: -5px; width: 6px; height: 6px; border-radius: 50%; background: #94A3B8; animation: pw-c-prick 1.35s cubic-bezier(.45, 0, .25, 1) infinite; }
.pw-chatt__skriver i:nth-child(2) { --pw-h: -7px; animation-delay: .17s; }
.pw-chatt__skriver i:nth-child(3) { --pw-h: -4px; animation-delay: .31s; }
@media (prefers-reduced-motion: reduce) { .pw-chatt__skriver i { animation: pw-c-blink 1.4s infinite; } }

.pw-chatt__val { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 14px 38px; }
.pw-chatt__val button { padding: 6px 12px; border: 1px solid var(--c-kant); border-radius: 99px; background: #fff; color: var(--c-text); font: 500 13.5px var(--pw-brod, system-ui); cursor: pointer; transition: border-color .15s, background .15s; }
.pw-chatt__val button:hover { border-color: var(--c-acc); background: #F0FDF4; }
.pw-chatt__val button:focus-visible { outline: 2px solid var(--c-acc); outline-offset: 2px; }
.pw-chatt__val .pw-chatt__val--team { border-color: var(--c-natt); }

.pw-chatt__betyg { display: flex; align-items: center; gap: 6px; margin: -6px 0 12px 38px; color: var(--c-dim); font-size: 12.5px; }
.pw-chatt__betyg button { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border: 1px solid var(--c-kant); border-radius: 99px; background: #fff; color: var(--c-dim); font: 500 12.5px var(--pw-brod, system-ui); cursor: pointer; }
.pw-chatt__betyg button:hover { color: var(--c-text); border-color: #94A3B8; }
.pw-chatt__betyg svg { width: 13px; height: 13px; }

.pw-chatt__fot { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--c-kant); background: #fff; }
.pw-chatt__fot textarea, .pw-chatt__fot input { flex: 1 1 auto; min-width: 0; resize: none; max-height: 120px; padding: 10px 12px; border: 1px solid var(--c-kant); border-radius: 12px; font: 400 15px/1.4 var(--pw-brod, system-ui); color: var(--c-text); }
.pw-chatt__fot textarea:focus, .pw-chatt__fot input:focus { outline: 0; border-color: var(--c-acc); box-shadow: 0 0 0 3px rgba(4, 120, 87, .15); }
.pw-chatt__skicka { flex: none; display: grid; place-items: center; width: 44px; height: 44px; align-self: flex-end; border: 0; border-radius: 12px; background: var(--c-acc); color: #fff; cursor: pointer; }
.pw-chatt__skicka:disabled { opacity: .5; cursor: default; }
.pw-chatt__skicka svg { width: 18px; height: 18px; }

.pw-chatt__kort { margin: 0 0 14px 38px; padding: 14px; border: 1px solid var(--c-kant); border-radius: 14px; background: #fff; }
.pw-chatt__kort h4 { margin: 0 0 4px; font: 600 15px var(--pw-rubrik, system-ui); }
.pw-chatt__kort p { margin: 0 0 10px; color: var(--c-dim); font-size: 13px; }
.pw-chatt__kort textarea, .pw-chatt__kort input[type=text] { width: 100%; margin-bottom: 8px; padding: 9px 11px; border: 1px solid var(--c-kant); border-radius: 10px; font: 400 14.5px/1.4 var(--pw-brod, system-ui); }
.pw-chatt__kort .pw-chatt__fel { color: #B91C1C; font-size: 13px; }
.pw-chatt__primar { padding: 9px 16px; border: 0; border-radius: 10px; background: var(--c-acc); color: #fff; font: 600 14px var(--pw-rubrik, system-ui); cursor: pointer; }
.pw-chatt__primar:disabled { opacity: .55; }
.pw-chatt__lankrad { display: flex; gap: 6px; margin: 8px 0; }
.pw-chatt__lankrad input { flex: 1 1 auto; min-width: 0; padding: 8px 10px; border: 1px solid var(--c-kant); border-radius: 10px; background: var(--c-yta); font: 400 12.5px ui-monospace, monospace; color: var(--c-text); }
.pw-chatt__lankrad button { flex: none; padding: 8px 12px; border: 1px solid var(--c-kant); border-radius: 10px; background: #fff; color: var(--c-text); white-space: nowrap; font: 600 13px var(--pw-rubrik, system-ui); cursor: pointer; }
.pw-chatt__notis { padding: 8px 10px; border-radius: 8px; background: #FFFBEB; color: #78350F; font-size: 12.5px; }
.pw-chatt__trad-topp { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; font-size: 13px; color: var(--c-dim); }
.pw-chatt__trad-topp button { border: 0; background: none; color: var(--c-acc); font: 600 13px var(--pw-rubrik, system-ui); cursor: pointer; }
.pw-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.pw-bot { position: relative; flex: none; width: 44px; height: 44px; }
.pw-bot img { width: 100%; height: 100%; object-fit: contain; }
.pw-bot__skal { position: absolute; inset: 4px 2px 2px; border-radius: 46% 46% 42% 42%; background: radial-gradient(circle at 35% 25%, #fff, #E2E8F0 65%, #CBD5E1); box-shadow: inset 0 -2px 3px rgba(15, 23, 42, .12); }
.pw-bot__skarm { position: absolute; inset: 24% 14% 26%; border-radius: 40%; background: #0B1220; overflow: hidden; }
.pw-bot__skarm i { position: absolute; top: 30%; width: 22%; height: 38%; border-radius: 40%; background: var(--pw-cyan, #22D3EE); box-shadow: 0 0 6px var(--pw-cyan, #22D3EE); transition: all .25s ease; }
.pw-bot__skarm i:first-child { left: 20%; }
.pw-bot__skarm i:last-child { right: 20%; }
.pw-bot__antenn { position: absolute; top: 0; left: 50%; width: 2px; height: 6px; margin-left: -1px; background: #94A3B8; }
.pw-bot__antenn::after { content: ""; position: absolute; top: -4px; left: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--pw-cyan, #22D3EE); box-shadow: 0 0 6px var(--pw-cyan, #22D3EE); }
.pw-bot__marke { position: absolute; right: -4px; bottom: -2px; display: none; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); font: 700 11px/1 var(--pw-rubrik, system-ui); color: var(--c-natt, #0B1220); }
.pw-bot__marke svg { width: 11px; height: 11px; }
.pw-bot--liten { width: 30px; height: 30px; }
.pw-chatt__knapp .pw-bot { width: 40px; height: 40px; }

.pw-bot[data-u="hej"] .pw-bot__skarm i, .pw-bot[data-u="klart"] .pw-bot__skarm i { height: 22%; top: 38%; border-radius: 99px 99px 0 0; }
.pw-bot[data-u="lugnar"] .pw-bot__skarm i { height: 14%; top: 46%; border-radius: 0 0 99px 99px; }
.pw-bot[data-u="tanker"] .pw-bot__skarm i { width: 14%; height: 24%; top: 26%; }
.pw-bot[data-u="forklarar"] .pw-bot__skarm i { transform: translateX(18%); }
.pw-bot[data-u="hmmm"] { transform: rotate(-10deg); }
.pw-bot[data-u="hmmm"] .pw-bot__skarm i:last-child { height: 22%; top: 38%; }
.pw-bot[data-u="pausad"] .pw-bot__skal { filter: saturate(.3) brightness(.96); }
.pw-bot[data-u="pausad"] .pw-bot__skarm i { opacity: .55; }
.pw-bot[data-u="sakerhet"] .pw-bot__marke, .pw-bot[data-u="betalning"] .pw-bot__marke, .pw-bot[data-u="hmmm"] .pw-bot__marke, .pw-bot[data-u="klart"] .pw-bot__marke, .pw-bot[data-u="pausad"] .pw-bot__marke { display: grid; }
.pw-bot[data-u="hmmm"] .pw-bot__marke::before { content: "?"; }
.pw-bot--liten .pw-bot__marke { display: none !important; }

@media (prefers-reduced-motion: no-preference) {
	.pw-chatt__knapp .pw-bot { animation: pw-c-svav 3.4s ease-in-out infinite; }
	.pw-bot[data-u="tanker"] .pw-bot__antenn::after { animation: pw-c-blink 1s infinite; }
	.pw-bot[data-u="tanker"] .pw-bot__skarm i { animation: pw-c-titta 1.6s ease-in-out infinite; }
	.pw-bot[data-u="hej"] { animation: pw-c-vink .9s ease-in-out 2; }
	.pw-bot[data-u="klart"] { animation: pw-c-hopp .6s ease-out 2; }
	.pw-chatt__panel { animation: pw-c-upp .22s ease-out; }
}
@keyframes pw-c-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pw-c-upp { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes pw-c-prick { 0%, 62%, 100% { opacity: .35; transform: translateY(0); } 22% { opacity: 1; transform: translateY(var(--pw-h)); } 42% { opacity: .7; transform: translateY(1px); } }
@keyframes pw-c-svav { 50% { transform: translateY(-2px); } }
@keyframes pw-c-blink { 50% { opacity: .2; } }
@keyframes pw-c-titta { 0%, 100% { transform: translateX(-25%); } 50% { transform: translateX(25%); } }
@keyframes pw-c-vink { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-8deg); } 60% { transform: rotate(8deg); } }
@keyframes pw-c-hopp { 40% { transform: translateY(-4px); } }

.pw-drift { max-width: 760px; margin: 0 auto; font-family: var(--pw-brod, system-ui); }
.pw-drift__topp { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: 14px; border: 1px solid #A7F3D0; background: #ECFDF5; }
.pw-drift__topp--gul { border-color: #FDE68A; background: #FFFBEB; }
.pw-drift__topp b { display: block; font: 600 18px/1.3 var(--pw-rubrik, system-ui); color: #0F172A; }
.pw-drift__topp span { color: #475569; font-size: 14px; }
.pw-drift__punkt { position: relative; flex: none; width: 12px; height: 12px; border-radius: 50%; background: #10B981; }
.pw-drift__topp--gul .pw-drift__punkt { background: #F59E0B; }
.pw-drift__notis { margin: 12px 0 0; padding: 12px 14px; border-radius: 10px; background: #FFFBEB; border: 1px solid #FDE68A; color: #78350F; }
.pw-drift__notis--storning { background: #FFF7ED; border-color: #FED7AA; color: #7C2D12; }
.pw-drift__notis--info { background: #EFF6FF; border-color: #BFDBFE; color: #1E3A8A; }
.pw-drift__lista { margin: 20px 0; padding: 0; list-style: none; border: 1px solid #E4E7EC; border-radius: 14px; overflow: hidden; background: #fff; }
.pw-drift__rad { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #F1F5F9; }
.pw-drift__rad:last-child { border-bottom: 0; }
.pw-drift__rad b { font-weight: 600; color: #047857; }
.pw-drift__rad b::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: currentColor; vertical-align: 1px; }
.pw-drift__rad--langsam b { color: #B45309; }
.pw-drift__rad--storning b { color: #C2410C; }
.pw-drift__rad--info b { color: #1D4ED8; }
.pw-drift h2 { margin: 28px 0 10px; font: 600 18px var(--pw-rubrik, system-ui); }
.pw-drift__hist { margin: 0; padding: 0; list-style: none; }
.pw-drift__hist li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid #F1F5F9; }
.pw-drift__hist time { grid-column: 1 / -1; color: #64748B; font-size: 13px; }
.pw-drift__hist b { color: #047857; font-size: 13px; }
.pw-drift__tom, .pw-drift__fot { color: #64748B; font-size: 14px; }
@media (prefers-reduced-motion: no-preference) {
	.pw-drift__punkt::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: pw-c-ping 2s cubic-bezier(0, 0, .2, 1) infinite; }
}
@keyframes pw-c-ping { 75%, 100% { transform: scale(2.4); opacity: 0; } }

.pw-drift__rad span small { display: block; margin-top: 2px; color: #64748B; font-size: 12.5px; font-weight: 400; }
.pw-drift__siffror { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 16px 0 8px; padding: 0; list-style: none; }
.pw-drift__siffror li { padding: 14px 16px; border: 1px solid #E4E7EC; border-radius: 14px; background: #fff; }
.pw-drift__siffror b { display: block; font: 700 22px/1.2 var(--pw-rubrik, system-ui); color: #0F172A; }
.pw-drift__siffror span { color: #475569; font-size: 13.5px; }
.pw-drift__fot a { font-weight: 600; }

.pw-drift__grupp { margin: 10px 0; border: 1px solid #E4E7EC; border-radius: 14px; background: #fff; overflow: hidden; }
.pw-drift__grupp summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; list-style: none; font-weight: 600; }
.pw-drift__grupp summary::-webkit-details-marker { display: none; }
.pw-drift__grupp summary::after { content: ""; width: 8px; height: 8px; margin-left: 4px; border-right: 2px solid #94A3B8; border-bottom: 2px solid #94A3B8; transform: rotate(45deg); transition: transform .15s; flex: none; }
.pw-drift__grupp[open] summary::after { transform: rotate(-135deg); }
.pw-drift__grupp summary span { flex: 1; }
.pw-drift__grupp summary b { font-weight: 600; color: #047857; font-size: 14px; }
.pw-drift__grupp summary b::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: currentColor; vertical-align: 1px; }
.pw-drift__grupp--langsam summary b { color: #B45309; }
.pw-drift__grupp--plattform summary b, .pw-drift__rad--plattform b { color: #B45309; }
.pw-drift__grupp--storning summary b { color: #C2410C; }
.pw-drift__grupp .pw-drift__lista { margin: 0; border: 0; border-top: 1px solid #F1F5F9; border-radius: 0; }
