html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

:root{
  --vydra-primary:#0b5fa5;
  --vydra-primary-dark:#084a81;
  --vydra-accent:#f4c542;
  --vydra-bg:#ffffff;
  --vydra-text:#15314b;
  --vydra-muted:#5d7286;
  --vydra-border:rgba(21,49,75,.12);
  --vydra-shadow:0 18px 48px rgba(7,30,51,.22);
}
#vydra-chat-root{position:fixed;right:18px;bottom:18px;z-index:9998;font-family:Barlow,Arial,sans-serif}
.vydra-chat,.vydra-chat *{box-sizing:border-box}
.vydra-chat__toggle{position:relative;width:64px;height:64px;border:0;border-radius:999px;background:linear-gradient(135deg,var(--vydra-primary),var(--vydra-primary-dark));box-shadow:var(--vydra-shadow);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;overflow:visible;animation:vydraToggleBob 2.8s ease-in-out infinite}
.vydra-chat__toggle::before{content:"";position:absolute;inset:10px;border-radius:50%;background:radial-gradient(circle at 30% 30%,#ffffff 0%,#eef6ff 68%,#d9ebff 100%);box-shadow:0 6px 14px rgba(0,0,0,.18)}
.vydra-chat__toggle img{position:relative;z-index:1;width:36px;height:36px;display:block;filter:drop-shadow(0 1px 0 rgba(255,255,255,.55)) drop-shadow(0 2px 4px rgba(0,58,107,.14))}
.vydra-chat__panel{position:absolute;right:0;bottom:78px;width:min(380px,calc(100vw - 24px));height:min(640px,calc(100vh - 110px));background:var(--vydra-bg);border-radius:22px;overflow:hidden;box-shadow:var(--vydra-shadow);border:1px solid var(--vydra-border);display:none;flex-direction:column}
.vydra-chat--open .vydra-chat__panel{display:flex}
.vydra-chat__header{display:flex;gap:12px;align-items:center;padding:16px 18px;background:linear-gradient(135deg,var(--vydra-primary),var(--vydra-primary-dark));color:#fff}
.vydra-chat__avatar{width:46px;height:46px;border-radius:50%;background:#fff;padding:4px;flex:0 0 auto}
.vydra-chat__title{font-size:18px;font-weight:700;line-height:1.1;margin:0}
.vydra-chat__subtitle{font-size:13px;opacity:.92;margin:4px 0 0}
.vydra-chat__close{margin-left:auto;background:transparent;border:0;color:#fff;font-size:26px;line-height:1;cursor:pointer;padding:0 0 2px}
.vydra-chat__messages{flex:1;min-height:0;overflow:auto;padding:16px;background:#f6f9fc}
.vydra-chat__bubble{max-width:88%;padding:12px 14px;border-radius:16px;margin:0 0 12px;line-height:1.45;font-size:15px;white-space:pre-line}
.vydra-chat__bubble--bot{background:#fff;color:var(--vydra-text);border:1px solid var(--vydra-border);border-bottom-left-radius:6px}
.vydra-chat__bubble--user{background:var(--vydra-primary);color:#fff;margin-left:auto;border-bottom-right-radius:6px}
.vydra-chat__options{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0 16px}
.vydra-chat__chip{border:1px solid rgba(11,95,165,.16);background:#fff;color:var(--vydra-primary-dark);border-radius:999px;padding:9px 12px;font-size:14px;line-height:1.2;cursor:pointer;transition:.18s ease}
.vydra-chat__chip:hover{transform:translateY(-1px);border-color:rgba(11,95,165,.35)}
.vydra-chat__footer{border-top:1px solid var(--vydra-border);padding:12px;background:#fff}
.vydra-chat__row{display:flex;gap:8px;align-items:flex-end}
.vydra-chat__input{flex:1;min-height:46px;max-height:100px;resize:none;border:1px solid var(--vydra-border);border-radius:14px;padding:12px 14px;font:inherit;color:var(--vydra-text);outline:none}
.vydra-chat__send{border:0;background:var(--vydra-accent);color:#10253d;font-weight:700;border-radius:14px;padding:0 16px;height:46px;cursor:pointer}
.vydra-chat__helper{font-size:12px;color:var(--vydra-muted);margin-top:8px}
.vydra-chat__link{display:inline-block;margin-top:8px;color:var(--vydra-primary-dark);font-weight:700;text-decoration:none}
.vydra-chat__link:hover{text-decoration:underline}
@keyframes vydraToggleBob{
  0%{transform:translateY(0) rotate(0deg) scale(1)}
  20%{transform:translateY(-2px) rotate(-3deg) scale(1.02)}
  50%{transform:translateY(-4px) rotate(2deg) scale(1.05)}
  80%{transform:translateY(-2px) rotate(-1deg) scale(1.02)}
  100%{transform:translateY(0) rotate(0deg) scale(1)}
}
@media (hover:hover){
  .vydra-chat__toggle:hover{animation-play-state:paused;transform:translateY(-2px)}
}
@media (max-width:767px){
  #vydra-chat-root{
    right:12px;
    bottom:12px;
    left:auto;
    width:auto;
    max-width:calc(100vw - 24px);
  }
  .vydra-chat__toggle{
    width:58px;
    height:58px;
  }
  .vydra-chat__toggle::before{
    inset:9px;
  }
  .vydra-chat__toggle img{
    width:33px;
    height:33px;
  }
  .vydra-chat__panel{
    right:0;
    bottom:70px;
    width:min(86vw,336px);
    height:min(66dvh,540px);
    max-height:calc(100dvh - 110px);
    border-radius:18px;
  }
  .vydra-chat__header{
    gap:10px;
    padding:12px 14px;
  }
  .vydra-chat__avatar{
    width:40px;
    height:40px;
  }
  .vydra-chat__title{
    font-size:16px;
  }
  .vydra-chat__subtitle{
    font-size:12px;
    margin-top:2px;
    line-height:1.25;
  }
  .vydra-chat__close{
    font-size:24px;
  }
  .vydra-chat__messages{
    padding:12px;
  }
  .vydra-chat__options{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    margin:6px 0 12px;
  }
  .vydra-chat__chip{
    width:100%;
    min-height:40px;
    padding:8px 10px;
    font-size:13px;
  }
  .vydra-chat__footer{
    padding:10px;
  }
  .vydra-chat__row{
    gap:8px;
    align-items:center;
  }
  .vydra-chat__input{
    min-height:42px;
    max-height:84px;
    padding:10px 12px;
    font-size:16px;
  }
  .vydra-chat__send{
    height:42px;
    padding:0 14px;
    font-size:15px;
    flex:0 0 auto;
  }
  .vydra-chat__helper{
    font-size:11px;
    line-height:1.25;
    margin-top:6px;
  }
}
/* Proactive bubble above launcher */
.vydra-chat-proactive{
  position:absolute;
  right:0;
  bottom:78px;
  width:min(280px, calc(100vw - 32px));
  background:#ffffff;
  color:var(--vydra-text);
  border:1px solid rgba(21,49,75,.12);
  border-radius:16px;
  box-shadow:0 14px 36px rgba(7,30,51,.20);
  padding:14px 16px;
  font-size:14px;
  line-height:1.45;
  display:none;
  z-index:2;
}

.vydra-chat-proactive.is-visible{
  display:block;
  animation:vydraProactiveIn .22s ease-out;
}

.vydra-chat-proactive::after{
  content:"";
  position:absolute;
  right:18px;
  top:100%;
  width:14px;
  height:14px;
  background:#ffffff;
  border-right:1px solid rgba(21,49,75,.12);
  border-bottom:1px solid rgba(21,49,75,.12);
  transform:rotate(45deg);
  margin-top:-7px;
}

.vydra-chat-proactive strong{
  display:block;
  margin:0 24px 4px 0;
  color:var(--vydra-primary-dark);
  font-weight:700;
}

.vydra-chat-proactive-close{
  position:absolute;
  top:8px;
  right:8px;
  width:24px;
  height:24px;
  border:0;
  border-radius:999px;
  background:transparent;
  color:#6b7c8b;
  cursor:pointer;
  font-size:18px;
  line-height:1;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
}

.vydra-chat-proactive-close:hover{
  background:#f2f6fa;
  color:var(--vydra-primary-dark);
}

@keyframes vydraProactiveIn{
  from{transform:translateY(8px);opacity:0}
  to{transform:translateY(0);opacity:1}
}

@media (max-width:767px){
  .vydra-chat-proactive{
    right:0;
    bottom:70px;
    width:min(260px, calc(100vw - 28px));
    padding:12px 14px;
    font-size:13px;
  }

  .vydra-chat-proactive::after{
    right:16px;
  }
}

@media (max-width: 380px){
  #vydra-chat-root{
    right:10px;
    bottom:10px;
    max-width:calc(100vw - 20px);
  }

  .vydra-chat__panel{
    width:min(86vw,330px);
    height:min(64dvh,520px);
    max-height:calc(100dvh - 110px);
    border-radius:18px;
  }

  .vydra-chat__header{
    padding:10px 12px;
    gap:10px;
  }

  .vydra-chat__avatar{
    width:38px;
    height:38px;
  }

  .vydra-chat__title{
    font-size:16px;
    line-height:1.1;
  }

  .vydra-chat__subtitle{
    font-size:12px;
    line-height:1.2;
    margin-top:2px;
  }

  .vydra-chat__messages{
    padding:10px;
  }

  .vydra-chat__bubble{
    max-width:90%;
    font-size:14px;
    line-height:1.35;
    padding:10px 12px;
    margin-bottom:10px;
  }

  .vydra-chat__options{
    grid-template-columns:1fr 1fr;
    gap:8px;
    margin:6px 0 10px;
  }

  .vydra-chat__chip{
    min-height:38px;
    padding:8px 10px;
    font-size:13px;
  }

  .vydra-chat__footer{
    padding:8px 10px 10px;
  }

  .vydra-chat__input{
    min-height:40px;
    max-height:76px;
    padding:10px 12px;
    font-size:16px;
  }

  .vydra-chat__send{
    height:40px;
    padding:0 14px;
    font-size:15px;
  }

  .vydra-chat__helper{
    display:none;
  }

  .vydra-chat-proactive{
    width:min(240px, calc(100vw - 24px));
    padding:11px 12px;
    font-size:12px;
  }
}
/* Chip button pro Whatsapp a Messanger*/
.vydra-chat__options a.vydra-chat__chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
}

.vydra-chat__options a.vydra-chat__chip:hover,
.vydra-chat__options a.vydra-chat__chip:focus{
  text-decoration:none;
}
/* Handoff tlačítka: WhatsApp / Messenger */
.vydra-chat__options a.vydra-chat__chip--whatsapp,
.vydra-chat__options a.vydra-chat__chip--messenger{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  text-decoration:none;
  font-weight:700;
  border:0;
  color:#fff;
  box-shadow:0 8px 18px rgba(15,23,42,.16);
  transition:transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.vydra-chat__options a.vydra-chat__chip--whatsapp{
  background:linear-gradient(135deg,#25D366,#128C7E);
}

.vydra-chat__options a.vydra-chat__chip--whatsapp::before{
  content:"💬";
}

.vydra-chat__options a.vydra-chat__chip--messenger{
  background:linear-gradient(135deg,#00B2FF,#006AFF);
}

.vydra-chat__options a.vydra-chat__chip--messenger::before{
  content:"💬";
}

.vydra-chat__options a.vydra-chat__chip--whatsapp:hover,
.vydra-chat__options a.vydra-chat__chip--messenger:hover,
.vydra-chat__options a.vydra-chat__chip--whatsapp:focus,
.vydra-chat__options a.vydra-chat__chip--messenger:focus{
  text-decoration:none;
  transform:translateY(-1px);
  box-shadow:0 10px 22px rgba(15,23,42,.22);
  filter:saturate(1.08);
}