.to-web-launcher,
.to-web-panel,
.to-web-panel * {
  box-sizing: border-box;
}

#to-web-chat-root.to-web-root-open .to-web-launcher {
  display: none;
}

.to-web-launcher {
  align-items: center;
  background: linear-gradient(135deg, #2563eb 0%, #0284c7 100%);
  border: 1px solid rgba(147, 197, 253, .72);
  border-radius: 999px;
  bottom: 22px;
  box-shadow: 0 14px 32px rgba(37, 99, 235, .28);
  color: #eff6ff;
  cursor: pointer;
  display: inline-flex;
  font: 950 16px/1.1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  gap: 12px;
  min-height: 66px;
  padding: 13px 14px 13px 22px;
  position: fixed;
  right: 22px;
  z-index: 2147483000;
}

.to-web-launcher-tobi {
  bottom: 58px;
  filter: drop-shadow(0 12px 18px rgba(15, 23, 42, .22));
  height: 120px;
  object-fit: contain;
  pointer-events: none;
  position: absolute;
  right: 12px;
  width: auto;
}

.to-web-launcher-tobi-video {
  display: block;
}

.to-web-launcher-tobi-fallback {
  display: block;
}

.to-web-launcher-tobi-video + .to-web-launcher-tobi-fallback {
  display: none;
}

.to-web-launcher:before {
  animation: toWebRedPulse 10s ease-in-out 2s infinite;
  border: 2px solid rgba(215, 25, 32, .78);
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(215, 25, 32, .24);
  content: "";
  inset: -7px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
}

.to-web-launcher-icon {
  align-items: center;
  background: #fff;
  border-radius: 50%;
  color: #1d4ed8;
  display: inline-flex;
  font-size: 11px;
  font-weight: 950;
  height: 42px;
  justify-content: center;
  width: 42px;
}

@keyframes toWebRedPulse {
  0%, 68%, 100% {
    opacity: 0;
    transform: scale(.92) rotate(0deg);
  }
  72% {
    opacity: .95;
    transform: scale(1) rotate(0deg);
    box-shadow: 0 0 0 0 rgba(215, 25, 32, .24);
  }
  82% {
    opacity: .55;
    transform: scale(1.1) rotate(250deg);
    box-shadow: 0 0 0 8px rgba(215, 25, 32, .10);
  }
  92% {
    opacity: 0;
    transform: scale(1.2) rotate(520deg);
    box-shadow: 0 0 0 16px rgba(215, 25, 32, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .to-web-launcher-tobi-video {
    display: none;
  }

  .to-web-launcher-tobi-fallback {
    display: block;
  }
}

.to-web-panel {
  background: #f8fbff;
  border: 1px solid rgba(147, 197, 253, .72);
  border-radius: 18px;
  bottom: 78px;
  box-shadow: 0 22px 70px rgba(30, 64, 175, .24);
  color: #0f172a;
  display: none;
  flex-direction: column;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  max-height: min(680px, calc(100vh - 100px));
  overflow: visible;
  position: fixed;
  right: 22px;
  width: min(390px, calc(100vw - 28px));
  z-index: 2147483001;
}

.to-web-panel.is-open {
  display: flex;
}

.to-web-head {
  align-items: center;
  background:
    radial-gradient(circle at 18% 0%, rgba(219, 234, 254, .42), transparent 34%),
    linear-gradient(135deg, #1d4ed8 0%, #047cc5 100%);
  border-radius: 18px 18px 0 0;
  color: #eff6ff;
  display: flex;
  gap: 12px;
  padding: 14px;
  position: relative;
}

.to-web-panel.is-tobi .to-web-head {
  min-height: 70px;
  padding-left: 118px;
}

.to-web-avatar,
.to-web-mini-avatar {
  align-items: center;
  background: linear-gradient(135deg, #1d4ed8, #14b8a6);
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  flex: 0 0 auto;
  font-weight: 950;
  justify-content: center;
  overflow: hidden;
}

.to-web-avatar {
  height: 46px;
  width: 46px;
}

.to-web-mini-avatar {
  height: 24px;
  margin-left: -6px;
  width: 24px;
}

.to-web-mini-avatar:first-child {
  margin-left: 0;
}

.to-web-avatar img,
.to-web-mini-avatar img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.to-web-avatar.to-web-tobi-avatar {
  background: transparent;
  border: 0;
  border-radius: 0;
  height: 120px;
  left: 18px;
  margin: 0;
  overflow: visible;
  position: absolute;
  top: -54px;
  width: 88px;
  z-index: 5;
}

.to-web-avatar.to-web-tobi-avatar img {
  filter: drop-shadow(0 10px 14px rgba(15, 23, 42, .28));
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  width: 100%;
}

.to-web-mini-avatar.to-web-tobi-avatar {
  background: #e0f2fe;
  border-color: #7dd3fc;
}

.to-web-mini-avatar.to-web-tobi-avatar img {
  object-fit: contain;
  padding: 1px;
}

.to-web-head-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.to-web-head-copy strong {
  font-size: 15px;
}

.to-web-head-copy span {
  color: #dbeafe;
  font-size: 12px;
  font-weight: 800;
}

.to-web-new,
.to-web-close {
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .35);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

.to-web-new {
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  padding: 8px 10px;
  white-space: nowrap;
}

.to-web-close {
  border-radius: 50%;
  font-size: 20px;
  height: 32px;
  line-height: 1;
  width: 32px;
}

.to-web-roster {
  align-items: center;
  background: #eff6ff;
  border-bottom: 1px solid #bfdbfe;
  color: #1e40af;
  display: flex;
  font-size: 11px;
  font-weight: 900;
  gap: 8px;
  padding: 8px 14px;
}

.to-web-identity {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
  padding: 10px 14px 0;
}

.to-web-identity input,
.to-web-text {
  background: #fff;
  border: 1px solid #bfdbfe;
  border-radius: 11px;
  color: #0f172a;
  font: 800 12px/1.3 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  outline: none;
  padding: 10px;
  width: 100%;
}

.to-web-identity input:focus,
.to-web-text:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.to-web-field-attention {
  background: #fff !important;
  border-color: #60a5fa !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
}

#to-web-chat-root .to-web-panel .to-web-identity input.to-web-email,
#to-web-chat-root .to-web-panel .to-web-identity input.to-web-email:invalid,
#to-web-chat-root .to-web-panel .to-web-identity input.to-web-email:user-invalid,
#to-web-chat-root .to-web-panel .to-web-identity input.to-web-email:-moz-ui-invalid {
  background: #fff !important;
  border-color: #bfdbfe !important;
  box-shadow: none !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a;
  caret-color: #0f172a;
}

#to-web-chat-root .to-web-panel .to-web-identity input.to-web-email.to-web-field-attention {
  background: #fff !important;
  border-color: #60a5fa !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .10) !important;
}

.to-web-messages {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 9px;
  min-height: 220px;
  overflow-y: auto;
  padding: 14px;
}

.to-web-msg {
  display: flex;
}

.to-web-msg div {
  border-radius: 14px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  max-width: 86%;
  overflow-wrap: anywhere;
  padding: 10px 12px;
}

.to-web-msg-agent {
  justify-content: flex-start;
}

.to-web-msg-agent div {
  background: #dbeafe;
  color: #1e3a8a;
}

.to-web-msg-office > div {
  background: #eef6ff;
  border: 1px solid #bfdbfe;
  max-width: 92%;
}

.to-web-msg-office p {
  margin: 0 0 9px;
}

.to-web-office-card {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 38px 1fr;
}

.to-web-office-photo {
  align-items: center;
  background: linear-gradient(135deg, #1d4ed8, #14b8a6);
  border: 1px solid rgba(37, 99, 235, .26);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 950;
  height: 38px;
  justify-content: center;
  overflow: hidden;
  width: 38px;
}

.to-web-office-photo img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.to-web-office-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.to-web-office-copy strong {
  color: #0f172a;
  font-size: 12px;
}

.to-web-office-copy small {
  color: #475569;
  font-size: 10px;
  font-weight: 850;
}

.to-web-office-call {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  border-radius: 10px;
  color: #fff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 950;
  grid-column: 1 / -1;
  justify-content: center;
  padding: 9px 10px;
  text-decoration: none;
}

.to-web-office-rate {
  color: #64748b;
  display: block;
  font-size: 9.5px;
  font-weight: 800;
  grid-column: 1 / -1;
  line-height: 1.25;
  margin-top: -3px;
  text-align: center;
}

.to-web-msg-visitor {
  justify-content: flex-end;
}

.to-web-msg-visitor div {
  background: #2563eb;
  color: #eff6ff;
}

.to-web-waiting {
  align-self: center;
  background: #eff6ff;
  border: 1px dashed #93c5fd;
  border-radius: 999px;
  color: #1e40af;
  font-size: 11px;
  font-weight: 900;
  padding: 7px 11px;
}

.to-web-waiting strong {
  color: #0f172a;
}

.to-web-send-pending {
  border-top: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 10.5px;
  font-weight: 850;
  line-height: 1.35;
  padding: 7px 14px 0;
}

.to-web-evidence-note {
  color: #475569;
  font-size: 10.5px;
  font-weight: 850;
  line-height: 1.35;
  padding: 0 14px 8px;
}

.to-web-end-open {
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 950;
  padding: 7px 10px;
  white-space: nowrap;
}

.to-web-end-panel {
  border-top: 1px solid #dbeafe;
  display: grid;
  gap: 9px;
  padding: 13px 14px;
}

.to-web-end-panel strong {
  color: #173b7a;
  font-size: 14px;
  font-weight: 950;
}

.to-web-end-panel p {
  color: #475569;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.45;
  margin: 0;
}

.to-web-stars {
  display: flex;
  gap: 4px;
}

.to-web-star {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: #93a4b8;
  cursor: pointer;
  font-size: 19px;
  font-weight: 950;
  height: 34px;
  line-height: 1;
  width: 34px;
}

.to-web-star.is-on {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #d97706;
}

.to-web-end-feedback {
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  color: #0f2f5c;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  min-height: 58px;
  padding: 9px 10px;
  resize: vertical;
}

.to-web-end-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.to-web-end-actions button,
.to-web-end-new {
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
  padding: 10px 12px;
}

.to-web-end-cancel {
  background: #e2e8f0;
  color: #334155;
}

.to-web-end-submit,
.to-web-end-new {
  background: linear-gradient(135deg, #2563eb, #0284c7);
  color: #fff;
}

.to-web-end-submit:disabled {
  cursor: wait;
  opacity: .65;
}

.to-web-end-notice {
  color: #1d4ed8 !important;
}

.to-web-typing {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  padding: 4px 2px;
}

.to-web-form {
  align-items: flex-end;
  border-top: 1px solid #e2e8f0;
  display: grid;
  gap: 8px;
  grid-template-columns: auto 1fr auto;
  padding: 12px 14px 14px;
}

.to-web-form button {
  background: linear-gradient(135deg, #2563eb, #0284c7);
  border: none;
  border-radius: 11px;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
  padding: 11px 14px;
}

.to-web-form .to-web-clip {
  align-items: center;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  display: inline-flex;
  font-size: 17px;
  height: 42px;
  justify-content: center;
  padding: 0;
  width: 42px;
}

.to-web-form button:disabled {
  cursor: wait;
  opacity: .65;
}

.to-web-privacy {
  border-top: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 10.5px;
  font-weight: 750;
  line-height: 1.35;
  padding: 0 14px 12px;
}

.to-web-privacy a {
  color: #1d4ed8;
  font-weight: 950;
  text-decoration: none;
}

@media (max-width: 520px) {
  .to-web-launcher {
    border-radius: 999px;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    gap: 0;
    min-height: 56px;
    min-width: 56px;
    padding: 8px;
    right: 12px;
  }

  .to-web-launcher-tobi {
    bottom: 46px;
    height: 72px;
    right: -2px;
  }

  .to-web-launcher > span:not(.to-web-launcher-icon) {
    display: none;
  }

  .to-web-launcher-icon {
    height: 40px;
    font-size: 10px;
    width: 40px;
  }

  .to-web-launcher:before {
    inset: -8px;
  }

  .to-web-panel {
    border-radius: 16px;
    bottom: calc(74px + env(safe-area-inset-bottom, 0px));
    left: 10px;
    max-height: min(620px, calc(100dvh - 150px));
    right: 10px;
    width: auto;
  }

  .to-web-head {
    border-radius: 16px 16px 0 0;
    gap: 10px;
    min-height: 72px;
    padding: 12px 12px;
  }

  .to-web-panel.is-tobi .to-web-head {
    min-height: 76px;
    padding-left: 108px;
  }

  .to-web-avatar {
    height: 40px;
    width: 40px;
  }

  .to-web-avatar.to-web-tobi-avatar {
    height: 118px;
    left: 14px;
    margin: 0;
    top: -50px;
    width: 84px;
  }

  .to-web-head-copy strong {
    font-size: 14px;
  }

  .to-web-head-copy span {
    font-size: 11px;
  }

  .to-web-close {
    height: 34px;
    width: 34px;
  }

  .to-web-new {
    font-size: 10px;
    padding: 7px 8px;
  }

  .to-web-roster {
    align-items: center;
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(6, 24px) 1fr;
    padding: 8px 12px;
  }

  .to-web-roster .to-web-mini-avatar:nth-of-type(n+7) {
    display: none;
  }

  .to-web-roster-status {
    font-size: 10px;
    line-height: 1.25;
    min-width: 0;
    text-align: right;
  }

  .to-web-identity {
    gap: 7px;
    grid-template-columns: 1fr;
    padding: 9px 12px 0;
  }

  .to-web-identity input,
  .to-web-text {
    border-radius: 12px;
    font-size: 13px;
    min-height: 44px;
    padding: 10px 12px;
  }

  .to-web-messages {
    flex: 1 1 auto;
    gap: 8px;
    min-height: 116px;
    padding: 12px;
  }

  .to-web-msg div {
    border-radius: 13px;
    font-size: 12px;
    line-height: 1.4;
    max-width: 88%;
    padding: 9px 11px;
  }

  .to-web-msg-office > div {
    max-width: 94%;
  }

  .to-web-form {
    gap: 8px;
    padding: 10px 12px 11px;
  }

  .to-web-form button {
    border-radius: 12px;
    min-height: 44px;
    padding: 10px 13px;
  }

  .to-web-privacy {
    font-size: 9.5px;
    line-height: 1.3;
    max-height: 54px;
    overflow: auto;
    padding: 0 12px calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .to-web-send-pending {
    font-size: 9.5px;
    padding: 6px 12px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .to-web-launcher:before {
    animation: none !important;
  }
}

@media (max-width: 380px) {
  .to-web-launcher-tobi {
    bottom: 44px;
    height: 64px;
    right: -3px;
  }

  .to-web-panel {
    bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    left: 8px;
    max-height: calc(100dvh - 138px);
    right: 8px;
  }

  .to-web-roster {
    grid-template-columns: repeat(5, 23px) 1fr;
  }

  .to-web-roster .to-web-mini-avatar:nth-of-type(n+6) {
    display: none;
  }

  .to-web-mini-avatar {
    height: 23px;
    width: 23px;
  }
}
