.champ-modern .champ-chat-launcher {
  position: fixed;
  z-index: 90;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  align-items: center;
  gap: 0.65rem;
  min-height: 52px;
  padding: 0.45rem 1rem 0.45rem 0.45rem;
  border: 1px solid #d4e0e0;
  border-radius: 0.875rem;
  background: #183e53;
  color: #fff;
  font: 600 1rem/1.25 var(--sans);
  text-decoration: none;
  box-shadow: 0 5px 12px #112e4026, 0 10px 30px #112e4038;
  cursor: pointer;
}

.champ-modern .champ-chat-launcher[hidden] { display: none; }
.champ-modern .champ-chat-launcher:not([hidden]) { display: inline-flex; }

.champ-modern .champ-chat-launcher:is(:hover, [aria-expanded="true"]) {
  background: var(--ink);
  color: #fff;
}

.champ-modern .champ-chat-launcher:focus-visible {
  outline: 2px solid #183e53;
  outline-offset: 3px;
  box-shadow: 0 0 0 3px #fff;
}

.champ-modern .champ-chat-icon {
  position: relative;
  display: grid;
  width: 2.125rem;
  height: 2.125rem;
  flex: none;
  place-items: center;
  border-radius: 0.55rem;
  background: var(--paper);
  color: #183e53;
}

.champ-modern .champ-chat-icon::before {
  width: 1.125rem;
  height: 0.8125rem;
  margin-bottom: 0.125rem;
  border: 1.5px solid currentColor;
  border-radius: 0.3125rem;
  content: "";
}

.champ-modern .champ-chat-icon::after {
  position: absolute;
  top: 1.3rem;
  left: 0.65rem;
  width: 0.35rem;
  height: 0.28rem;
  border-bottom: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
  background: inherit;
  content: "";
  transform: skewY(-31deg);
}

.champ-modern .champ-chat-panel {
  position: fixed;
  z-index: 110;
  inset: auto max(1rem, env(safe-area-inset-right)) max(5rem, calc(env(safe-area-inset-bottom) + 4rem)) auto;
  width: min(25rem, calc(100% - 2rem));
  height: min(34rem, calc(100vh - 6.25rem));
  height: min(34rem, calc(100dvh - 6.25rem));
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d4e0e0;
  border-radius: 1rem;
  background: #183e53;
  color: #fff;
  box-shadow: 0 12px 40px #112e4052;
}

.champ-modern .champ-chat-panel:not([open]) { display: none; }

.champ-modern .champ-chat-panel[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.champ-modern .champ-chat-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.375rem 0.5rem 0.375rem 1rem;
  border-bottom: 1px solid #ffffff40;
}

.champ-modern .champ-chat-header h2 {
  margin: 0 auto 0 0;
  color: inherit;
  font: 600 1rem/1.2 var(--sans);
}

.champ-modern .champ-chat-header a {
  color: inherit;
  font-size: 0.875rem;
  text-decoration: underline;
}

.champ-modern .champ-chat-header button {
  display: grid;
  width: 44px;
  height: 44px;
  flex: none;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 1.5rem;
  cursor: pointer;
}

.champ-modern .champ-chat-header button:hover { background: #ffffff26; }
.champ-modern .champ-chat-header :is(a, button):focus-visible { outline: 2px solid #fff; }

.champ-modern .champ-chat-panel iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

@media print {
  .champ-modern .champ-chat { display: none; }
}
