/* C1 trial-station chat widget. Scoped under [data-iw-chat-root]. */
[data-iw-chat-root] {
  position: fixed;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  z-index: 2147483000;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #10394c;
  /* The root spans the viewport only while a visible launcher/panel needs it.
     A visually hidden launcher must never form an invisible click shield. */
  pointer-events: none;
}
[data-iw-chat-root].iw-chat-launcher-visible:not(.t85-chat-suppressed):not(.iw-chat-checkout),
[data-iw-chat-root].iw-chat-panel-open { pointer-events: auto; }
[data-iw-chat-root] .iw-chat-launchers { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; opacity: 0; visibility: hidden; transform: translateY(8px); pointer-events: none; transition: opacity 200ms ease, visibility 0s linear 200ms, transform 200ms ease; }
[data-iw-chat-root].iw-chat-launcher-visible:not(.iw-chat-panel-open) .iw-chat-launchers { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; transition: opacity 200ms ease, visibility 0s linear 0s, transform 200ms ease; }
[data-iw-chat-root].iw-chat-panel-open .iw-chat-launchers { opacity: 0; visibility: hidden; transform: translateY(8px); pointer-events: none; }
[data-iw-chat-root] .iw-chat-button {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 0;
  background: #7137db;
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(47, 23, 98, .30);
}
[data-iw-chat-root][data-iw-chat-theme="icewave"] .iw-chat-button { background: #0f2238; }
[data-iw-chat-root] .iw-chat-button:hover { background: #5d25c8; }
[data-iw-chat-root][data-iw-chat-theme="icewave"] .iw-chat-button:hover { background: #173957; }
[data-iw-chat-root] .iw-chat-button svg { width: 29px; height: 29px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[data-iw-chat-root] .iw-chat-whatsapp,[data-iw-chat-root] .iw-chat-telegram { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; padding: 0; border: 0; border-radius: 50%; color: #fff; text-decoration: none; background: #42c94b; box-shadow: 0 10px 22px rgba(15, 34, 56, .30); }
[data-iw-chat-root] .iw-chat-whatsapp:hover { background: #2cab3b; }
[data-iw-chat-root] .iw-chat-whatsapp-preview { opacity: .9; cursor: not-allowed; }
[data-iw-chat-root] .iw-chat-telegram { background: #2aa9e0; }
[data-iw-chat-root] .iw-chat-whatsapp svg,[data-iw-chat-root] .iw-chat-telegram svg { width: 29px; height: 29px; fill: currentColor; }
[data-iw-chat-root] .iw-chat-unread { position: absolute; top: -4px; right: -4px; display: grid; place-items: center; width: 21px; height: 21px; border: 2px solid #fff; border-radius: 50%; background: #e52031; color: #fff; font: 700 12px/1 system-ui,sans-serif; box-shadow: 0 2px 5px rgba(0,0,0,.2); }
[data-iw-chat-root] .iw-chat-button:focus-visible,
[data-iw-chat-root] .iw-chat-close:focus-visible,
[data-iw-chat-root] .iw-chat-chip:focus-visible,
[data-iw-chat-root] .iw-chat-send:focus-visible,
[data-iw-chat-root] textarea:focus-visible {
  outline: 3px solid #78c7cf;
  outline-offset: 2px;
}
[data-iw-chat-root] .iw-chat-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  width: min(23rem, calc(100vw - 2rem));
  height: min(34rem, calc(100vh - 6rem));
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #c7dde0;
  border-radius: .8rem;
  box-shadow: 0 1rem 2.5rem rgba(6, 35, 42, .3);
  overflow: hidden;
}
[data-iw-chat-root] .iw-chat-panel[hidden] { display: none; }
[data-iw-chat-root] .iw-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .75rem .9rem;
  background: #0d5a66;
  color: #fff;
}
[data-iw-chat-root] .iw-chat-head strong { font-size: .95rem; letter-spacing: .02em; }
[data-iw-chat-root] .iw-chat-close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
[data-iw-chat-root] .iw-chat-intro {
  margin: 0;
  padding: .6rem .9rem;
  font-size: .78rem;
  line-height: 1.35;
  color: #41616a;
  border-bottom: 1px solid #e3eef0;
}
[data-iw-chat-root] .iw-chat-log {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: .7rem .9rem;
  background: #f7fbfb;
}
[data-iw-chat-root] .iw-chat-row { margin: 0 0 .65rem; }
[data-iw-chat-root] .iw-chat-who {
  display: block;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #64828a;
  margin-bottom: .15rem;
}
[data-iw-chat-root] .iw-chat-text {
  margin: 0;
  padding: .5rem .6rem;
  border-radius: .45rem;
  font-size: .86rem;
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
[data-iw-chat-root] .iw-chat-user .iw-chat-text { background: #e4f1f3; }
[data-iw-chat-root] .iw-chat-support .iw-chat-text { background: #fff; border: 1px solid #dbe9eb; }
[data-iw-chat-root] .iw-chat-model {
  display: block;
  font-size: .65rem;
  color: #6b858c;
  margin: -.35rem 0 .6rem;
}
[data-iw-chat-root] .iw-chat-actions { display: flex; flex-wrap: wrap; gap: .35rem; padding: 0 .9rem .5rem; }
[data-iw-chat-root] .iw-chat-chip {
  border: 1px solid #9cc4c9;
  background: #fff;
  color: #10525e;
  border-radius: 1rem;
  padding: .22rem .55rem;
  font-size: .72rem;
  text-decoration: none;
  cursor: pointer;
}
[data-iw-chat-root] .iw-chat-chip:hover { background: #eef7f8; }
[data-iw-chat-root] .iw-chat-human {
  padding: .15rem .9rem .55rem;
}
[data-iw-chat-root] .iw-chat-human-button {
  width: 100%;
  border: 1px solid #0d5a66;
  background: #fff;
  color: #0d5a66;
  border-radius: .4rem;
  padding: .4rem .55rem;
  font: inherit;
  font-size: .78rem;
  cursor: pointer;
}
[data-iw-chat-root] .iw-chat-human-button:hover { background: #eef7f8; }
[data-iw-chat-root] .iw-chat-human-notice .iw-chat-text { border-color: #0d5a66; }
[data-iw-chat-root] .iw-chat-contact-link {
  display: inline-block;
  margin-top: .35rem;
  color: #0d5a66;
  font-size: .8rem;
  font-weight: 600;
}
[data-iw-chat-root] .iw-chat-contact-link:focus-visible {
  outline: 3px solid #78c7cf;
  outline-offset: 2px;
}
[data-iw-chat-root] .iw-chat-form {
  display: flex;
  gap: .4rem;
  padding: .6rem .9rem .3rem;
  border-top: 1px solid #e3eef0;
}
[data-iw-chat-root] textarea {
  flex: 1 1 auto;
  resize: none;
  min-height: 2.4rem;
  max-height: 5rem;
  padding: .45rem .5rem;
  border: 1px solid #b9d3d7;
  border-radius: .4rem;
  font: inherit;
  font-size: .82rem;
}
[data-iw-chat-root] .iw-chat-send {
  align-self: flex-end;
  border: 1px solid #0d5a66;
  background: #0d5a66;
  color: #fff;
  border-radius: .4rem;
  padding: .45rem .65rem;
  font: inherit;
  font-size: .8rem;
  cursor: pointer;
}
[data-iw-chat-root] .iw-chat-send:disabled { opacity: .6; cursor: wait; }
[data-iw-chat-root] .iw-chat-status {
  margin: 0;
  padding: .25rem .9rem .55rem;
  min-height: 1.2rem;
  font-size: .72rem;
  line-height: 1.35;
  color: #5a747b;
}
@media (max-width: 30rem) {
  [data-iw-chat-root] .iw-chat-panel {
    width: calc(100vw - 1rem);
    height: min(38rem, calc(100vh - 1rem));
    border-radius: .6rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  [data-iw-chat-root] * { scroll-behavior: auto; transition: none !important; }
}

/* V2A7: topic switch + customer-facing support/email route */
[data-iw-chat-root] .iw-chat-modes {
  display: flex;
  gap: .3rem;
  padding: .5rem .9rem .1rem;
  border-bottom: 1px solid #e3eef0;
}
[data-iw-chat-root] .iw-chat-mode {
  flex: 1 1 0;
  min-height: 2.25rem;
  padding: .3rem .45rem;
  border: 1px solid #c7dde0;
  border-radius: .4rem;
  background: #fff;
  color: #41616a;
  font: inherit;
  font-size: .72rem;
  font-weight: 600;
  cursor: pointer;
}
[data-iw-chat-root] .iw-chat-mode[aria-pressed="true"] {
  background: #0d5a66;
  border-color: #0d5a66;
  color: #fff;
}
[data-iw-chat-root] .iw-chat-mode:focus-visible,
[data-iw-chat-root] .iw-chat-support-route a:focus-visible {
  outline: 3px solid #78c7cf;
  outline-offset: 2px;
}
[data-iw-chat-root] .iw-chat-support-route {
  margin: 0;
  padding: .35rem .9rem .55rem;
  font-size: .76rem;
  line-height: 1.4;
  color: #41616a;
}
[data-iw-chat-root] .iw-chat-support-route a {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  color: #0d5a66;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
[data-iw-chat-root] .iw-chat-support-email { word-break: break-all; }
[data-iw-chat-root] .iw-chat-support-route [hidden] { display: none !important; }

[data-iw-chat-root] .iw-chat-modes[hidden]{display:none!important}


/* Product/knowledge links returned by support answers. */
[data-iw-chat-root] .iw-chat-links {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  margin-top: .35rem;
}
[data-iw-chat-root] .iw-chat-link {
  color: #0d5a66;
  font-size: .76rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
[data-iw-chat-root] .iw-chat-link:focus-visible {
  outline: 3px solid #78c7cf;
  outline-offset: 2px;
}

/* T52: placement must be immediate, never animate across a tappable control. */
@media (max-width: 30rem) {
  [data-iw-chat-root][data-iw-placement-owner="overlays"] { transition: none !important; }
}
