/* Floating launcher */
.vanda-live-launcher{
  position:fixed;right:24px;bottom:calc(var(--footer,0px) + 18px);z-index:80;
  display:flex;align-items:center;gap:12px;border:0;background:none;color:#fff;
  cursor:pointer;font:inherit;padding:0;max-width:calc(100vw - 32px);
}
.vanda-live-bubble{
  display:grid;gap:4px;text-align:left;background:#153f59;padding:14px 18px;
  border-radius:18px 18px 4px 18px;box-shadow:0 8px 28px #07253424;font-size:14px;
}
.vanda-live-bubble small{font-size:12px;color:#d5e9ef}
.vanda-live-bubble strong{font-weight:700}
.vanda-live-avatar{
  position:relative;display:block;width:64px;height:64px;border:3px solid #fff;
  border-radius:50%;box-shadow:0 5px 22px #0003;flex-shrink:0;background:#e9e6dc;
}
.vanda-live-avatar img,
.vanda-live-avatar video{
  display:block;width:100%;height:100%;object-fit:cover;object-position:34% 30%;border-radius:50%;
}
.vanda-live-avatar>span{
  position:absolute;right:-6px;bottom:-6px;z-index:1;background:#cb4a22;border:2px solid #fff;
  border-radius:50%;width:24px;height:24px;display:block;box-shadow:0 2px 8px #0003;
  pointer-events:none;padding:0;margin:0;font-size:0;line-height:0;overflow:visible;
}
.vanda-live-avatar>span::before{
  content:"✦";position:absolute;left:50%;top:50%;
  font-size:20px;line-height:1;color:#fff;
  transform:translate(-50%,-54%);
}

/* Dialog shell (shared) */
.vanda-live-dialog{
  padding:0;border:0;border-radius:22px;width:min(960px,calc(100vw - 32px));max-width:960px;
  max-height:calc(100dvh - 24px);color:#17313e;background:#fff;box-shadow:0 24px 90px #0005;overflow:auto;
}
/* No z-index on backdrop — blocks clicks on × in some browsers */
.vanda-live-dialog::backdrop{background:#061823a8;backdrop-filter:blur(6px)}
.vanda-live-header{
  padding:23px 28px;display:flex;align-items:center;justify-content:space-between;
  border-bottom:1px solid #dce5e8;gap:16px;
}
.vanda-live-header p{margin:0 0 5px;font-size:11px;letter-spacing:.16em;font-weight:700;color:#687c85}
.vanda-live-header h2{font-size:26px;line-height:1.15;margin:0;letter-spacing:-.03em}
.vanda-live-header button,
.vanda-live-header [data-anam-close]{
  border:1px solid #dce5e8;border-radius:50%;background:#fff;color:#17313e;
  cursor:pointer;font-size:28px;width:44px;height:44px;flex-shrink:0;
  display:inline-flex;align-items:center;justify-content:center;
  padding:0;line-height:1;margin:0;
}
.vanda-live-header button span,
.vanda-live-header [data-anam-close] span{
  display:block;line-height:1;transform:translateY(-1px);
}
.vanda-live-footer{
  position:relative;z-index:1;padding:18px 28px;border-top:1px solid #dce5e8;display:flex;flex-wrap:wrap;
  gap:12px 22px;align-items:center;background:#f7f9f8;
}
.vanda-live-footer p{flex:1 1 100%;font-size:12px;line-height:1.5;margin:0;color:#61747d}
.vanda-live-footer a{
  font-size:13px;font-weight:600;color:#173f52;text-decoration:underline;
  text-underline-offset:3px;cursor:pointer;pointer-events:auto;
}
.vanda-live-footer a:hover{color:#0d2833}
.vanda-live-dialog [hidden]{display:none!important}
.vanda-live-dialog button:focus-visible,
.vanda-live-launcher:focus-visible,
.vanda-live-dialog a:focus-visible{outline:3px solid #e4a04f;outline-offset:4px}

/* Hero CTA */
.vanda-hero-invite{
  display:flex;align-items:center;flex-wrap:wrap;gap:10px 16px;
  margin:18px 0 0;position:relative;z-index:1;max-width:560px;
}
.vanda-hero-invite>span{font-size:13px;line-height:1.45;color:#fff;flex:1 1 180px}
.vanda-hero-button{
  display:inline-flex;align-items:center;gap:9px;min-height:44px;padding:10px 16px;
  border:1px solid #ffffff80;border-radius:30px;background:#102f41;color:#fff;
  font:650 14px/1.2 Arial,Helvetica,sans-serif;cursor:pointer;flex:0 0 auto;
}
.vanda-hero-button>span{
  font-size:18px;line-height:1;display:inline-flex;align-items:center;justify-content:center;
}
.vanda-hero-button:hover{background:#1d4c61}
.vanda-hero-button:focus-visible,[data-vanda-live-open]:focus-visible{outline:3px solid #e4a04f;outline-offset:4px}

/*
  Anam dialog — only style when [open] so UA can hide closed dialogs.
  height:fit-content so flex does not stretch to max-height (empty white under footer).
*/
.vanda-anam-dialog[open]{
  display:flex;flex-direction:column;
  width:min(720px,calc(100vw - 24px),max(280px,calc((100dvh - 240px) * 1.5)));
  max-width:min(720px,calc(100vw - 24px));
  margin:auto;
  height:fit-content;min-height:0;max-height:calc(100dvh - 20px);
  overflow:auto;-webkit-overflow-scrolling:touch;
}
.vanda-anam-dialog[open] > *{flex:0 0 auto;min-height:0}
.vanda-anam-dialog::backdrop{background:#06182366;backdrop-filter:none}
.vanda-anam-dialog[open] .vanda-live-header{padding:16px 22px;flex-shrink:0}
.vanda-anam-dialog[open] .vanda-live-header h2{font-size:24px}
.vanda-anam-dialog[open] .vanda-live-footer{flex-shrink:0}
.vanda-anam-status{padding:10px 22px;margin:0;font-size:13px;line-height:1.5;color:#526771;flex-shrink:0}
.vanda-anam-stage,
.vanda-anam-inline{
  position:relative;z-index:0;
  display:block;width:100%;height:auto;min-height:0;
  background:#0f1c24;overflow:hidden;
}
.vanda-anam-stage{flex:0 0 auto}
.vanda-anam-inline{
  width:min(100%,calc((100dvh - 220px) * 1.5));
  margin-inline:auto;
  border:1px solid #e5e7eb;border-radius:12px;
}
.vanda-anam-stage anam-agent,
.vanda-anam-inline anam-agent{
  display:block;width:100%;height:auto;aspect-ratio:3/2;margin:0;
}

@media(max-width:640px){
  .vanda-live-launcher{right:14px;bottom:calc(var(--footer,0px) + 10px);gap:8px}
  .vanda-live-bubble{padding:10px 12px;font-size:12px}
  .vanda-live-avatar{width:50px;height:50px}
  .vanda-live-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);border-radius:16px}
  .vanda-live-header{padding:16px 20px}
  .vanda-live-header h2{font-size:23px}
  .vanda-live-footer{padding:16px 22px}
  .vanda-hero-invite{gap:8px;margin-top:14px}
  .vanda-hero-invite>span{flex-basis:100%;font-size:12px}
  .vanda-anam-dialog[open]{
    width:calc(100vw - 32px);
    max-width:calc(100vw - 32px);
    height:fit-content;min-height:0;
    max-height:calc(100dvh - 32px);
    margin:auto;
  }
  .vanda-anam-dialog[open] .vanda-live-header{padding:12px 16px}
  .vanda-anam-dialog[open] .vanda-live-header h2{font-size:20px}
  .vanda-anam-status{padding:8px 16px;font-size:12px}
  .vanda-anam-dialog[open] .vanda-live-footer{padding:12px 16px}
  .vanda-anam-dialog[open] .vanda-anam-stage anam-agent,
  .vanda-anam-dialog[open] anam-agent{
    max-height:min(38dvh,260px);
    width:min(100%,calc(min(38dvh,260px) * 1.5));
    height:auto;aspect-ratio:3/2;margin:0 auto;
  }
  .vanda-anam-inline{width:min(100%,calc((100dvh - 200px) * 1.5))}
}
