/* Publikumschatten: same uttrykk som chatten i Open WebUI (lyse/mørke flater, avrunda boblar, rund sendeknapp). */
.pc-rot { --pc-bg: #ffffff; --pc-flate: #f5f5f5; --pc-tekst: #171717; --pc-dempa: #6b6b6b; --pc-linje: #e5e5e5; --pc-aksent: #1b23c4; --pc-knapp: #171717; --pc-knapptekst: #fff;
  position: fixed; right: 20px; bottom: 20px; z-index: 2147483000; font: 15px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--pc-tekst); }
@media (prefers-color-scheme: dark) { .pc-rot { --pc-bg: #171717; --pc-flate: #262626; --pc-tekst: #ececec; --pc-dempa: #a3a3a3; --pc-linje: #333; --pc-aksent: #7c8cff; --pc-knapp: #ececec; --pc-knapptekst: #171717; } }
.pc-rot *, .pc-rot *::before, .pc-rot *::after { box-sizing: border-box; }
.pc-boble { width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer; color: #fff; background: linear-gradient(120deg, #1b23c4 0%, #2b6fe0 55%, #22c8e6 100%); box-shadow: 0 10px 30px -8px rgba(27, 35, 196, .6); display: grid; place-items: center; transition: transform .15s; }
.pc-boble:hover { transform: scale(1.06); }
.pc-boble svg { width: 28px; height: 28px; }
.pc-hint { position: absolute; right: 70px; bottom: 10px; white-space: nowrap; background: var(--pc-bg); color: var(--pc-tekst); border: 1px solid var(--pc-linje); border-radius: 14px; padding: 8px 12px; box-shadow: 0 6px 24px -10px rgba(0,0,0,.3); font-size: 14px; cursor: pointer; }
.pc-vindauge { position: absolute; right: 0; bottom: 76px; width: 400px; height: min(640px, calc(100vh - 120px)); display: flex; flex-direction: column; background: var(--pc-bg); border: 1px solid var(--pc-linje); border-radius: 20px; box-shadow: 0 24px 60px -20px rgba(0,0,0,.35); overflow: hidden; }
.pc-vindauge[hidden] { display: none; }
.pc-topp { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--pc-linje); }
.pc-topp b { font-weight: 600; flex: 1; font-size: 15px; }
.pc-topp small { display: block; font-weight: 400; color: var(--pc-dempa); font-size: 12px; }
.pc-ikonknapp { background: none; border: 0; color: var(--pc-dempa); cursor: pointer; padding: 6px; border-radius: 8px; display: grid; place-items: center; }
.pc-ikonknapp:hover { background: var(--pc-flate); color: var(--pc-tekst); }
.pc-ikonknapp svg { width: 18px; height: 18px; }
.pc-avatar { width: 28px; height: 28px; flex: none; border-radius: 50%; background: linear-gradient(120deg, #1b23c4, #22c8e6); color: #fff; display: grid; place-items: center; }
.pc-avatar svg { width: 16px; height: 16px; }
.pc-logg { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 16px; }
.pc-brukar { align-self: flex-end; max-width: 85%; background: var(--pc-flate); border-radius: 18px; padding: 8px 14px; white-space: pre-wrap; word-wrap: break-word; }
.pc-ai { display: flex; gap: 10px; align-items: flex-start; }
.pc-ai-tekst { min-width: 0; flex: 1; word-wrap: break-word; }
.pc-ai-tekst > :first-child { margin-top: 0; } .pc-ai-tekst > :last-child { margin-bottom: 0; }
.pc-ai-tekst p, .pc-ai-tekst ul, .pc-ai-tekst ol { margin: 0 0 .6em; } .pc-ai-tekst ul, .pc-ai-tekst ol { padding-left: 1.3em; }
.pc-ai-tekst h3, .pc-ai-tekst h4 { margin: .6em 0 .3em; font-size: 1em; }
.pc-ai-tekst a { color: var(--pc-aksent); }
.pc-ai-tekst code { background: var(--pc-flate); border-radius: 4px; padding: 0 4px; font-size: .9em; }
.pc-ai-tekst table { border-collapse: collapse; font-size: .9em; margin: 0 0 .6em; display: block; overflow-x: auto; }
.pc-ai-tekst th, .pc-ai-tekst td { border: 1px solid var(--pc-linje); padding: 4px 8px; text-align: left; vertical-align: top; }
.pc-feil { color: #b42318; font-size: 14px; }
.pc-kjelder { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pc-kjelde { font-size: 12px; color: var(--pc-dempa); background: var(--pc-flate); border-radius: 999px; padding: 3px 10px; text-decoration: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.pc-kjelde:hover { color: var(--pc-tekst); }
.pc-prikkar { display: inline-flex; gap: 4px; padding: 8px 0; } .pc-prikkar i { width: 7px; height: 7px; border-radius: 50%; background: var(--pc-dempa); animation: pc-hopp 1.2s infinite; } .pc-prikkar i:nth-child(2) { animation-delay: .15s; } .pc-prikkar i:nth-child(3) { animation-delay: .3s; }
@keyframes pc-hopp { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.pc-forslag { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 8px; }
.pc-forslag button { font: inherit; font-size: 13px; border: 1px solid var(--pc-linje); background: var(--pc-bg); color: var(--pc-tekst); border-radius: 12px; padding: 5px 10px; cursor: pointer; text-align: left; }
.pc-forslag button:hover { background: var(--pc-flate); }
.pc-kort { border: 1px solid var(--pc-linje); border-radius: 14px; padding: 12px; display: grid; gap: 8px; background: var(--pc-bg); }
.pc-kort input { font: inherit; width: 100%; border: 1px solid var(--pc-linje); background: var(--pc-bg); color: var(--pc-tekst); border-radius: 10px; padding: 8px 10px; }
.pc-hovudknapp { font: inherit; font-weight: 600; border: 0; border-radius: 10px; padding: 9px 14px; cursor: pointer; background: var(--pc-knapp); color: var(--pc-knapptekst); text-decoration: none; text-align: center; display: inline-block; }
.pc-hovudknapp[disabled] { opacity: .5; cursor: default; }
.pc-botn { padding: 8px 12px 10px; }
.pc-inntast { display: flex; align-items: flex-end; gap: 8px; border: 1px solid var(--pc-linje); border-radius: 24px; padding: 6px 6px 6px 14px; background: var(--pc-bg); box-shadow: 0 2px 10px -6px rgba(0,0,0,.2); }
.pc-inntast:focus-within { border-color: var(--pc-dempa); }
.pc-inntast textarea { flex: 1; border: 0; outline: 0; resize: none; font: inherit; background: transparent; color: var(--pc-tekst); max-height: 140px; padding: 6px 0; }
.pc-send { width: 34px; height: 34px; flex: none; border-radius: 50%; border: 0; cursor: pointer; background: var(--pc-knapp); color: var(--pc-knapptekst); display: grid; place-items: center; }
.pc-send[disabled] { opacity: .35; cursor: default; }
.pc-send svg { width: 18px; height: 18px; }
.pc-menneskeknapp { font: inherit; font-size: 12px; background: none; border: 0; color: var(--pc-dempa); cursor: pointer; text-decoration: underline; padding: 0; }
.pc-merknad { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--pc-dempa); margin-top: 6px; padding: 0 4px; }
@media (max-width: 520px) {
  .pc-rot { right: 12px; bottom: 12px; }
  .pc-vindauge { position: fixed; inset: 0; width: auto; height: 100%; border-radius: 0; border: 0; }
  .pc-hint { display: none; }
}
.pc-ai-tekst a.pc-hovudknapp { color: var(--pc-knapptekst); }
.pc-kort label { display: grid; gap: 4px; font-size: 14px; }
@media (max-width: 520px) { .pc-rot.pc-open .pc-boble { display: none; } }
/* v2: status (KI eller medarbeidar), medarbeidarmeldingar, systemlinjer, stort vindauge, eingongskode */
.pc-status { display: flex; align-items: center; gap: 8px; padding: 7px 14px; font-size: 12.5px; border-bottom: 1px solid var(--pc-linje); background: var(--pc-flate); color: var(--pc-dempa); }
.pc-status:empty, .pc-status-av { display: none; }
.pc-status svg { width: 15px; height: 15px; flex: none; }
.pc-status a { color: inherit; }
.pc-status-medarbeidar { background: #e8f6ee; color: #0f5132; }
.pc-status-ventar { background: #fff6e0; color: #7a4b00; }
@media (prefers-color-scheme: dark) { .pc-status-medarbeidar { background: #12301f; color: #9be2b8; } .pc-status-ventar { background: #3a2c0c; color: #f5cf7a; } }
.pc-puls { width: 9px; height: 9px; border-radius: 50%; background: currentColor; animation: pc-puls 1.2s infinite; flex: none; }
@keyframes pc-puls { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.1); } }
.pc-avsendar { font-size: 12px; font-weight: 600; color: var(--pc-dempa); margin-bottom: 2px; }
.pc-merke { font-weight: 600; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; background: #1f8a4c; color: #fff; border-radius: 6px; padding: 1px 6px; margin-left: 4px; }
.pc-medarbeidar .pc-avatar { background: #1f8a4c; font-weight: 700; font-size: 13px; }
.pc-medarbeidar .pc-kropp { background: var(--pc-flate); border-radius: 4px 16px 16px 16px; padding: 8px 12px; }
.pc-kropp > :first-child { margin-top: 0; } .pc-kropp > :last-child { margin-bottom: 0; }
.pc-system { align-self: center; text-align: center; font-size: 12.5px; color: var(--pc-dempa); max-width: 90%; }
.pc-system:empty { display: none; }
.pc-velkomst { display: grid; gap: 12px; }
.pc-personvern { color: var(--pc-dempa); font-size: 12px; } .pc-personvern p { margin: 0; } .pc-personvern a { color: var(--pc-aksent); }
.pc-dempa { color: var(--pc-dempa); font-weight: 400; }
.pc-kode { letter-spacing: .4em; font-size: 20px !important; text-align: center; font-variant-numeric: tabular-nums; }
.pc-kort input[disabled] { background: var(--pc-flate); color: var(--pc-dempa); }
.pc-lenkjer { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.pc-lenkjeknapp { font: inherit; font-size: 12.5px; background: none; border: 0; padding: 0; color: var(--pc-aksent); cursor: pointer; text-decoration: underline; }
.pc-ok { color: #1f8a4c; font-size: 14px; }
.pc-menneskeknapp { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; text-decoration: none; color: var(--pc-tekst); }
.pc-menneskeknapp:hover { text-decoration: underline; }
.pc-menneskeknapp svg { width: 14px; height: 14px; }
.pc-menneskeknapp[hidden] { display: none; }
.pc-botn[hidden] { display: none; }
.pc-forslag .pc-hovudknapp { background: var(--pc-knapp); color: var(--pc-knapptekst); border: 0; font-weight: 600; }
.pc-stor .pc-vindauge { width: min(760px, calc(100vw - 40px)); height: calc(100vh - 120px); }
@media (max-width: 520px) { .pc-berre-pc { display: none !important; } .pc-stor .pc-vindauge { width: auto; height: 100%; } }
.pc-menneskeknapp { white-space: nowrap; flex: none; } .pc-merknad { align-items: center; }
@media (max-width: 520px) { .pc-hint { display: block; white-space: normal; width: max-content; max-width: calc(100vw - 100px); } }
/* Videosamtale med medarbeidar */
.pc-videoknapp { display: inline-flex; align-items: center; gap: 8px; }
.pc-videoknapp svg { width: 18px; height: 18px; }
.pc-video { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; border-bottom: 1px solid var(--pc-linje); }
.pc-videolinje { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 6px 12px; font-size: 13px; }
.pc-videolinje > span { display: inline-flex; align-items: center; gap: 6px; margin-right: auto; font-weight: 600; }
.pc-videolinje svg { width: 16px; height: 16px; }
.pc-video iframe { flex: 1 1 auto; width: 100%; min-height: 240px; border: 0; background: #000; }
/* Under videosamtalen fyller Talk heile vindauget (Talk har eigen chat); boblechatten kjem att med «Tilbake til chatten» */
/* Video: same storleik som chatten; «Fullskjerm» (pc-stor) fyller heile skjermen, «Forminsk» går tilbake */
.pc-medvideo .pc-vindauge { width: 400px; height: min(640px, calc(100vh - 120px)); max-height: none; }
.pc-medvideo.pc-stor .pc-vindauge { position: fixed; inset: 0; width: auto; height: auto; border-radius: 0; border: 0; z-index: 2147483000; }
.pc-medvideo.pc-stor .pc-video iframe { border-radius: 0; }
.pc-medvideo .pc-logg, .pc-medvideo .pc-forslag, .pc-medvideo .pc-botn, .pc-medvideo .pc-status { display: none !important; }
.pc-medvideo .pc-video { border-bottom: 0; }
.pc-medvideo .pc-video iframe { min-height: 0; border-radius: 0 0 16px 16px; }
.pc-forslag .pc-hovudknapp { font-size: 14px; border: 0; border-radius: 10px; padding: 9px 14px; background: var(--pc-knapp); color: var(--pc-knapptekst); }
.pc-forslag .pc-hovudknapp:hover { background: var(--pc-knapp); filter: brightness(1.08); }
.pc-video[hidden] { display: none; }
/* Løyve til mikrofon og kamera før videosamtalen */
.pc-loyve { margin: auto; max-width: 440px; padding: 28px 24px; text-align: center; }
.pc-loyve h3 { margin: 10px 0 8px; font-size: 18px; }
.pc-loyve p { margin: 0 0 12px; line-height: 1.5; color: var(--pc-tekst); }
.pc-loyve-ikon { display: inline-flex; width: 56px; height: 56px; border-radius: 50%; align-items: center; justify-content: center; background: var(--pc-flate); }
.pc-loyve-ikon svg { width: 28px; height: 28px; }
.pc-loyve-knappar { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 8px; }
.pc-videotips-viktig { font-size: 15px; font-weight: 600; background: #e8f7ee; color: #0b5d2a; }
.pc-videotips { padding: 6px 12px; font-size: 13px; background: #fff8e1; color: #5d4500; border-top: 1px solid var(--pc-linje); }
.pc-medvideo .pc-video { overflow: auto; }
/* Ramme-modus (boble.html i Nextcloud): vindauget fyller ramma, Nextcloud teiknar boblen */
.pc-rot.pc-ramme { inset: 0; right: 0; bottom: 0; }
.pc-ramme .pc-vindauge, .pc-ramme.pc-stor .pc-vindauge, .pc-ramme.pc-medvideo .pc-vindauge { position: fixed; inset: 0; width: auto; height: auto; max-height: none; border-radius: 0; border: 0; box-shadow: none; }

.pc-forlatknapp { margin-left: auto; border: 0; border-radius: 8px; padding: 6px 12px; background: #d93025; color: #fff; font: 600 13px system-ui, sans-serif; cursor: pointer; }
.pc-forlatknapp:hover { background: #b3261e; }
.pc-inntast .pc-vedlegg { align-self: flex-end; padding: 7px 4px; } .pc-inntast .pc-vedlegg[hidden] { display: none; }
.pc-inntast .pc-vedlegg:first-of-type { margin-left: -8px; }
.pc-bilete { display: grid; gap: 4px; padding: 6px; } .pc-bilete img { max-width: 220px; max-height: 220px; border-radius: 12px; display: block; }
.pc-bilete small { font-size: 12px; color: var(--pc-dempa); padding: 0 6px 2px; white-space: normal; } .pc-bilete small.pc-feil { color: #b42318; }

/* Medarbeidarmodus («Svar som support») */
.pc-innlenkje { border: 0; background: none; padding: 0; margin-left: auto; color: var(--pc-dempa); font-size: 11.5px; text-decoration: underline; cursor: pointer; }
.pc-status-vakt { display: flex !important; flex-wrap: wrap; background: #e8eefc; color: #1d3a8a; }
.pc-status-vakt .pc-vaktnamn { display: inline-flex; align-items: center; gap: 6px; margin-right: auto; }
.pc-vaktbryter { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; cursor: pointer; }
.pc-vaktkort { display: flex; flex-direction: column; gap: 6px; border-left: 4px solid #1f9d55; }
.pc-vaktkort-mi { border-left-color: #2f6fed; }
.pc-vakttittel { font-size: 14px; }
.pc-vaktside { font-size: 12px; color: var(--pc-dempa); }
.pc-vaktsporsmal { font-size: 13.5px; font-style: italic; }
.pc-vakthistorikk { font-size: 12.5px; }
.pc-vakthistorikk summary { cursor: pointer; color: var(--pc-dempa); }
.pc-vakthistorikk p { margin: 4px 0; }
.pc-svarknapp { align-self: stretch; justify-content: center; background: #1f9d55 !important; color: #fff !important; font-size: 15px; padding: 10px 14px; }
.pc-vaktvarsel { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
@media (prefers-color-scheme: dark) { .pc-status-vakt { background: #17244a; color: #b9cbff; } }
.pc-svarknapp svg { width: 18px; height: 18px; flex: none; }
.pc-merke-kunde { background: #2f6fed !important; }
