:root{
  --unvi-border: rgba(255,255,255,0.92);
  --unvi-text: rgba(15, 23, 42, 0.92);
  --unvi-muted: rgba(15, 23, 42, 0.70);
  --unvi-glass: rgba(255,255,255,0.50);
  --unvi-shadow: 0 18px 48px rgba(0,0,0,0.26);
}

#unviChatWidget, #unviChatWidget * { box-sizing: border-box; }

#unviChatWidget{
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2147483000;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* DUHOVÁ BUBLINA */
.unvi-chat-bubble{
  position: relative;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.9);

  background: linear-gradient(
    135deg,
    rgba(255,120,160,0.9),
    rgba(255,200,80,0.9),
    rgba(120,200,255,0.9),
    rgba(180,150,255,0.9)
  );

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  box-shadow:
    0 8px 30px rgba(0,0,0,0.25),
    0 0 22px rgba(255,255,255,0.4);

  cursor: pointer;
  display: grid;
  place-items: center;

  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.unvi-chat-bubble:hover{
  transform: scale(1.08);
  box-shadow:
    0 10px 40px rgba(0,0,0,0.35),
    0 0 32px rgba(255,255,255,0.6);
}

.unvi-chat-bubble-label{
  font-weight: 900;
  font-size: 13px;
  color: white;
}

/* PANEL – čistý, bez linky */
.unvi-chat-panel{
  position: fixed;
  right: 620px;
  bottom: 120px;
  z-index: 2;

  width: 360px;
  height: 600px;
  border-radius: 6px;
  overflow: hidden;

  border: none;
  box-shadow: none;

  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  display: none;
}

.unvi-chat-panel.is-open{
  display: flex;
  flex-direction: column;
}
/* CHAT BODY */
.unvi-chat-body{
  flex: 1;
  padding: 14px;
  padding-bottom: 36px; /* ✅ navíc */
  overflow-y: auto;
}

/* BUBLINY */
.unvi-msg{
  margin: 10px 0;
  display: flex;
}

.unvi-msg.user{ justify-content: flex-end; }
.unvi-msg.bot{ justify-content: flex-start; }

.unvi-bubble{
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.6;

  text-align: left;            /* 👈 zarovnání */
  white-space: normal;         /* 👈 normální zalamování */
  word-break: break-word;      /* 👈 ochrana proti přetečení */
}

.unvi-msg.user .unvi-bubble{
  background:
    linear-gradient(
      135deg,
      rgba(240, 245, 150, 0.95),
      rgba(190, 225, 120, 0.95)
    );

  color: #1e293b;

  border: 1px solid rgba(255,255,255,0.6);

  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);

  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}


.unvi-msg.bot .unvi-bubble{
  background:
    linear-gradient(
      135deg,
      rgba(255,120,160,0.20),
      rgba(255,200,80,0.20),
      rgba(120,200,255,0.20),
      rgba(180,150,255,0.20)
    ),
    rgba(255,255,255,0.88);

  color: #1e293b;

  border: 1px solid rgba(255,255,255,0.6);

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}


/* INPUT SEKCE */
.unvi-chat-input{
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid rgba(0,0,0,0.08);
  padding: 10px;
  background: rgba(255,255,255,0.85);
}


.unvi-chat-input input{
  flex: 1;
  border: none;
  outline: none;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  background: rgba(255,255,255,0.9);
  color: #1e293b;
}

.unvi-chat-input button{
  position: relative;
  border-radius: 14px;
  padding: 8px 20px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;

  display: flex;
  align-items: center;
  justify-content: center;

  color: rgba(30,41,59,0.85);

  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  border: none;
  overflow: hidden;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.5),
    0 4px 12px rgba(0,0,0,0.08);

  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.unvi-chat-input button::before{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;

  background: linear-gradient(
    135deg,
    rgba(255,120,160,0.9),
    rgba(255,200,80,0.9),
    rgba(120,200,255,0.9),
    rgba(180,150,255,0.9)
  );

  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;

  pointer-events: none;
}

.unvi-chat-input button span{
  display: block;
  text-align: center;
}

.unvi-chat-input button:hover{
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
  background: rgba(255,255,255,0.70);
}

.unvi-chat-input input{
  flex: 1 1 auto;
  min-width: 0;
}

#unviContactBlock{
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(10px);
  border-radius: 10px;
  margin: 10px;
}

#unviContactBlock button{
  background: linear-gradient(
    135deg,
    rgba(255,120,160,0.9),
    rgba(255,200,80,0.9),
    rgba(120,200,255,0.9),
    rgba(180,150,255,0.9)
  );
  color: white;
  font-weight: 600;
}

/* =========================
   LIVE PROJEKTOVÝ PANEL
========================= */

.unvi-live-brief{
  margin: 10px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.03);

  font-size: 13px;
  line-height: 1.45;

  max-height: 520px;       /* otevřený stav */
  overflow: hidden;

  /* ✨ plynulejší křivka – víc "app feel" */
  transition: max-height 0.55s cubic-bezier(.4,0,.2,1);

  position: relative;
}

.unvi-live-brief.collapsed{
  /* ✅ FIX: žádné translate (to ti překrývalo input) */
  max-height: 110px;        /* zabalený stav = jen lišta */
  
}

/* ✅ doporučeno: v collapsed stavu schovej obsah panelu (kromě toggle) */

.unvi-live-brief .brief-summary,
.unvi-live-brief .brief-content,
.unvi-live-brief .brief-contact{
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.unvi-live-brief.collapsed .brief-summary,
.unvi-live-brief.collapsed .brief-content,
.unvi-live-brief.collapsed .brief-contact{
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
}

/* nadpis */
.brief-title{
  font-weight: 700;
  margin-bottom: 8px;
}

/* krátké shrnutí */
.brief-summary{
  margin-bottom: 10px;
  font-size: 12px;
  opacity: 0.85;
}

/* obsah */
.brief-content ul{
  padding-left: 16px;
  margin: 4px 0 0 0;
}

/* kontakt */
.brief-contact{
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.brief-contact input{
  padding: 8px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.15);
}

.brief-consent{
  font-size: 11px;
  opacity: 0.85;
}

#briefSendBtn{
  padding: 10px;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(
    135deg,
    rgba(255,120,160,0.9),
    rgba(255,200,80,0.9),
    rgba(120,200,255,0.9),
    rgba(180,150,255,0.9)
  );
  color: white;
}

/* toggle handle */
.brief-toggle{
  width: 100%;
  border: 0;
  background: transparent;
  padding: 8px 0 10px;
  cursor: pointer;
  display: grid;
  place-items: center;
  min-height: 36px;      /* ✅ větší plocha pro tap */
  touch-action: manipulation;
}

.brief-handle{
  width: 70px;
  height: 6px;
  border-radius: 999px;
  background: rgba(0,0,0,0.25);
}

.brief-toggle:hover .brief-handle{
  background: rgba(0,0,0,0.35);
}

.brief-toggle:active .brief-handle{
  transform: scaleX(0.92);
}

.unvi-live-brief.collapsed{
  max-height: 64px; /* trochu víc místa na nadpis */
}
.brief-title{
  margin: 0; /* v collapsed hezčí zarovnání */
}
/* 1) Collapsed musí mít víc místa (handle + title) */
.unvi-live-brief.collapsed{
  max-height: 120px;         /* bylo 56px */
  padding-top: 10px;         /* trochu utáhnout */
  padding-bottom: 10px;
}

/* 2) V collapsed zmenšíme toggle, aby nesežral výšku */
.unvi-live-brief.collapsed .brief-toggle{
  padding: 6px 0 6px;
  min-height: 22px;
}

/* 3) Nadpis bez velkých okrajů, ať sedí hezky nahoře */
.unvi-live-brief.collapsed .brief-title{
  margin: 4px 0 0 0;
}

@keyframes handlePulse {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

.unvi-live-brief.collapsed .brief-toggle .brief-handle{
  animation: handlePulse 1.6s ease-in-out infinite !important;
}

.unvi-live-brief.collapsed{
  max-height: 120px;      /* handle + title */
  padding-top: 10px;
  padding-bottom: 10px;
}

@keyframes handlePulse {
  0%   { opacity: 0.2; }
  50%  { opacity: 1; }
  100% { opacity: 0.2; }
}

#unviLiveBrief.collapsed .brief-handle{
  animation: handlePulse 1.2s ease-in-out infinite !important;
}

#unviChatWidget{ position: fixed; }

.unvi-chat-bubble{
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 5;
}


.unvi-chat-bubble{ position: relative; z-index: 3; }

/* ORB – čistá energie za chatem */
.unvi-chat-orb{
  position: fixed;
  right: 410px;
  bottom: 20px;
  width: 760px;
  height: 760px;
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;

  opacity: 0;
  transition: opacity .35s ease, transform .35s ease;
  transform: scale(0.98);

background:
  radial-gradient(
    circle at 50% 50%,
    rgba(255,255,255,0.48) 0%,
    rgba(255,255,255,0.38) 40%,
    rgba(255,255,255,0.28) 65%,
    rgba(120,200,255,0.18) 85%
  );

backdrop-filter: blur(14px);
-webkit-backdrop-filter: blur(14px);
  box-shadow: 0 0 70px rgba(120,200,255,0.12);

  box-shadow:
    inset 0 0 80px rgba(255,255,255,0.08);
}


#unviChatWidget.chat-open .unvi-chat-orb{
  opacity: 1;
  transform: scale(1);
}

/* mobile off */
@media (max-width: 768px){
  .unvi-chat-orb{ display:none !important; }
}

.unvi-chat-orb::before{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  padding: 3px;

  background: linear-gradient(
    135deg,
#ff7eb3,
#b28dff,
#ffb347,
#6fd3ff,
#b28dff,
#ff7eb3,
#b28dff,
#ffb347,
#6fd3ff,
#b28dff,
#ff7eb3,
#b28dff,
#ffb347,
#6fd3ff,
#b28dff,
#ff7eb3,
#b28dff,
#ffb347,
#6fd3ff,
#b28dff,
#ff7eb3,
#b28dff,
#ffb347,
#6fd3ff,
#b28dff,
#ff7eb3,
#b28dff,
#ffb347,
#6fd3ff,
#b28dff,
#ff7eb3,
#b28dff,
#ffb347,
#6fd3ff,
#b28dff
  );

  /* ✨ nový jemný vnitřní glow */
  box-shadow:
  0 0 12px rgba(255, 180, 120, 0.35);

  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;

  opacity: 0.5;
  pointer-events: none;
}

/* =========================================
   Desktop: skrýt vzhled panelu, ne obsah
========================================= */
@media (min-width: 769px){

  .unvi-chat-panel{
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    border: none !important;
  }

}

/* =========================================================
   HIDE SCROLLBAR (chat content)
   scroll funguje dál, jen není vidět posuvník
========================================================= */
.unvi-chat-body{
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* starší Edge/IE */
}

.unvi-chat-body::-webkit-scrollbar{
  width: 0 !important;          /* Chrome/Safari */
  height: 0 !important;
}

.unvi-chat-body::-webkit-scrollbar-thumb{
  background: transparent !important;
}

.unvi-chat-body::-webkit-scrollbar-track{
  background: transparent !important;
}

/* =========================================
   DESKTOP: zrušit spodní "lištu" pod inputem
   (nechá input + tlačítka, jen odstraní pruh)
========================================= */
@media (min-width: 769px){
  .unvi-chat-input{
    background: transparent !important;
    border-top: none !important;
    padding: 0 !important;          /* pryč lišta */
    margin: 0 10px 10px !important; /* ať to sedí s orbem */
  }

  /* input a tlačítka si nechají svůj vzhled */
  .unvi-chat-input input{
    background: rgba(255,255,255,0.88) !important;
  }
}

/* =========================================
   CONNECTOR – DIAGONAL FLOW TO ORB (BIGGER)
========================================= */

.unvi-chat-connector{
  position: fixed;

  /* posun celé skupiny (ladíš jako doteď) */
  right: 95px;
  bottom: 62px;

  /* obálka pro diagonálu */
  width: 260px;
  height: 170px;

  z-index: 6;
  pointer-events: none;

  opacity: 0;
  transform: translateX(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* zobrazí se jen při otevření chatu */
#unviChatWidget.chat-open .unvi-chat-connector{
  opacity: 1;
  transform: translateX(0);
}

.unvi-chat-connector span{
  position: absolute;
  display: block;
  border-radius: 50%;

  /* GLASS vzhled – bez barevného nádechu */
  background: radial-gradient(
      circle at 35% 35%,
      rgba(255,255,255,0.55) 0%,
      rgba(255,255,255,0.35) 45%,
      rgba(255,255,255,0.20) 70%,
      rgba(255,255,255,0.08) 100%
  );

  border: 1px solid rgba(255,255,255,0.4);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  box-shadow:
    inset 0 0 10px rgba(255,255,255,0.25),
    0 8px 25px rgba(0,0,0,0.12);

  animation: flowDiag 3.5s ease-in-out infinite;
}

.unvi-chat-connector span::before{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  padding: 2px;

  background: linear-gradient(
    135deg,
    #ff7eb3,
    #b28dff,
    #ffb347,
    #6fd3ff,
    #b28dff
  );

  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;

  opacity: 0.6;
  pointer-events: none;
}

/* ✅ DIAGONÁLA: největší u ORB (vlevo nahoře) */
.unvi-chat-connector span:nth-child(1){
  width: 55px;
  height: 55px;
  left: -15px;
  top: -15px;
  animation-delay: 0.8s;
}

/* střední */
.unvi-chat-connector span:nth-child(2){
  width: 32px;
  height: 32px;
  left: 110px;
  top: 60px;
  animation-delay: 0.4s;
}

/* nejmenší u bubble (vpravo dole) */
.unvi-chat-connector span:nth-child(3){
  width: 19px;
  height: 19px;
  left: 210px;
  top: 120px;
  animation-delay: 0s;
}

/* animace: jemné "vlnění" směrem k orb (doleva nahoru) */
@keyframes flowDiag{
  0%   { transform: translate(0px, 0px) scale(1); opacity: 0.4; }
  50%  { transform: translate(-8px, -4px) scale(1.1); opacity: 1; }
  100% { transform: translate(0px, 0px) scale(1); opacity: 0.4; }
}

