/* Chat-buborék (→ frontend/chat.js, docs/chat.md). Önálló stílus: a landingen és a Tabler-oldalakon is ugyanígy néz ki.
   A süti-sáv (1035) alatta marad: amíg nincs döntés, az takarja a buborékot, nem fordítva. */
.pkchat { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1034; font-family: inherit; font-size: 16.5px; color: #1b2430; }
.pkchat[hidden] { display: none; }
.pkchat-btn { width: 56px; height: 56px; border-radius: 50%; border: 0; background: #1c7c54; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 3px #fff, 0 8px 24px rgba(20, 83, 45, .35); position: relative;
  transition: transform .15s ease, background .15s ease; }
.pkchat-btn:hover { background: #14532d; transform: translateY(-1px); }
.pkchat-btn:focus-visible { outline: 3px solid #bbf7d0; outline-offset: 2px; }
.pkchat.is-open .pkchat-btn { display: none; }
.pkchat-badge { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: #d63939; color: #fff; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; }
.pkchat-badge[hidden] { display: none; }

/* Hívogató buborék a gomb fölött (chat.js teaser) */
.pkchat-teaser { position: absolute; right: 0; bottom: 72px; width: max-content; max-width: min(300px, calc(100vw - 2.5rem));
  animation: pkchat-pop .25s ease-out; }
.pkchat-teaser[hidden] { display: none; }
.pkchat.is-open .pkchat-teaser { display: none; }
.pkchat-teaser-text { display: block; text-align: left; background: #fff; color: inherit; border: 1px solid #e4e7ec; border-radius: 16px;
  padding: 12px 16px; font: inherit; font-size: 16px; line-height: 1.45; cursor: pointer; box-shadow: 0 8px 24px rgba(24, 36, 64, .14); }
.pkchat-teaser-text:hover { border-color: #1c7c54; }
.pkchat-teaser-x { position: absolute; top: -10px; right: -10px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid #e4e7ec;
  background: #fff; color: #475467; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0;
  box-shadow: 0 2px 6px rgba(24, 36, 64, .12); }
.pkchat-teaser-x svg { width: 14px; height: 14px; }
@keyframes pkchat-pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .pkchat-teaser { animation: none; } }

.pkchat-panel { width: min(400px, calc(100vw - 2rem)); height: min(580px, calc(100vh - 2.5rem)); background: #fff;
  border: 1px solid #e4e7ec; border-radius: 14px; box-shadow: 0 16px 40px rgba(24, 36, 64, .22); display: flex;
  flex-direction: column; overflow: hidden; }
.pkchat-panel[hidden] { display: none; }
.pkchat-head { background: #14532d; color: #fff; padding: 14px 16px; display: flex; align-items: flex-start; gap: 10px; }
.pkchat-head > div { flex: 1; }
.pkchat-title { font-weight: 700; font-size: 19px; }
.pkchat-status { font-size: 14.5px; line-height: 1.35; opacity: .85; margin-top: 2px; }
.pkchat-status.on::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #4ade80;
  margin-right: 6px; vertical-align: 1px; }
.pkchat-close { background: transparent; border: 0; color: #fff; cursor: pointer; padding: 2px; opacity: .85; }
.pkchat-close:hover { opacity: 1; }

.pkchat-log { flex: 1; overflow-y: auto; padding: 16px; background: #f6f8fa; display: flex; flex-direction: column; gap: 8px; }
.pkchat-msg { display: flex; flex-direction: column; max-width: 85%; }
.pkchat-msg.me { align-self: flex-end; align-items: flex-end; }
.pkchat-msg.admin { align-self: flex-start; }
.pkchat-bubble { padding: 10px 14px; border-radius: 14px; line-height: 1.45; word-wrap: break-word; overflow-wrap: anywhere; }
.pkchat-msg.me .pkchat-bubble { background: #1c7c54; color: #fff; border-bottom-right-radius: 4px; }
.pkchat-msg.admin .pkchat-bubble { background: #fff; border: 1px solid #e4e7ec; border-bottom-left-radius: 4px; }
.pkchat-time { font-size: 12px; color: #667085; margin: 2px 4px 0; }

.pkchat-form { border-top: 1px solid #e4e7ec; padding: 10px; display: flex; flex-direction: column; gap: 6px; background: #fff; }
.pkchat-input, .pkchat-email { width: 100%; border: 1px solid #d0d5dd; border-radius: 8px; padding: 10px 12px; font: inherit;
  font-size: 16px; resize: none; box-sizing: border-box; color: inherit; background: #fff; }
.pkchat-input:focus, .pkchat-email:focus { outline: none; border-color: #1c7c54; box-shadow: 0 0 0 3px rgba(28, 124, 84, .15); }
.pkchat-email[hidden] { display: none; }
.pkchat-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.pkchat-row { display: flex; align-items: center; gap: 8px; }
.pkchat-fine { margin-top: 4px; font-size: 12px; color: #98a2b3; line-height: 1.3; }
.pkchat-note { flex: 1; font-size: 13px; color: #667085; line-height: 1.3; overflow-wrap: anywhere; }
.pkchat-send { border: 0; background: #1c7c54; color: #fff; font-weight: 600; border-radius: 8px; padding: 10px 18px; cursor: pointer; font: inherit;
  font-size: 16px; font-weight: 600; }
.pkchat-send:hover { background: #14532d; }
.pkchat-send:disabled { opacity: .6; cursor: default; }
.pkchat-error { background: #fef3f2; color: #b42318; border-radius: 6px; padding: 6px 8px; font-size: 14px; }
.pkchat-error[hidden] { display: none; }
/* Fájl a chatben (→ docs/chat.md §Fájl) */
.pkchat-attach { border: 0; background: transparent; color: #667085; cursor: pointer; padding: 6px; border-radius: 8px; display: inline-flex; }
.pkchat-attach:hover { background: #f2f4f7; color: #1c7c54; }
.pkchat-attached { display: flex; align-items: center; gap: 6px; background: #f2f4f7; border-radius: 6px; padding: 4px 4px 4px 8px; font-size: 14px; }
.pkchat-attached[hidden] { display: none; }
.pkchat-attached-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pkchat-attached-x { border: 0; background: transparent; color: #667085; cursor: pointer; padding: 2px; display: inline-flex; }
.pkchat-img { display: block; }
.pkchat-img img { display: block; max-width: 100%; max-height: 220px; border-radius: 8px; background: rgba(0,0,0,.05); min-height: 40px; min-width: 60px; }
.pkchat-bubble > div + .pkchat-img, .pkchat-bubble > div + .pkchat-doc { margin-top: 6px; }
.pkchat-doc { display: block; }
.pkchat-doc { color: inherit; text-decoration: underline; }
.pkchat-panel.drop { outline: 3px dashed #1c7c54; outline-offset: -3px; }

@media (max-width: 480px) {
  .pkchat { right: .75rem; bottom: .75rem; }
  .pkchat.is-open { left: .5rem; right: .5rem; bottom: .5rem; }
  .pkchat-panel { width: 100%; height: min(560px, calc(100vh - 1rem)); }
}
@media print { .pkchat { display: none; } }
