/* The Eye – chatvindue. Bruger sidens farver (--bg, --text osv.), så det følger lys/mørk tilstand. */
.ai-overlay { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,.35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.ai-overlay.aaben { display: flex; }
.ai-vindue { width: 100%; max-width: 760px; height: min(86vh, 860px); display: flex; flex-direction: column; border-radius: 24px; border: 1px solid var(--line); background: var(--bg); color: var(--text); box-shadow: 0 30px 80px rgba(0,0,0,.25); overflow: hidden; }
.ai-top { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.ai-top h2 { margin: 0; flex-grow: 1; display: flex; align-items: center; gap: 8px; font: 300 22px Raleway, sans-serif; }
.ai-ikon-knap { width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.ai-omraader { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.ai-omraade { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: 600 13px Inter, sans-serif; cursor: pointer; }
.ai-omraade[aria-pressed="true"] { background: var(--btn); color: var(--btn-text); border-color: var(--btn); }
.ai-beskeder { flex-grow: 1; overflow-y: auto; padding: 20px 16px; display: flex; flex-direction: column; gap: 14px; }
.ai-besked { max-width: 88%; line-height: 1.6; font-size: 15.5px; overflow-wrap: anywhere; }
.ai-besked.bruger { align-self: flex-end; padding: 10px 16px; border-radius: 18px 18px 4px 18px; background: var(--btn); color: var(--btn-text); white-space: pre-wrap; }
.ai-besked.ai { align-self: flex-start; }
.ai-besked.ai p { margin: 0 0 10px; }
.ai-besked.ai p:last-child { margin-bottom: 0; }
.ai-besked.ai ul, .ai-besked.ai ol { margin: 0 0 10px; padding-inline-start: 22px; }
.ai-besked.ai h3, .ai-besked.ai h4 { margin: 12px 0 6px; font-size: 16px; }
.ai-besked.ai code { padding: 1px 5px; border-radius: 5px; background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; }
.ai-besked.ai pre { margin: 0 0 10px; padding: 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); overflow-x: auto; }
.ai-besked.ai pre code { padding: 0; border: 0; background: none; }
.ai-besked.ai a { color: var(--text); }
.ai-besked.fejl { align-self: stretch; max-width: none; padding: 12px 14px; border-radius: 12px; border: 1px solid #C2410C; color: var(--text); font-size: 14px; }
.ai-handlinger { display: flex; gap: 6px; margin-top: 6px; }
.ai-lille-knap { min-height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: 600 12px Inter, sans-serif; cursor: pointer; }
.ai-taenker { display: inline-flex; gap: 4px; padding: 6px 0; }
.ai-taenker span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: ai-blink 1.2s infinite; }
.ai-taenker span:nth-child(2) { animation-delay: .2s; } .ai-taenker span:nth-child(3) { animation-delay: .4s; }
@keyframes ai-blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.ai-bund { padding: 12px 16px 16px; border-top: 1px solid var(--line); }
.ai-form { display: flex; gap: 6px; padding: 6px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.ai-form textarea { flex-grow: 1; min-width: 0; min-height: 42px; max-height: 140px; padding: 11px 14px; border: 0; outline: none; resize: none; background: transparent; color: var(--text); font: 400 15px/1.35 Inter, sans-serif; }
.ai-form textarea::placeholder { color: var(--muted); }
.ai-send { height: 42px; padding: 0 20px; border-radius: 999px; border: 0; background: var(--btn); color: var(--btn-text); font: 700 14px Inter, sans-serif; cursor: pointer; }
.ai-send:disabled { opacity: .5; cursor: default; }
.ai-note { margin: 8px 0 0; text-align: center; font-size: 12px; color: var(--muted); }
.ai-indstillinger { padding: 20px 16px; display: flex; flex-direction: column; gap: 12px; font-size: 15px; line-height: 1.55; overflow-y: auto; }
.ai-indstillinger label { font-weight: 600; font-size: 14px; }
.ai-indstillinger input { height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 400 15px Inter, sans-serif; }
.ai-indstillinger .ai-raekke { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-indstillinger .ai-send { align-self: flex-start; }
.ai-status { font-size: 14px; color: var(--muted); }
.eye-mik.lytter { color: #C2410C; }
[dir="rtl"] .ai-besked.bruger { border-radius: 18px 18px 18px 4px; }
@media (max-width: 640px) { .ai-overlay { padding: 0; } .ai-vindue { height: 100%; max-width: none; border-radius: 0; } }
@media (prefers-reduced-motion: reduce) { .ai-taenker span { animation: none; opacity: .6; } }
.ai-vindue [hidden] { display: none !important; }
.ai-top h2 { direction: ltr; }
/* Vedhæftede filer og billeder */
.ai-vedhaeft { width: 42px; height: 42px; flex-shrink: 0; border-radius: 999px; border: 0; background: transparent; color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.ai-filer { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.ai-fil-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 220px; padding: 4px 6px 4px 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 13px; }
.ai-fil-chip img { width: 28px; height: 28px; object-fit: cover; border-radius: 6px; }
.ai-fil-navn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-fil-x { width: 28px; height: 28px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; }
.ai-bruger-billede { display: block; max-width: 220px; max-height: 220px; margin-top: 8px; border-radius: 12px; }
.ai-besked.bruger .ai-fil-chip { margin-top: 8px; background: transparent; color: inherit; border-color: currentColor; }
.ai-billede { display: block; margin: 6px 0 10px; }
.ai-billede img { display: block; width: 100%; max-width: 480px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); min-height: 120px; }
.ai-billede-fejl { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.ai-udbyder { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line); }
.ai-udbyder label { font-weight: 600; font-size: 14px; }
.ai-fejl-detalje { display: block; margin-top: 6px; font-size: 12px; opacity: .7; direction: ltr; text-align: left; word-break: break-word; }
.ai-meta { margin-top: 4px; font-size: 11px; opacity: .55; direction: ltr; text-align: left; }
.ai-dokument { margin: 12px 0; width: 100%; }
.ai-dok-side { background: #fff; color: #1a1a1a; font-family: Georgia, "Times New Roman", serif; font-size: 14px; line-height: 1.65; padding: 34px 38px; border-radius: 4px; border: 1px solid rgba(0,0,0,.08); box-shadow: 0 4px 18px rgba(0,0,0,.18); max-width: 640px; width: 100%; box-sizing: border-box; }
.ai-dok-side h3 { font-size: 15px; margin: 14px 0 6px; }
.ai-dok-side p { margin: 0 0 10px; }
.ai-dok-side a { color: #1a1a1a; }
.ai-dok-knapper { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
@media (max-width: 600px) { .ai-dok-side { padding: 22px 18px; font-size: 13px; } }
.ai-besked.ai:has(.ai-dokument) { align-self: stretch; max-width: 100%; width: 100%; }
.ai-kode { margin: 0 0 10px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.ai-kode-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px; font-size: 12px; opacity: .9; border-bottom: 1px solid var(--line); direction: ltr; }
.ai-kode-top > span:first-child { font-family: ui-monospace, Consolas, monospace; opacity: .7; }
.ai-besked.ai .ai-kode pre { margin: 0; border: 0; border-radius: 0; direction: ltr; text-align: left; }
.ai-kode-ud { margin: 0; padding: 10px 12px; border-top: 1px dashed var(--line); font-size: 13px; white-space: pre-wrap; max-height: 320px; overflow: auto; direction: ltr; text-align: left; }
.ai-kode-ud.fejl { color: #C2410C; }
.ai-besked.ai:has(.ai-kode) { align-self: stretch; max-width: 100%; width: 100%; }
.ai-bekraeft { align-self: stretch; margin: 6px 0; padding: 12px 14px; border: 1px solid var(--line); border-left: 4px solid #F59E0B; border-radius: 12px; background: var(--surface); }
.ai-bekraeft.besvaret { border-left-color: var(--line); padding: 6px 12px; opacity: .75; }
.ai-bekraeft-titel { font: 600 13px Inter, sans-serif; margin-bottom: 6px; }
.ai-bekraeft.besvaret .ai-bekraeft-titel { margin: 0; font-weight: 500; }
.ai-bekraeft-tekst { margin: 0 0 10px; padding: 8px 10px; border-radius: 8px; background: rgba(127,127,127,.08); white-space: pre-wrap; word-break: break-word; font: 13px ui-monospace, Consolas, monospace; direction: ltr; text-align: left; }
/* Fotogalleri (find_fotos / vis_fotos) */
.ai-galleri { align-self: stretch; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 4px 0 10px; max-width: 760px; }
.ai-galleri-foto { margin: 0; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ai-galleri-foto > a { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.ai-galleri-foto img { display: block; width: 100%; height: 170px; object-fit: cover; transition: transform .25s ease; }
.ai-galleri-foto > a:hover img { transform: scale(1.04); }
.ai-galleri-foto figcaption { display: flex; flex-direction: column; gap: 2px; font-size: 12px; line-height: 1.35; color: var(--muted); }
.ai-galleri-titel { color: var(--text, inherit); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-galleri-kredit { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-galleri-kredit a { color: inherit; text-decoration: underline; }
