/* AI Tanpont – AI-asszisztens. Az oldal színeivel és betűivel, világos és sötét módban. */
.aitp-chat{
  --ac-bg:#FFFFFF; --ac-paper:#FAF7F0; --ac-ink:#22303F; --ac-soft:#556170; --ac-faint:#8A97A5; --ac-line:#E5E1D7;
  --ac-blue:#2C6BB0; --ac-dia:#3B82C4; --ac-blue-bg:#E9F1FA; --ac-kek-szoveg:#FFFFFF; --ac-red:#C7473B; --ac-red-bg:#FAEBE8;
  --ac-shadow:0 1px 2px rgba(30,45,60,.08), 0 18px 48px rgba(30,45,60,.22);
  --ac-disp:"Bricolage Grotesque","Trebuchet MS",system-ui,sans-serif;
  --ac-serif:"Newsreader",Georgia,"Times New Roman",serif;
  --ac-mono:"JetBrains Mono",ui-monospace,"Courier New",monospace;
}
:root[data-theme="dark"] .aitp-chat{
  --ac-bg:#1E2823; --ac-paper:#161E1A; --ac-ink:#E9EEE7; --ac-soft:#A7B4AB; --ac-faint:#79867D; --ac-line:#2C3830;
  --ac-blue:#7FB8E8; --ac-dia:#6BA9E0; --ac-blue-bg:#1A2530; --ac-kek-szoveg:#10212E; --ac-red:#F0897D; --ac-red-bg:#2B211F;
  --ac-shadow:0 1px 2px rgba(0,0,0,.35), 0 18px 48px rgba(0,0,0,.5);
}
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) .aitp-chat{
  --ac-bg:#1E2823; --ac-paper:#161E1A; --ac-ink:#E9EEE7; --ac-soft:#A7B4AB; --ac-faint:#79867D; --ac-line:#2C3830;
  --ac-blue:#7FB8E8; --ac-dia:#6BA9E0; --ac-blue-bg:#1A2530; --ac-kek-szoveg:#10212E; --ac-red:#F0897D; --ac-red-bg:#2B211F;
  --ac-shadow:0 1px 2px rgba(0,0,0,.35), 0 18px 48px rgba(0,0,0,.5);
}}
.aitp-chat *{ box-sizing:border-box; }
.aitp-chat [hidden]{ display:none !important; }

/* indítógomb */
.aitp-chat .ac-inditas{
  position:fixed; right:18px; bottom:18px; z-index:45; display:inline-flex; align-items:center; gap:8px;
  border:0; cursor:pointer; border-radius:999px; padding:12px 18px 12px 14px;
  background:var(--ac-blue); color:var(--ac-kek-szoveg); font-family:var(--ac-disp); font-weight:800; font-size:15px; line-height:1;
  box-shadow:var(--ac-shadow); transition:transform .18s, filter .18s;
}
.aitp-chat .ac-inditas svg{ width:22px; height:22px; }
.aitp-chat .ac-inditas:hover{ filter:brightness(1.08); transform:translateY(-1px); }
.aitp-chat .ac-inditas:focus-visible{ outline:3px solid var(--ac-dia); outline-offset:3px; }
.aitp-chat.ac-nyitva .ac-inditas{ display:none; }

/* panel */
.aitp-chat .ac-panel{
  position:fixed; right:18px; bottom:18px; z-index:2147483100; width:min(400px, calc(100vw - 36px)); height:min(620px, calc(100vh - 110px));
  display:flex; flex-direction:column; background:var(--ac-bg); color:var(--ac-ink); border:1px solid var(--ac-line); border-radius:18px;
  box-shadow:var(--ac-shadow); overflow:hidden; font-family:var(--ac-serif); font-size:15.5px; line-height:1.55; -webkit-font-smoothing:antialiased;
  opacity:0; transform:translateY(12px) scale(.98); transform-origin:bottom right; transition:opacity .2s ease, transform .2s ease;
}
.aitp-chat .ac-panel.ac-latszik{ opacity:1; transform:none; }
.aitp-chat .ac-fej{ display:flex; align-items:center; gap:10px; padding:12px 12px 12px 14px; border-bottom:1px solid var(--ac-line); background:var(--ac-paper); }
.aitp-chat .ac-ava{ flex:none; display:grid; place-items:center; width:36px; height:36px; border-radius:11px; background:var(--ac-blue); color:var(--ac-kek-szoveg); font-family:var(--ac-disp); font-weight:800; font-size:14px; }
.aitp-chat .ac-fej-szoveg{ flex:1; min-width:0; }
.aitp-chat .ac-fej-szoveg b{ display:block; font-family:var(--ac-disp); font-weight:800; font-size:15.5px; line-height:1.2; }
.aitp-chat .ac-fej-szoveg span{ display:block; font-family:var(--ac-disp); font-size:11.5px; color:var(--ac-faint); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.aitp-chat .ac-ikon{ flex:none; display:grid; place-items:center; width:34px; height:34px; border:1px solid var(--ac-line); border-radius:10px; background:var(--ac-bg); color:var(--ac-soft); cursor:pointer; padding:0; }
.aitp-chat .ac-ikon svg{ width:17px; height:17px; }
.aitp-chat .ac-ikon:hover{ color:var(--ac-ink); border-color:var(--ac-dia); }

.aitp-chat .ac-uzenetek{ flex:1; overflow-y:auto; padding:14px 14px 6px; display:flex; flex-direction:column; gap:10px; overscroll-behavior:contain; }
.aitp-chat .ac-uz{ max-width:88%; padding:9px 13px; border-radius:14px; overflow-wrap:anywhere; }
.aitp-chat .ac-uz p{ margin:0 0 8px; }
.aitp-chat .ac-uz p:last-child,.aitp-chat .ac-uz ul:last-child,.aitp-chat .ac-uz ol:last-child,.aitp-chat .ac-uz pre:last-child{ margin-bottom:0; }
.aitp-chat .ac-uz ul,.aitp-chat .ac-uz ol{ margin:0 0 8px; padding-left:20px; }
.aitp-chat .ac-uz li{ margin:0 0 3px; }
.aitp-chat .ac-uz a{ color:var(--ac-blue); font-weight:600; text-underline-offset:2px; }
.aitp-chat .ac-uz code{ font-family:var(--ac-mono); font-size:.86em; background:var(--ac-blue-bg); border-radius:5px; padding:1px 5px; }
.aitp-chat .ac-uz pre{ margin:0 0 8px; background:var(--ac-paper); border:1px solid var(--ac-line); border-radius:10px; padding:9px 11px; overflow-x:auto; }
.aitp-chat .ac-uz pre code{ background:none; padding:0; font-size:12.5px; line-height:1.5; white-space:pre; }
.aitp-chat .ac-uz--ai{ align-self:flex-start; background:var(--ac-paper); border:1px solid var(--ac-line); border-bottom-left-radius:5px; }
.aitp-chat .ac-uz--en{ align-self:flex-end; background:var(--ac-blue); color:var(--ac-kek-szoveg); border-bottom-right-radius:5px; }
.aitp-chat .ac-uz--hiba{ background:var(--ac-red-bg); border-color:color-mix(in srgb,var(--ac-red) 35%, var(--ac-line)); }
.aitp-chat .ac-gepel{ display:inline-flex; gap:5px; padding:13px 15px; }
.aitp-chat .ac-gepel span{ width:7px; height:7px; border-radius:50%; background:var(--ac-faint); animation:ac-pont 1.1s infinite ease-in-out; }
.aitp-chat .ac-gepel span:nth-child(2){ animation-delay:.15s; } .aitp-chat .ac-gepel span:nth-child(3){ animation-delay:.3s; }
@keyframes ac-pont{ 0%,60%,100%{ transform:translateY(0); opacity:.5 } 30%{ transform:translateY(-4px); opacity:1 } }

.aitp-chat .ac-javaslatok{ display:flex; flex-wrap:wrap; gap:6px; padding:4px 14px 8px; }
.aitp-chat .ac-chip{ border:1px solid var(--ac-line); background:var(--ac-bg); color:var(--ac-ink); border-radius:999px; padding:6px 11px; font-family:var(--ac-disp); font-weight:600; font-size:12.5px; line-height:1.2; cursor:pointer; text-align:left; }
.aitp-chat .ac-chip:hover{ border-color:var(--ac-dia); color:var(--ac-blue); }

.aitp-chat .ac-urlap{ display:flex; align-items:flex-end; gap:8px; margin:0; padding:10px 12px 6px; border-top:1px solid var(--ac-line); background:var(--ac-bg); }
.aitp-chat .ac-urlap textarea{
  flex:1; resize:none; min-height:42px; max-height:120px; margin:0; font:inherit; font-size:16px; line-height:1.4; color:var(--ac-ink);
  background:var(--ac-paper); border:1px solid var(--ac-line); border-radius:12px; padding:10px 12px; outline:none; box-shadow:none;
}
.aitp-chat .ac-urlap textarea:focus{ border-color:var(--ac-dia); box-shadow:0 0 0 3px color-mix(in srgb,var(--ac-dia) 22%, transparent); }
.aitp-chat .ac-kuld{ flex:none; display:grid; place-items:center; width:42px; height:42px; border:0; border-radius:12px; background:var(--ac-blue); color:var(--ac-kek-szoveg); cursor:pointer; padding:0; }
.aitp-chat .ac-kuld svg{ width:20px; height:20px; }
.aitp-chat .ac-kuld[disabled]{ opacity:.5; cursor:wait; }
.aitp-chat .ac-labjegy{ margin:0; padding:0 14px 9px; font-family:var(--ac-disp); font-size:11.5px; color:var(--ac-faint); background:var(--ac-bg); }
.aitp-chat .ac-labjegy a{ color:var(--ac-soft); }
.aitp-chat .ac-rejtett{ position:absolute !important; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }

@media (max-width:640px){
  .aitp-chat .ac-inditas{ right:14px; bottom:14px; padding:13px; }
  .aitp-chat .ac-inditas span{ display:none; }
  .aitp-chat .ac-panel{ right:0; bottom:0; width:100vw; height:100%; height:100dvh; border-radius:0; border:0; }
}
@media (prefers-reduced-motion: reduce){ .aitp-chat .ac-panel,.aitp-chat .ac-inditas{ transition:none; } .aitp-chat .ac-gepel span{ animation:none; } }
@media print{ .aitp-chat{ display:none !important; } }
