/* Greeny — mascota-asistent a site-ului (colțul din dreapta jos) + fereastra de chat.
   Ipostazele sunt imagini 3D (assets/img/greeny/*.webp) suprapuse; JS-ul arată una singură la un moment dat. */
:root { --gw: 84px; }
@media (max-width: 760px) { :root { --gw: 64px; } }
.greeny { position: fixed; right: 18px; bottom: 16px; z-index: 45; width: var(--gw); height: calc(var(--gw) * 1.338);
  border: 0; padding: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transform: translateY(140%); transition: transform .9s var(--spring, cubic-bezier(.34,1.56,.64,1)); }
.greeny.is-in { transform: none; }
.greeny:focus-visible { outline: 2px solid var(--amber, #f5b935); outline-offset: 6px; border-radius: 20px; }
@media (max-width: 760px) { .greeny { right: 12px; bottom: calc(84px + var(--safe-b, 0px)); } }

/* --lean (-1…1): se apleacă spre mouse; --wind (-1…1): „vântul” din derularea paginii */
.greeny__lean { position: absolute; inset: 0; transform-origin: 50% 100%; rotate: calc(var(--lean, 0) * 6deg); translate: calc(var(--lean, 0) * 3px) 0;
  transition: rotate .8s var(--ease-out, ease), translate .8s var(--ease-out, ease); }
.greeny__fig { position: absolute; inset: 0; transform-origin: 50% 100%; animation: gFloat 3.6s ease-in-out infinite; filter: drop-shadow(0 10px 14px rgba(0,0,0,.28)); }
.greeny__fig img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; pointer-events: none; }
.greeny__fig img.is-on { opacity: 1; }
/* frunzele sunt aceeași imagine, decupată deasupra tulpinii, și se leagănă separat de corp */
.g-body, .g-leaves { position: absolute; inset: 0; }
.g-body { -webkit-mask-image: linear-gradient(transparent 0 20%, #000 20%); mask-image: linear-gradient(transparent 0 20%, #000 20%); }
.g-leaves { -webkit-mask-image: linear-gradient(#000 0 21%, transparent 21%); mask-image: linear-gradient(#000 0 21%, transparent 21%);
  transform-origin: 52.8% 20.4%; animation: gLeaves 4.2s ease-in-out infinite;
  rotate: calc(var(--wind, 0) * 10deg - var(--lean, 0) * 5deg); transition: rotate 1s cubic-bezier(.3,1.7,.5,1); }
@keyframes gLeaves { 0%, 100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg); } }
.greeny.is-land .greeny__fig { animation: gLand .55s cubic-bezier(.3,.7,.4,1); }
@keyframes gLand { 0% { transform: scale(1.1, .86); } 45% { transform: scale(.95, 1.06) translateY(-4px); } 100% { transform: none; } }
.greeny.is-talk .greeny__fig { animation: gTalk .3s ease-in-out infinite alternate; }
@keyframes gTalk { to { transform: translateY(-2px) scale(1.012, .985); } }
.g-leaf { position: fixed; z-index: 56; width: 16px; height: 16px; pointer-events: none; animation: gLeafFly 1.5s cubic-bezier(.2,.7,.3,1) forwards; }
@keyframes gLeafFly { 0% { opacity: 0; transform: translate(0, 0) rotate(0) scale(.4); } 15% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(1); } }
@keyframes gFloat { 0%, 100% { transform: translateY(0) scale(1, 1); } 50% { transform: translateY(-5px) scale(.99, 1.015); } }
.greeny__shadow { position: absolute; left: 22%; right: 22%; bottom: -4px; height: 9px; border-radius: 50%; background: rgba(0,0,0,.28); filter: blur(4px);
  animation: gShadow 3.6s ease-in-out infinite; }
@keyframes gShadow { 50% { transform: scaleX(.82); opacity: .7; } }
.greeny.is-wave .greeny__fig { animation: gFloat 3.6s ease-in-out infinite, gWiggle .9s ease-in-out 2; }
@keyframes gWiggle { 25% { rotate: -4deg; } 75% { rotate: 4deg; } }
.greeny.is-happy .greeny__fig { animation: gHop .7s cubic-bezier(.3,.7,.4,1) 2; }
@keyframes gHop { 40% { transform: translateY(-14px) scale(.97, 1.04); } 80% { transform: translateY(0) scale(1.04, .96); } }
.greeny:active .greeny__fig { scale: .94; }

/* accesorii de sărbători (tema activă din Setări → Teme de sărbători) */
.g-acc { position: absolute; pointer-events: none; height: auto; }
.g-acc--hat { width: 60%; left: 20%; top: -5%; transform: rotate(-6deg); transform-origin: 50% 85%; filter: drop-shadow(0 4px 4px rgba(0,0,0,.28)); }
.g-acc--ears { width: 56%; left: 22%; top: -14%; }
/* de Crăciun și de Paște frunzele se ascund: le ține locul căciula, respectiv urechile */
.greeny--xmas .g-leaves, .greeny--easter .g-leaves { display: none; }
.g-acc--ears .ear-l { transform-origin: 40px 96px; animation: gEarL 6s ease-in-out infinite; }
.g-acc--ears .ear-r { transform-origin: 58px 96px; animation: gEarR 7.5s ease-in-out infinite; }
@keyframes gEarL { 0%, 70%, 100% { transform: rotate(0); } 78% { transform: rotate(-8deg); } 86% { transform: rotate(2deg); } }
@keyframes gEarR { 0%, 40%, 100% { transform: rotate(0); } 48% { transform: rotate(9deg); } 56% { transform: rotate(-2deg); } }
.g-spark { position: absolute; color: #ffd76e; font-size: calc(var(--gw) * .22); line-height: 1; text-shadow: 0 0 8px rgba(255,215,110,.9); animation: gTwinkle 1.8s ease-in-out infinite; pointer-events: none; }
.g-spark:nth-of-type(1) { left: -8%; top: 22%; } .g-spark:nth-of-type(2) { right: -10%; top: 8%; animation-delay: .5s; font-size: calc(var(--gw) * .17); }
.g-spark:nth-of-type(3) { right: -6%; top: 52%; animation-delay: 1s; font-size: calc(var(--gw) * .14); } .g-spark:nth-of-type(4) { left: 2%; top: -4%; animation-delay: 1.3s; font-size: calc(var(--gw) * .15); }
@keyframes gTwinkle { 50% { opacity: .15; transform: scale(.5) rotate(40deg); } }

/* balonul „Sunt aici să te ajut!” */
.greeny__bubble { position: fixed; right: calc(18px + var(--gw) * .78); bottom: calc(16px + var(--gw) * 1.05); z-index: 46; width: max-content; max-width: 230px;
  padding: 12px 15px; border-radius: 18px 18px 4px 18px; background: #fff; color: var(--ink, #0b1510); text-align: left;
  font: 400 .88rem/1.4 var(--f-body, sans-serif); box-shadow: 0 18px 40px -14px rgba(0,0,0,.45);
  opacity: 0; transform: translateY(8px) scale(.85); transform-origin: 100% 100%; pointer-events: none;
  transition: opacity .3s, transform .5s cubic-bezier(.34,1.56,.64,1); }
.greeny__bubble b { display: block; font-weight: 800; color: var(--turf, #0e2a1b); margin-bottom: 2px; }
.greeny__bubble.is-on { opacity: 1; transform: none; }
@media (max-width: 760px) { .greeny__bubble { right: calc(12px + var(--gw) * .8); bottom: calc(84px + var(--safe-b, 0px) + var(--gw) * 1.05); font-size: .84rem; max-width: 200px; } }

/* fereastra de chat */
.gchat { position: fixed; right: 18px; bottom: calc(16px + var(--gw) * 1.338 + 12px); z-index: 55; width: 370px; height: min(560px, calc(100dvh - 190px));
  display: flex; flex-direction: column; border-radius: 26px; overflow: hidden; color: #fff;
  background: rgba(12, 38, 24, .94); backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid rgba(255,255,255,.12); box-shadow: 0 30px 70px -20px rgba(0,0,0,.6);
  opacity: 0; transform: translateY(16px) scale(.96); transform-origin: 90% 100%; pointer-events: none; visibility: hidden;
  transition: opacity .3s, transform .5s var(--ease-out, ease), visibility 0s .5s; }
.gchat.is-open { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity .3s, transform .5s var(--ease-out, ease); }
@media (max-width: 760px) {
  .gchat { left: 10px; right: 10px; bottom: calc(10px + var(--safe-b, 0px)); width: auto; height: min(78dvh, 640px); border-radius: 24px; }
  .gchat-open .greeny, .gchat-open .greeny__bubble { opacity: 0; pointer-events: none; }
}
.gchat__head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.gchat__avatar { position: relative; flex: none; width: 46px; height: 46px; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 50% 40%, #2f6b45, #143323); }
.gchat__avatar img { position: absolute; left: -12%; top: 4%; width: 124%; height: auto; opacity: 0; }
.gchat__avatar img.is-on { opacity: 1; }
.gchat__who { flex: 1; min-width: 0; }
.gchat__who b { display: block; font: 800 1.15rem/1 var(--f-display, sans-serif); text-transform: uppercase; letter-spacing: .03em; }
.gchat__who small { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: .76rem; color: rgba(255,255,255,.65); }
.gchat__who small::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #5ee08a; box-shadow: 0 0 0 3px rgba(94,224,138,.2); }
.gchat__close { flex: none; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; cursor: pointer; font-size: 20px; line-height: 1; }
.gchat__close:hover { background: rgba(255,255,255,.16); }

.gchat__log { flex: 1; overflow-y: auto; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; scrollbar-width: thin; }
.gmsg { max-width: 86%; padding: 10px 14px; border-radius: 18px; font-size: .92rem; line-height: 1.45; white-space: pre-line; animation: gMsg .45s var(--ease-out, ease) both; }
.gmsg--bot { align-self: flex-start; background: rgba(255,255,255,.09); border-bottom-left-radius: 6px; }
.gmsg--me { align-self: flex-end; background: var(--amber, #f5b935); color: var(--amber-ink, #241900); border-bottom-right-radius: 6px; font-weight: 500; }
.gmsg a { color: #ffd76e; font-weight: 600; }
@keyframes gMsg { from { opacity: 0; transform: translateY(8px); } }
.gmsg--typing { display: inline-flex; gap: 5px; padding: 14px 16px; }
.gmsg--typing i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.7); animation: gDot 1.1s infinite; }
.gmsg--typing i:nth-child(2) { animation-delay: .15s; } .gmsg--typing i:nth-child(3) { animation-delay: .3s; }
@keyframes gDot { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }

.gchat__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 14px 10px; }
.gchat__chips button { flex: none; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.04); color: #fff; border-radius: 999px;
  padding: 7px 12px; font: 600 .78rem/1 var(--f-body, sans-serif); cursor: pointer; transition: background-color .2s, border-color .2s; }
.gchat__chips button:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); }
.gchat__form { display: flex; gap: 8px; padding: 10px 12px 8px; border-top: 1px solid rgba(255,255,255,.08); }
.gchat__form input { flex: 1; min-width: 0; height: 46px; border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: 0 16px;
  background: rgba(0,0,0,.2); color: #fff; font: 400 16px var(--f-body, sans-serif); outline: none; }
.gchat__form input::placeholder { color: rgba(255,255,255,.45); }
.gchat__form input:focus { border-color: var(--amber, #f5b935); }
.gchat__form button { flex: none; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--amber, #f5b935); color: var(--amber-ink, #241900); cursor: pointer;
  display: grid; place-items: center; transition: transform .2s; }
.gchat__form button:hover { transform: scale(1.06); }
.gchat__form button svg { width: 20px; height: 20px; }
.gchat__note { margin: 0; padding: 0 16px 12px; font-size: .7rem; color: rgba(255,255,255,.45); text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .greeny__fig, .greeny__shadow, .g-leaves, .greeny.is-wave .greeny__fig, .greeny.is-happy .greeny__fig, .greeny.is-land .greeny__fig, .greeny.is-talk .greeny__fig { animation: none; }
  .greeny__lean, .g-leaves { transition: none; rotate: none; translate: none; }
  .g-acc--ears .ear-l, .g-acc--ears .ear-r, .g-spark { animation: none; }
  .g-leaf { display: none; }
  .greeny { transition: none; }
}

/* în răspunsuri: link către o pagină a site-ului (cu numele ei) și harta */
.gmsg a.gmsg__link { display: inline-flex; align-items: center; gap: 4px; padding: 1px 9px 2px; border-radius: 999px; background: rgba(245,185,53,.16); color: #ffd76e; text-decoration: none; font-weight: 600; white-space: nowrap; }
.gmsg a.gmsg__link::after { content: '→'; font-size: .85em; }
.gmsg a.gmsg__link:hover { background: rgba(245,185,53,.28); }
.gmap { position: relative; margin-top: 10px; border-radius: 14px; overflow: hidden; background: #1d3a2a; border: 1px solid rgba(255,255,255,.12); transition: border-color .3s; }
.gmap:hover { border-color: rgba(245,185,53,.5); }
.gmap__open { display: block; text-decoration: none; color: #fff; }
.gmap__route { position: absolute; right: 10px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px;
  background: var(--amber, #f5b935); color: var(--amber-ink, #241900); font: 700 .78rem/1 var(--f-body, sans-serif); text-decoration: none; box-shadow: 0 6px 14px -6px rgba(0,0,0,.5); }
.gmap__route svg { width: 14px; height: 14px; }
.gmap__route:hover { filter: brightness(1.06); }
.gmap__img { position: relative; display: block; height: 140px; background: #dfe7dc; }
.gmap__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gmap__pin { position: absolute; left: 50%; top: 50%; width: 26px; height: 34px; margin: -34px 0 0 -13px; filter: drop-shadow(0 4px 4px rgba(0,0,0,.35)); animation: gPin 2.4s ease-in-out infinite; }
@keyframes gPin { 0%, 70%, 100% { transform: none; } 80% { transform: translateY(-7px); } 90% { transform: translateY(0) scale(1.05, .95); } }
.gmap__credit { position: absolute; right: 6px; bottom: 5px; padding: 0 5px; border-radius: 4px; background: rgba(255,255,255,.75); color: #333; font-size: 9px; line-height: 1.5; }
.gmap__cap { display: flex; flex-direction: column; gap: 2px; padding: 9px 96px 10px 12px; font-size: .8rem; line-height: 1.35; }
.gmap__cap b { font-weight: 600; }
.gmap__cap span { color: #ffd76e; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .gmap__pin { animation: none; } }

/* „te duc acolo”: butonul, numărătoarea și secțiunea luminată la sosire */
.gmsg__btn { display: flex; width: 100%; justify-content: center; margin-top: 10px; padding: 11px 14px; border: 0; border-radius: 14px; cursor: pointer;
  background: var(--amber, #f5b935); color: var(--amber-ink, #241900); font: 700 .86rem/1.2 var(--f-body, sans-serif); transition: transform .2s, box-shadow .2s; }
.gmsg__btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -10px rgba(245,185,53,.8); }
.gmsg__go { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 9px 10px 9px 12px; border-radius: 14px; background: rgba(245,185,53,.14); font-size: .84rem; }
.gmsg__ring { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(245,185,53,.3); border-top-color: var(--amber, #f5b935); animation: gRing .8s linear infinite; }
@keyframes gRing { to { transform: rotate(360deg); } }
.gmsg__count { flex: 1; font-weight: 600; color: #ffd76e; }
.gmsg__go button { flex: none; border: 1px solid rgba(255,255,255,.25); background: none; color: #fff; border-radius: 999px; padding: 6px 11px; font: 600 .76rem/1 var(--f-body, sans-serif); cursor: pointer; }
.gmsg__go button:hover { background: rgba(255,255,255,.1); }
.g-spot { animation: gSpot 2.8s ease-out; }
@keyframes gSpot { 0% { box-shadow: inset 0 0 0 0 rgba(245,185,53,0); } 15% { box-shadow: inset 0 0 0 4px rgba(245,185,53,.95); } 100% { box-shadow: inset 0 0 0 4px rgba(245,185,53,0); } }
@media (prefers-reduced-motion: reduce) { .gmsg__ring, .g-spot { animation: none; } }

/* cardul de rezervare din chat ([[rezerva:…]]): orele libere reale, datele și plata */
.gmsg:has(.gbook) { max-width: 100%; width: 100%; box-sizing: border-box; }
.gbook { white-space: normal; margin-top: 10px; border-radius: 16px; background: #10301f; border: 1px solid rgba(255,255,255,.14); overflow: hidden; font-size: .86rem; }
.gbook__head { display: flex; flex-direction: column; gap: 2px; padding: 11px 13px; background: rgba(245,185,53,.12); border-bottom: 1px solid rgba(255,255,255,.1); }
.gbook__head b { font: 800 1.05rem/1.1 var(--f-display, sans-serif); text-transform: uppercase; letter-spacing: .02em; color: #ffd76e; }
.gbook__head span { color: rgba(255,255,255,.82); }
.gbook__body { padding: 11px 13px 4px; display: grid; gap: 9px; }
.gbook__muted { margin: 0; color: rgba(255,255,255,.7); font-size: .8rem; }
.gbook__note { margin: 0; padding: 8px 10px; border-radius: 10px; background: rgba(245,185,53,.14); color: #ffe39a; }
.gbook__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gbook__chip, .gbook__time, .gbook__more { border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.06); color: #fff; border-radius: 999px; padding: 7px 11px; font: 600 .8rem/1.15 var(--f-body, sans-serif); cursor: pointer; }
.gbook__chip.is-on { background: #fff; color: #0e2a1b; border-color: #fff; }
.gbook__times { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.gbook__time { border-radius: 10px; padding: 9px 0; text-align: center; }
.gbook__time.is-on { background: var(--amber, #f5b935); color: var(--amber-ink, #241900); border-color: var(--amber, #f5b935); }
.gbook__more { justify-self: start; background: none; color: #ffd76e; border-color: rgba(245,185,53,.4); }
@media (hover: hover) { .gbook__chip:hover, .gbook__time:hover, .gbook__more:hover { border-color: var(--amber, #f5b935); } }
.gbook__sum { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-top: 9px; border-top: 1px dashed rgba(255,255,255,.18); }
.gbook__sum b { font: 900 1.25rem/1 var(--f-display, sans-serif); color: var(--amber, #f5b935); white-space: nowrap; }
.gbook__form { display: grid; gap: 7px; padding-bottom: 8px; }
.gbook__form input[type="text"], .gbook__form input[type="tel"], .gbook__form input[type="email"] { width: 100%; box-sizing: border-box; min-height: 42px; padding: 9px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff; font: 400 16px/1.2 var(--f-body, sans-serif); }
.gbook__form input::placeholder { color: rgba(255,255,255,.55); }
.gbook__form input:focus { outline: none; border-color: var(--amber, #f5b935); }
.gbook__agree { display: flex; gap: 8px; align-items: flex-start; font-size: .78rem; color: rgba(255,255,255,.82); line-height: 1.35; }
.gbook__agree input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--amber, #f5b935); flex: none; }
.gbook__status { margin: 0; font-size: .8rem; color: #ffe39a; }
.gbook__status:empty { display: none; }
.gbook__pay { min-height: 44px; border: 0; border-radius: 12px; background: var(--amber, #f5b935); color: var(--amber-ink, #241900); font: 700 .9rem/1 var(--f-body, sans-serif); cursor: pointer; }
.gbook__pay:disabled { opacity: .6; }
.gbook__foot { margin: 0; padding: 9px 13px 11px; font-size: .78rem; color: rgba(255,255,255,.7); border-top: 1px solid rgba(255,255,255,.08); }
.gbook__foot a { color: #ffd76e; }
/* cât e un card de rezervare în chat: mai mult loc (fără butoanele cu întrebări rapide, chat mai înalt) */
.gchat.has-book .gchat__chips { display: none; }
@media (min-width: 761px) { .gchat.has-book { height: min(720px, calc(100dvh - 150px)); } }
