/* RAD-BOT: chatul din partea de sus a paginii principale. Aceeași structură, alt aspect pe fiecare temă:
   Radikal = card întunecat cu neon și droid unghiular; Liquid Glass = panou de sticlă și droid-bulă. */

/* ---- comun ---- */
.radbot { position: relative; z-index: 3; width: 100%; max-width: 780px; color: var(--text); }
.radbot-cap { position: relative; display: flex; align-items: center; gap: 12px; }
.radbot-droid { flex: none; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 17px; }
.radbot-droid svg { width: 48px; height: 48px; overflow: visible; }
.radbot-id { display: grid; gap: 2px; min-width: 0; }
.radbot-id b { font: 800 16px/1 var(--font-marca); letter-spacing: .16em; }
.radbot-id small { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.radbot-led { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 8px #3ddc84; animation: rbLed 2.2s ease-in-out infinite; }
.radbot.gandeste .radbot-led { background: #ffd36b; box-shadow: 0 0 8px #ffd36b; animation-duration: .5s; }
@keyframes rbLed { 50% { opacity: .35; } }
.radbot-unelte { display: flex; gap: 6px; margin-left: auto; }
.radbot-buton {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--linie); background: rgba(255, 255, 255, .04); color: var(--text-2);
  transition: color .2s, border-color .2s, background .2s, transform .3s cubic-bezier(.2, 1.4, .4, 1);
}
.radbot-buton:hover { color: var(--text); transform: translateY(-2px); }
.radbot-buton svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .4s cubic-bezier(.2, 1.4, .4, 1); }
.radbot.deschis .radbot-comuta svg { transform: rotate(180deg); }

/* mesajele: se desfac lin la prima întrebare */
.radbot-cadru { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .55s cubic-bezier(.2, .9, .3, 1); }
.radbot.deschis .radbot-cadru { grid-template-rows: 1fr; }
.radbot-interior { min-height: 0; overflow: hidden; }
.radbot-mesaje { display: flex; flex-direction: column; gap: 10px; max-height: min(400px, 52vh); overflow-y: auto; overscroll-behavior: contain; padding: 16px 4px 8px; scrollbar-width: thin; }
.radbot-msg {
  max-width: 84%; padding: 10px 14px; border-radius: 18px; font-size: 14.5px; line-height: 1.55; overflow-wrap: anywhere;
  animation: rbIntra .5s cubic-bezier(.2, 1.3, .4, 1) both; transition: transform .3s cubic-bezier(.2, 1.4, .4, 1), box-shadow .3s;
}
.radbot-msg:hover { transform: translateY(-2px); }
.radbot-msg p + p { margin-top: 7px; }
.radbot-msg a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.radbot-msg code { font: 13px ui-monospace, Consolas, monospace; padding: 1px 5px; border-radius: 6px; background: rgba(0, 0, 0, .25); }
.radbot-de-la-bot { align-self: flex-start; border-bottom-left-radius: 6px; }
.radbot-de-la-tine { align-self: flex-end; border-bottom-right-radius: 6px; animation-name: rbIntraDreapta; }
@keyframes rbIntra { from { opacity: 0; transform: translate(-10px, 12px) scale(.94); } }
@keyframes rbIntraDreapta { from { opacity: 0; transform: translate(10px, 12px) scale(.94); } }
/* „scrie…”: trei puncte care sar */
.radbot-scrie { display: inline-flex; gap: 5px; padding: 14px 16px; }
.radbot-scrie i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .7; animation: rbPunct 1s ease-in-out infinite; }
.radbot-scrie i:nth-child(2) { animation-delay: .15s; }
.radbot-scrie i:nth-child(3) { animation-delay: .3s; }
@keyframes rbPunct { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-6px); opacity: 1; } }
.radbot-confirmare { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 4px 4px; font-size: 13.5px; }
.radbot-confirmare button { border-radius: 999px; padding: 7px 14px; font: 600 13px var(--font-text); cursor: pointer; border: 1px solid var(--linie); background: transparent; color: var(--text); }
.radbot-confirmare .radbot-da { border-color: rgba(255, 107, 122, .55); color: #ff8a96; }
.radbot-confirmare .radbot-da:hover { background: rgba(255, 107, 122, .14); }

/* sugestii (doar până începe conversația) */
.radbot-sugestii { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.radbot.are-mesaje .radbot-sugestii { display: none; }
.radbot-sugestie {
  padding: 8px 14px; border-radius: 999px; cursor: pointer; font: 500 13px var(--font-text); color: var(--text-2);
  border: 1px solid var(--linie); background: rgba(255, 255, 255, .03);
  transition: color .2s, border-color .2s, background .2s, transform .35s cubic-bezier(.2, 1.4, .4, 1);
}
.radbot-sugestie:hover, .radbot-sugestie:focus-visible { color: var(--text); transform: translateY(-3px) rotate(-1deg); }
.radbot-forma { display: flex; gap: 8px; margin-top: 12px; }
.radbot-text {
  flex: 1; min-width: 0; height: 48px; padding: 0 18px; border-radius: 15px; font: 15px var(--font-text); color: var(--text);
  border: 1px solid var(--linie); background: rgba(5, 7, 12, .65); transition: border-color .2s, box-shadow .25s;
}
.radbot-text::placeholder { color: var(--text-2); opacity: .8; }
.radbot-text:focus { outline: none; }
.radbot-trimite {
  flex: none; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 15px; cursor: pointer; color: #07101f;
  transition: transform .35s cubic-bezier(.2, 1.4, .4, 1), box-shadow .3s, opacity .2s;
}
.radbot-trimite:hover { transform: translateY(-2px) rotate(-10deg) scale(1.05); }
.radbot-trimite:active { transform: scale(.92); }
.radbot-trimite svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.radbot.gandeste .radbot-trimite { opacity: .55; pointer-events: none; }
.radbot-nota { margin-top: 9px; font-size: 11.5px; line-height: 1.45; color: var(--text-2); opacity: .8; }
.radbot-nota a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ---- TEMA RADIKAL: card întunecat cu neon, linie de scanare, droid unghiular ---- */
.erou-continut > .radbot { margin-bottom: 36px; }
html:not([data-tema="glass"]) .radbot {
  padding: 14px 16px 12px; border-radius: 22px; overflow: hidden;
  background: linear-gradient(180deg, rgba(17, 21, 34, .92), rgba(8, 10, 17, .95));
  border: 1px solid rgba(var(--accent-rgb), .3);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), .06), 0 26px 70px -32px rgba(var(--accent-rgb), .6), inset 0 1px 0 rgba(255, 255, 255, .05);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
html:not([data-tema="glass"]) .radbot::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 40%, rgba(var(--accent-rgb), .1) 50%, transparent 60%);
  transform: translateX(-100%); animation: rbScanare 7s ease-in-out infinite;
}
@keyframes rbScanare { 55%, 100% { transform: translateX(100%); } }
html:not([data-tema="glass"]) .radbot-droid { background: radial-gradient(circle at 50% 42%, rgba(var(--accent-rgb), .25), transparent 70%); }
html:not([data-tema="glass"]) .radbot-buton:hover { border-color: rgba(var(--accent-rgb), .6); background: rgba(var(--accent-rgb), .1); }
html:not([data-tema="glass"]) .radbot-de-la-bot { background: rgba(var(--accent-rgb), .1); border: 1px solid rgba(var(--accent-rgb), .26); }
html:not([data-tema="glass"]) .radbot-de-la-bot:hover { box-shadow: 0 10px 26px -14px rgba(var(--accent-rgb), .8); }
html:not([data-tema="glass"]) .radbot-de-la-tine { background: linear-gradient(135deg, var(--accent-deschis), var(--accent)); color: #06101e; font-weight: 500; }
html:not([data-tema="glass"]) .radbot-msg.eroare { background: rgba(255, 107, 122, .1); border-color: rgba(255, 107, 122, .38); }
html:not([data-tema="glass"]) .radbot-sugestie:hover { border-color: rgba(var(--accent-rgb), .6); background: rgba(var(--accent-rgb), .1); }
html:not([data-tema="glass"]) .radbot-text:focus { border-color: rgba(var(--accent-rgb), .7); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .18), 0 0 24px -6px rgba(var(--accent-rgb), .6); }
html:not([data-tema="glass"]) .radbot-trimite { background: linear-gradient(135deg, var(--accent-deschis), var(--accent)); box-shadow: 0 8px 22px -10px rgba(var(--accent-rgb), .9); }
/* droidul Radikal: plutește, clipește, face cu mâna, antena pulsează, propulsorul arde */
.rb-tot { transform-box: view-box; transform-origin: 32px 40px; animation: rbPluteste 3.2s ease-in-out infinite; }
@keyframes rbPluteste { 50% { transform: translateY(-2.6px) rotate(-2deg); } }
.rb-antena { animation: rbAntena 1.4s ease-in-out infinite; }
@keyframes rbAntena { 50% { opacity: .3; } }
.rb-ochi { transform-box: fill-box; transform-origin: center; animation: rbClipeste 4.2s infinite; }
@keyframes rbClipeste { 0%, 91%, 100% { transform: scaleY(1); } 94% { transform: scaleY(.1); } }
.rb-brat-dr { transform-box: view-box; transform-origin: 41px 47px; animation: rbSalut 5.5s ease-in-out infinite; }
@keyframes rbSalut { 0%, 68%, 100% { transform: rotate(0); } 74% { transform: rotate(-26deg); } 80% { transform: rotate(8deg); } 86% { transform: rotate(-22deg); } 92% { transform: rotate(4deg); } }
.rb-flacara { transform-box: fill-box; transform-origin: 50% 0; animation: rbFlacara .32s ease-in-out infinite alternate; }
@keyframes rbFlacara { to { transform: scaleY(1.4) scaleX(.82); opacity: .65; } }
.rb-gura rect { transform-box: fill-box; transform-origin: 50% 100%; }
.radbot.vorbeste .rb-gura rect { animation: rbVorbeste .2s ease-in-out infinite alternate; }
.radbot.vorbeste .rb-gura rect:nth-child(2) { animation-delay: -.12s; }
.radbot.vorbeste .rb-gura rect:nth-child(3) { animation-delay: -.06s; }
@keyframes rbVorbeste { to { transform: scaleY(2.1); } }
.radbot.gandeste .rb-ochi { animation: rbPriveste 1.1s ease-in-out infinite; }
@keyframes rbPriveste { 25% { transform: translateX(-2px); } 75% { transform: translateX(2px); } }
.radbot.gandeste .rb-antena { animation-duration: .35s; }
.radbot-cap:hover .rb-tot { animation-duration: 1.3s; }

/* ---- TEMA LIQUID GLASS: panou de sticlă, bule, droid-bulă care se leagănă ca o picătură ---- */
[data-tema="glass"] .g-erou { grid-template-rows: auto 1fr; }
[data-tema="glass"] .g-erou > .radbot { grid-column: 1 / -1; align-self: start; justify-self: start; max-width: 880px; }
[data-tema="glass"] .radbot { padding: 16px 18px 14px; border-radius: 30px; }
[data-tema="glass"] .radbot-droid { border-radius: 50%; background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, .22), transparent 70%); }
[data-tema="glass"] .radbot-id b { font-family: var(--g-font-titlu); letter-spacing: .12em; }
[data-tema="glass"] .radbot-buton { border-radius: 50%; border-color: rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .12); color: var(--text); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4); }
[data-tema="glass"] .radbot-buton:hover { background: rgba(255, 255, 255, .24); }
[data-tema="glass"] .radbot-de-la-bot { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .28); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); border-bottom-left-radius: 8px; }
[data-tema="glass"] .radbot-de-la-tine { background: linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(214, 238, 255, .9)); color: #0c1224; box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .5), inset 0 1px 0 #fff; border-bottom-right-radius: 8px; }
[data-tema="glass"][data-varianta="clar"] .radbot-de-la-tine { background: linear-gradient(135deg, var(--accent), var(--accent-inchis)); color: #fff; }
[data-tema="glass"] .radbot-msg { border-radius: 22px; }
[data-tema="glass"] .radbot-msg.eroare { background: rgba(255, 120, 140, .18); border-color: rgba(255, 170, 185, .5); }
[data-tema="glass"] .radbot-sugestie { color: var(--text); border-color: rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); font-family: var(--g-font); }
[data-tema="glass"] .radbot-sugestie:hover { background: rgba(255, 255, 255, .22); }
[data-tema="glass"] .radbot-text { border-radius: 999px; border-color: rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .1); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .18); font-family: var(--g-font); }
[data-tema="glass"][data-varianta="clar"] .radbot-text { background: rgba(255, 255, 255, .55); }
[data-tema="glass"] .radbot-text:focus { border-color: rgba(255, 255, 255, .7); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .18), 0 0 0 4px rgba(255, 255, 255, .14); }
[data-tema="glass"] .radbot-trimite { border-radius: 50%; color: #0c1224; background: radial-gradient(120% 140% at 30% 0%, #fff, rgba(220, 240, 255, .85) 55%, rgba(170, 210, 255, .8)); box-shadow: inset 0 1px 0 #fff, 0 10px 24px -10px rgba(0, 0, 0, .5); }
[data-tema="glass"] .radbot-scrie { color: var(--text); }
/* droidul Glass: bula se leagănă și se turtește ca o picătură, aripioarele bat, bulele urcă */
[data-tema="glass"] .rb-tot { transform-origin: 32px 34px; animation: rbBula 3.6s ease-in-out infinite; }
@keyframes rbBula {
  0%, 100% { transform: translateY(0) rotate(-3deg) scale(1, 1); }
  25% { transform: translateY(-3px) rotate(2deg) scale(1.04, .96); }
  50% { transform: translateY(-1px) rotate(3deg) scale(.97, 1.04); }
  75% { transform: translateY(-3px) rotate(-1deg) scale(1.03, .97); }
}
.rb-aripa { transform-box: fill-box; animation: rbAripa 1.4s ease-in-out infinite alternate; }
.rb-aripa-st { transform-origin: 100% 50%; }
.rb-aripa-dr { transform-origin: 0 50%; animation-delay: -.7s; }
@keyframes rbAripa { to { transform: rotate(-16deg) scaleY(1.12); } }
.rb-bule circle { fill: rgba(255, 255, 255, .8); transform-box: fill-box; animation: rbUrca 3.2s ease-in infinite; }
.rb-bule circle:nth-child(2) { animation-delay: -1.1s; }
.rb-bule circle:nth-child(3) { animation-delay: -2.2s; }
@keyframes rbUrca { 0% { transform: translateY(0) scale(.5); opacity: 0; } 20% { opacity: .9; } 100% { transform: translateY(-48px) scale(1.1); opacity: 0; } }
.rb-zambet { transform-box: fill-box; transform-origin: 50% 0; }
.radbot.vorbeste .rb-zambet { animation: rbZambet .2s ease-in-out infinite alternate; }
@keyframes rbZambet { to { transform: scaleY(2.4); } }

/* ---- telefon, grafica „Standard”, mișcare redusă ---- */
@media (max-width: 760px) {
  .radbot-droid { width: 46px; height: 46px; }
  .radbot-droid svg { width: 40px; height: 40px; }
  .radbot-sugestii { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .radbot-sugestie { flex: none; }
  .radbot-msg { max-width: 92%; }
  [data-tema="glass"] .radbot { padding: 14px 14px 12px; border-radius: 26px; }
}
.calitate-standard .radbot { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
html.calitate-standard:not([data-tema="glass"]) .radbot::before { display: none; }
@media (prefers-reduced-motion: reduce) {
  .radbot *, .radbot::before { animation: none !important; transition: none !important; }
}
.radbot-msg.fara-animatie { animation: none; }
.radbot [hidden] { display: none !important; }
