/* Wama Tekla – csevegőablak (a weboldal színeihez igazítva) */
.wt-panel, .wt-fab, .wt-ask {
  --wt-navy: #143d8d;
  --wt-navy-2: #1d55c0;
  --wt-orange: #f68932;
  --wt-orange-dark: #e07318;
  --wt-text: #2b3140;
  --wt-muted: #6b7385;
  --wt-border: #e3e7ef;
  --wt-soft: #f4f7fc;
  font-family: inherit;
  box-sizing: border-box;
}
.wt-panel *, .wt-fab *, .wt-ask * { box-sizing: border-box; }
/* ikonok: a sablon ne nyomja össze őket */
.wt-panel svg, .wt-ask svg { flex: none !important; max-width: none !important; }
.wt-icon svg { width: 22px !important; height: 22px !important; }
.wt-send svg { width: 22px !important; height: 22px !important; }
.wt-ask svg { width: 18px !important; height: 18px !important; }
@media (max-width: 768px) { .wt-close svg { width: 26px !important; height: 26px !important; } }

/* ---------- lebegő gomb: Tekla fotója „AI” jelvénnyel, asztali gépen rámutatva felirattal ---------- */
.wt-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 99990;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 0; border: 0; background: none; cursor: pointer;
  transition: transform .15s ease, opacity .15s ease;
}
.wt-fab-ava { position: relative; display: block; width: 64px; height: 64px; flex: none; }
.wt-fab-ava img {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover; display: block;
  border: 3px solid #fff; box-shadow: 0 10px 28px rgba(20, 61, 141, .38);
}
.wt-fab-ava b {
  position: absolute; right: -4px; bottom: -2px;
  min-width: 28px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: var(--wt-orange); color: #fff; border: 2px solid #fff;
  font-size: 11.5px; font-weight: 800; line-height: 18px; letter-spacing: .02em; text-align: center;
}
.wt-fab-label {
  background: var(--wt-navy); color: #fff; border-radius: 999px;
  padding: 9px 16px; font-size: 14px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 8px 22px rgba(20, 61, 141, .3);
  opacity: 0; transform: translateX(8px); pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.wt-fab:hover .wt-fab-label, .wt-fab:focus-visible .wt-fab-label, .wt-fab.wt-tease .wt-fab-label { opacity: 1; transform: none; }
.wt-fab:hover { transform: translateY(-2px); }
.wt-fab.is-hidden { opacity: 0; pointer-events: none; transform: translateY(8px); }
/* a „vissza a tetejére” gomb ne takarja */
html:has(.wt-fab) .generate-back-to-top { bottom: 96px !important; }

/* ---------- „Kérdezze Teklát” a termékkereső mellett ---------- */
.wt-search-row { display: flex; align-items: center; gap: 10px; }
.wt-search-row > .wp-block-yith-search-block { flex: 1 1 auto; min-width: 0; }
.wt-ask {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px;
  border: 0; border-radius: 10px; cursor: pointer;
  background: var(--wt-orange); color: #fff;
  font-size: 14px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 6px 16px rgba(246, 137, 50, .3);
  transition: background .15s, transform .15s;
}
.wt-ask:hover { background: var(--wt-orange-dark); transform: translateY(-1px); }
@media (max-width: 560px) {
  .wt-ask span { display: none; }
  .wt-ask { width: 40px; padding: 0; justify-content: center; }
}

/* ---------- panel ---------- */
.wt-panel {
  position: fixed; right: 20px; bottom: 20px; z-index: 100001; /* a WordPress admin sáv (99999) fölött */
  width: 390px; height: min(640px, calc(100vh - 40px));
  display: flex; flex-direction: column;
  background: #fff; color: var(--wt-text);
  border: 1px solid var(--wt-border); border-radius: 18px;
  box-shadow: 0 24px 60px rgba(14, 30, 70, .28);
  overflow: hidden;
  opacity: 0; transform: translateY(16px) scale(.98); pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.wt-panel.is-open { opacity: 1; transform: none; pointer-events: auto; }

.wt-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 12px 14px 16px;
  background: linear-gradient(135deg, var(--wt-navy-2), var(--wt-navy));
  color: #fff;
}
.wt-ava { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.8); flex: none; }
.wt-who { flex: 1; min-width: 0; line-height: 1.25; }
.wt-who strong { display: block; font-size: 16px; }
.wt-who span { font-size: 12.5px; opacity: .8; }
.wt-icon {
  width: 36px; height: 36px; border: 0; border-radius: 10px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: #fff; opacity: .85;
}
.wt-icon:hover { background: rgba(255,255,255,.14); opacity: 1; }

.wt-list {
  flex: 1; overflow-y: auto; padding: 16px 14px 8px;
  background: var(--wt-soft);
  display: flex; flex-direction: column; gap: 10px;
  overscroll-behavior: contain;
}
.wt-msg {
  max-width: 88%; padding: 10px 14px; border-radius: 14px;
  font-size: 14.5px; line-height: 1.55; word-wrap: break-word;
}
.wt-msg p { margin: 0 0 .55em; }
.wt-msg p:last-child, .wt-msg ul:last-child { margin-bottom: 0; }
.wt-msg ul { margin: .2em 0 .6em; padding-left: 1.2em; list-style: disc; }
.wt-msg li { margin: .15em 0; }
.wt-msg strong { font-weight: 700; }
.wt-assistant {
  align-self: flex-start; background: #fff; border: 1px solid var(--wt-border);
  border-bottom-left-radius: 4px;
}
.wt-assistant a { color: var(--wt-navy); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.wt-user {
  align-self: flex-end; background: var(--wt-navy); color: #fff;
  border-bottom-right-radius: 4px;
}

.wt-typing { display: inline-flex; gap: 5px; padding: 14px 16px; }
.wt-typing span {
  width: 7px; height: 7px; border-radius: 50%; background: #9aa5bb;
  animation: wt-blink 1.2s infinite ease-in-out;
}
.wt-typing span:nth-child(2) { animation-delay: .15s; }
.wt-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes wt-blink { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.wt-chips {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px;
  background: var(--wt-soft);
}
.wt-chips:not(:empty) { padding: 4px 14px 12px; }
.wt-chip {
  border: 1.5px solid var(--wt-orange); background: #fff; color: var(--wt-orange-dark);
  border-radius: 999px; padding: 7px 14px; cursor: pointer;
  font-size: 13.5px; font-weight: 600; line-height: 1.3; text-align: left;
  transition: background .15s, color .15s;
}
.wt-chip:hover { background: var(--wt-orange); color: #fff; }

.wt-form {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 10px 12px; border-top: 1px solid var(--wt-border); background: #fff;
}
.wt-form textarea {
  flex: 1; resize: none; min-height: 42px; max-height: 120px;
  padding: 10px 12px; margin: 0;
  border: 1px solid #d5dbe6; border-radius: 12px; background: #fff; color: var(--wt-text);
  font: inherit; font-size: 15px; line-height: 1.4;
}
.wt-form textarea:focus { outline: none; border-color: var(--wt-navy); box-shadow: 0 0 0 3px rgba(20, 61, 141, .14); }
.wt-send {
  flex: none; width: 42px; height: 42px; border: 0; border-radius: 12px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--wt-orange); color: #fff;
}
.wt-send:hover { background: var(--wt-orange-dark); }
.wt-send:disabled { opacity: .5; cursor: default; }
.wt-foot {
  padding: 0 12px 10px; background: #fff;
  font-size: 11.5px; color: var(--wt-muted); text-align: center;
}

/* ---------- telefon: teljes képernyő ---------- */
@media (max-width: 768px) {
  .wt-panel {
    right: 0; bottom: 0; left: 0; top: 0;
    width: 100%; height: 100%; height: 100dvh;
    border-radius: 0; border: 0;
  }
  html.wt-is-open, html.wt-is-open body { overflow: hidden; }
  /* a mobilos „Szűrés” gomb a webshopban középen van – a Tekla-gomb jobbra marad mellette */
  .wt-form textarea { font-size: 16px; } /* iOS ne nagyítson */
  .wt-head { padding-top: calc(12px + env(safe-area-inset-top, 0px)); }
  .wt-icon { width: 44px; height: 44px; }
  .wt-close { background: rgba(255,255,255,.16); opacity: 1; }
}


/* telefonon kisebb ikon, felirat nélkül */
@media (max-width: 768px) {
  .wt-fab { right: 14px; bottom: 14px; }
  .wt-fab-label { display: none; }
  .wt-fab-ava, .wt-fab-ava img { width: 56px; height: 56px; }
}
