/* HappyBirds mini chat – alap */
:root{
  --hbchat-right: 18px;
  --hbchat-btn-bottom: 18px; /* alap helyzet */
  --hbchat-gap: 54px;        /* gomb és ablak távolsága */
}

/* alap pozíciók változókból */
.hbchat-btn{
  right: var(--hbchat-right);
  bottom: var(--hbchat-btn-bottom);
}

.hbchat{
  right: var(--hbchat-right);
  bottom: calc(var(--hbchat-btn-bottom) + var(--hbchat-gap));
}

/* amikor a nyíl látszik -> emeljük fel a chat gombot (és vele az ablakot is) */
html.hb-scrolltop-visible{
  --hbchat-btn-bottom: 92px; /* 20 (nyíl alja) + 55 (magasság) + ~17px hézag */
}

.hbchat-btn {
  position: fixed;
  z-index: 9999;
  border: 0;
  border-radius: 999px;
  padding: 12px 14px;
  cursor: pointer;
  background: #599C13;
  color: #fff;
  box-shadow: 0 10px 25px rgba(0,0,0,.18);
  font: 600 14px/1 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
.hbchat-btn:active { transform: translateY(1px); }

.hbchat {
  position: fixed;
  width: min(360px, calc(100vw - 36px));
  height: 520px;
  max-height: calc(100vh - 100px);
  z-index: 9999;
  display: none;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 18px 55px rgba(0,0,0,.22);
  border: 1px solid rgba(0,0,0,.08);
  font: 14px/1.35 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.hbchat.is-open { display: flex; flex-direction: column; }

.hbchat__head {
  background: #88cc44;
  padding: 12px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.hbchat__title {
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.4px;
  color: #ffffff;
}
.hbchat__sub {
  font-size: 13px;
  color: rgba(17,24,39,.65);
}
.hbchat__spacer { flex: 1; }
.hbchat__x {
  border: 0;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  padding: 6px 10px;
}

.hbchat__log {
  padding: 12px;
  overflow: auto;
  flex: 1;
  background: #fff;
}

.hbchat__msg {
  display: inline-block;
  max-width: 86%;
  padding: 10px 12px;
  border-radius: 14px;
  margin: 6px 0;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.hbchat__msg--me{
  background: linear-gradient(180deg, #C7EA93 0%, #9FD15F 60%, #90C84E 100%);
  border: 1px solid rgba(46,125,50,.22);
  margin-left: auto;
  color: #111827;
}

.hbchat__msg--bot{
  background: linear-gradient(180deg, #F4FBEA 0%, #E7F5DA 100%);
  border: 1px solid rgba(46,125,50,.14);
  color: #111827;
}

.hbchat__foot {
  padding: 10px;
  border-top: 1px solid rgba(0,0,0,.06);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  background: #fff;
}

.hbchat__input {
  border: 1px solid rgba(0,0,0,.18);
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
}
.hbchat__send{
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  background: linear-gradient(180deg, #6AB61A 0%, #599C13 70%, #4E8E10 100%);
  color: #ffffff;
  font-weight: 600;
  letter-spacing: .2px;
  box-shadow: 0 10px 18px rgba(0,0,0,.14);
  transition: transform .12s ease, box-shadow .18s ease, filter .18s ease;
}

.hbchat__send:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(0,0,0,.18);
  filter: brightness(1.02);
}

.hbchat__send:active{
  transform: translateY(0);
  box-shadow: 0 8px 14px rgba(0,0,0,.12);
  filter: brightness(.98);
}

/* szép, de nem “neon” fókusz */
.hbchat__send:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(89,156,19,.25), 0 12px 22px rgba(0,0,0,.16);
}

.hbchat__hint {
  padding: 0 12px 10px;
  font-size: 12px;
  color: rgba(17,24,39,.55);
}

@media (hover:hover) and (pointer:fine) and (min-width: 980px){
  .hbchat-btn{
    /* marad a zöld háttér */
    box-shadow:
      0 0 0 3px rgba(255,255,255,.55), /* halo, ettől nem olvad bele */
      0 14px 30px rgba(0,0,0,.22);     /* mélyebb árnyék */
  }

  .hbchat-btn:hover{
    box-shadow:
      0 0 0 3px rgba(255,255,255,.70),
      0 18px 38px rgba(0,0,0,.26);
    transform: translateY(-1px);
  }
}

/*Válasz animáció*/
/* Typing indicator */
.hbchat__msg--typing{ width: fit-content; max-width: 60%; }
.hbchat__dots{ display:inline-flex; gap:6px; height:14px; align-items:center; }
.hbchat__dots span{ width:7px; height:7px; border-radius:50%; background: rgba(17,24,39,.45);
  animation: hb-bounce .9s infinite ease-in-out; }
.hbchat__dots span:nth-child(2){ animation-delay:.12s; }
.hbchat__dots span:nth-child(3){ animation-delay:.24s; }
@keyframes hb-bounce{ 0%,80%,100%{transform:translateY(0);opacity:.55} 40%{transform:translateY(-4px);opacity:1} }

/*chip*/
.hbchat__ui { margin-top: .4rem; }

.hbchat-chips{
  display:flex;
  flex-wrap:wrap;
  gap:.5rem;
  margin:.35rem 0 .2rem;
}

.hbchat-chip{
  display:inline-flex;
  align-items:center;
  padding:.5rem .85rem;
  border-radius:999px;
  text-decoration:none;
  line-height:1;
  font-weight:600;
  letter-spacing:.2px;

  /* zöld, de olvasható (nem fehér szöveg) */
  color:#1F6B25;
  background: linear-gradient(180deg, #F4FBEA 0%, #E7F5DA 100%);
  border:1px solid rgba(46,125,50,.28);
  box-shadow: 0 10px 18px rgba(0,0,0,.10);

  transition: transform .12s ease, box-shadow .18s ease, filter .18s ease;
  -webkit-tap-highlight-color: transparent;
}

.hbchat-chip:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(0,0,0,.14);
  filter: brightness(1.02);
}

.hbchat-chip:active{
  transform: translateY(0);
  box-shadow: 0 8px 14px rgba(0,0,0,.10);
  filter: brightness(.98);
}

.hbchat-chip:focus-visible{
  outline:none;
  box-shadow:
    0 0 0 3px rgba(89,156,19,.22),
    0 12px 22px rgba(0,0,0,.12);
}