/* Receptlap-segítő (AI chatbot) widget. Saját, önálló stílus (nem függ a Tailwind buildtől). */
.rl-chat { --rl-green: #4A6331; --rl-green-dark: #3b4f27; --rl-brown: #612A0E; --rl-cream: #faf6f0; --rl-line: #eadfd0;
  font-family: var(--font-body, ui-sans-serif, system-ui, sans-serif); font-size: 15px; line-height: 1.5; color: #2b2118; }
.rl-chat *, .rl-chat *::before, .rl-chat *::after { box-sizing: border-box; }
.rl-chat[hidden], .rl-chat [hidden] { display: none !important; }

/* lebegő gomb: zöld „pirula" + kilógó 3D szakács-avatar */
.rl-chat__fab { position: fixed; right: 16px; bottom: 16px; z-index: 900; display: inline-flex; align-items: center; gap: 0;
  padding: 0; border: 0; background: none; font: inherit; cursor: pointer; filter: drop-shadow(0 8px 14px rgba(40,25,10,.3)); }
.rl-chat__fab-av { position: relative; flex: none; width: 70px; height: 70px; margin-right: -26px; z-index: 1; border-radius: 50%; box-sizing: border-box;
  border: 3px solid var(--rl-green); background: radial-gradient(circle at 35% 30%, #fff7e8, #f0dfc4 72%);
  /* a kör alja levágja a vállat, a teteje szabad: a kalap „kilóg” a körből (3D pop-out hatás) */
  clip-path: inset(-70px 0 0 0 round 0 0 35px 35px); }
.rl-chat__fab-av img { position: absolute; left: 50%; bottom: -3px; width: 78px; height: auto; transform: translateX(-50%); transform-origin: 50% 100%;
  transition: transform .2s ease; pointer-events: none; }
.rl-chat__fab-label { position: relative; padding: 14px 20px 14px 34px; border-radius: 999px; background: var(--rl-green); color: #fff; font-weight: 700; white-space: nowrap; transition: background .15s; }
.rl-chat__fab:hover .rl-chat__fab-label { background: var(--rl-green-dark); }
.rl-chat__fab:hover .rl-chat__fab-av img { transform: translateX(-50%) scale(1.06) rotate(-2deg); }
.rl-chat__fab-label::after { content: ''; position: absolute; right: 9px; top: 9px; width: 9px; height: 9px; border-radius: 50%; background: #7bd36a; box-shadow: 0 0 0 2px var(--rl-green); }
.rl-chat__fab:focus-visible, .rl-chat button:focus-visible, .rl-chat textarea:focus-visible, .rl-chat a:focus-visible { outline: 3px solid #f2b66b; outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .rl-chat__fab-av img { animation: rl-bob 3.4s ease-in-out infinite; }
  @keyframes rl-bob { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-2px); } }
}

/* panel */
.rl-chat__panel { position: fixed; right: 16px; bottom: 16px; z-index: 901; width: min(400px, calc(100vw - 24px)); height: min(600px, calc(100vh - 76px));
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--rl-line); border-radius: 18px; overflow: visible;
  box-shadow: 0 18px 50px rgba(40,25,10,.3); }
.rl-chat__head { position: relative; display: flex; align-items: center; gap: 8px; padding: 10px 12px 10px 96px; min-height: 60px; background: var(--rl-green); color: #fff; border-radius: 17px 17px 0 0; }
.rl-chat__head-av { position: absolute; left: 12px; bottom: 0; width: 72px; height: 66px; }
.rl-chat__head-av::before { content: ''; position: absolute; left: 4px; bottom: 6px; width: 64px; height: 54px; border-radius: 14px 14px 0 0; background: radial-gradient(circle at 40% 30%, #fff7e8, #f0dfc4 75%); }
.rl-chat__head-av img { position: absolute; left: 50%; bottom: 6px; width: 62px; height: auto; transform: translateX(-50%); pointer-events: none; }
.rl-chat__head-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.rl-chat__head-title strong { font-size: 16px; }
.rl-chat__head-title small { font-size: 12px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-chat__head button { border: 0; background: rgba(255,255,255,.16); color: #fff; border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.rl-chat__head button:hover { background: rgba(255,255,255,.3); }
.rl-chat__body { flex: 1; overflow-y: auto; padding: 14px; background: var(--rl-cream); display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.rl-chat__msg { max-width: 92%; padding: 10px 13px; border-radius: 14px; word-wrap: break-word; overflow-wrap: anywhere; }
.rl-chat__msg--user { align-self: flex-end; background: var(--rl-green); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.rl-chat__msg--bot { align-self: flex-start; background: #fff; border: 1px solid var(--rl-line); border-bottom-left-radius: 4px; }
.rl-chat__msg--bot p { margin: 0 0 .6em; } .rl-chat__msg--bot p:last-child { margin-bottom: 0; }
.rl-chat__msg--bot ul, .rl-chat__msg--bot ol { margin: .3em 0 .6em 1.2em; padding: 0; } .rl-chat__msg--bot li { margin: .15em 0; }
.rl-chat__msg--bot a, .rl-chat__msg--bot a.chatbot-link { color: var(--rl-brown); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.rl-chat__msg--stream { white-space: pre-wrap; }
.rl-chat__status { color: #7a6a58; font-size: 13px; font-style: italic; padding: 2px 4px; }
.rl-chat__dots::after { content: ''; display: inline-block; width: 1.2em; text-align: left; animation: rl-dots 1.2s steps(4, end) infinite; }
@keyframes rl-dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75%, 100% { content: '...'; } }
@media (prefers-reduced-motion: reduce) { .rl-chat__dots::after { animation: none; content: '…'; } .rl-chat__body { scroll-behavior: auto; } .rl-chat__fab { transition: none; } }

/* bot-üzenet avatárral */
.rl-chat__row { display: flex; align-items: flex-end; gap: 8px; align-self: flex-start; max-width: 100%; }
.rl-chat__row .rl-chat__msg--bot { align-self: auto; max-width: calc(100% - 44px); }
.rl-chat__av { flex: none; width: 36px; height: 36px; border-radius: 50%; background: radial-gradient(circle at 40% 30%, #fff7e8, #f0dfc4 75%); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(40,25,10,.25); object-fit: cover; }
.rl-chat__row--status { align-items: center; color: #7a6a58; font-size: 13px; font-style: italic; }

/* javaslat-chipek */
.rl-chat__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rl-chat__chip { border: 1px solid var(--rl-green); background: #fff; color: var(--rl-green-dark); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13.5px; cursor: pointer; text-align: left; }
.rl-chat__chip:hover { background: var(--rl-green); color: #fff; }

/* kártyák */
.rl-chat__cards { align-self: stretch; display: flex; flex-direction: column; gap: 8px; }
.rl-chat__card { display: flex; gap: 10px; align-items: center; padding: 8px; background: #fff; border: 1px solid var(--rl-line); border-radius: 12px; text-decoration: none; color: inherit; }
.rl-chat__card:hover { border-color: var(--rl-green); box-shadow: 0 2px 10px rgba(74,99,49,.18); }
.rl-chat__card img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex: none; background: var(--rl-line); }
.rl-chat__card-ph { width: 64px; height: 64px; border-radius: 8px; flex: none; background: var(--rl-line); display: grid; place-items: center; font-size: 26px; }
.rl-chat__card strong { display: block; font-size: 14px; line-height: 1.3; color: #2b2118; }
.rl-chat__card small { display: block; margin-top: 2px; color: #7a6a58; font-size: 12.5px; }
.rl-chat__card em { font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--rl-green); }

/* beviteli sor */
.rl-chat__form { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; background: #fff; border-top: 1px solid var(--rl-line); position: relative; }
.rl-chat__form textarea { flex: 1; resize: none; max-height: 110px; min-height: 42px; padding: 9px 11px; border: 1px solid #cdbfae; border-radius: 12px; font: inherit; color: inherit; background: #fff; }
.rl-chat__form textarea:focus { border-color: var(--rl-green); }
.rl-chat__send { border: 0; background: var(--rl-green); color: #fff; font: inherit; font-weight: 700; padding: 10px 16px; border-radius: 12px; cursor: pointer; height: 42px; }
.rl-chat__send:hover:not(:disabled) { background: var(--rl-green-dark); }
.rl-chat__send:disabled { opacity: .55; cursor: default; }
.rl-chat__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.rl-chat__note { margin: 0; padding: 0 12px 10px; background: #fff; color: #7a6a58; font-size: 11.5px; line-height: 1.35; border-radius: 0 0 17px 17px; }

/* beágyazott (admin teszt) nézet */
.rl-chat--inline { padding-top: 40px; }
.rl-chat--inline .rl-chat__panel { position: static; width: 100%; height: 560px; box-shadow: none; z-index: auto; }
.rl-chat--inline .rl-chat__fab, .rl-chat--inline [data-rl-close] { display: none !important; }

@media (max-width: 520px) {
  .rl-chat:not(.rl-chat--inline) .rl-chat__panel { inset: 0; width: 100%; height: 100%; border-radius: 0; border: 0; }
  .rl-chat:not(.rl-chat--inline) .rl-chat__head { border-radius: 0; padding-left: 84px; }
  .rl-chat:not(.rl-chat--inline) .rl-chat__head-av { left: 10px; width: 64px; }
  .rl-chat:not(.rl-chat--inline) .rl-chat__head-av img { width: 50px; bottom: 0; }
  .rl-chat:not(.rl-chat--inline) .rl-chat__head-av::before { display: none; }
  .rl-chat:not(.rl-chat--inline) .rl-chat__note { border-radius: 0; }
  .rl-chat__fab-label { display: none; }
  .rl-chat__fab-av { margin-right: 0; }
}
@media print { .rl-chat { display: none !important; } }
