/* Z17 support chat + tracking styles. */
.z17-chat {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9000;
  font-family: 'DM Sans', system-ui, sans-serif;
  color: #eaf2ec;
}

.z17-launcher {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid #b4ff67;
  border-radius: 50%;
  background: #b4ff67;
  color: #101a12;
  cursor: pointer;
  box-shadow: 0 14px 40px #0008;
  transition: transform .2s;
}

.z17-launcher:hover { transform: translateY(-3px); }
.z17-launcher svg { width: 26px; height: 26px; fill: currentColor; }

.z17-badge {
  display: none;
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: #ff5d73;
  color: #fff;
  font: 700 11px/20px 'DM Mono', monospace;
  text-align: center;
}

.z17-badge.z17-show { display: block; }

.z17-panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  display: flex;
  flex-direction: column;
  width: min(365px, calc(100vw - 30px));
  height: min(500px, calc(100dvh - 120px));
  border: 1px solid #324155;
  border-radius: 16px;
  background: #0f141c;
  box-shadow: 0 26px 80px #000b;
  overflow: hidden;
}

.z17-panel[hidden] { display: none; }

.z17-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 15px;
  background: linear-gradient(100deg, #17233a, #1f1c3a);
  border-bottom: 1px solid #33415a;
}

.z17-head b { display: block; font-size: 13px; }
.z17-head small { display: block; font-size: 10px; color: #9db0cc; margin-top: 3px; }
.z17-head div { flex: 1; }

.z17-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #b4ff67;
  color: #121d14;
  font: 700 15px 'Space Grotesk', sans-serif;
}

.z17-close {
  border: 0;
  background: none;
  color: #cfdaea;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.z17-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px;
  overflow-y: auto;
}

.z17-msg {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.z17-theirs { background: #1c2637; color: #e6eefb; border-bottom-left-radius: 3px; }
.z17-mine { background: #b4ff67; color: #101b12; align-self: flex-end; border-bottom-right-radius: 3px; }
.z17-pending { opacity: .6; }
.z17-sent { font-size: 11px; opacity: .75; }

.z17-form {
  display: flex;
  gap: 7px;
  padding: 11px;
  border-top: 1px solid #2b3747;
}

.z17-input {
  flex: 1;
  min-width: 0;
  padding: 11px;
  border: 1px solid #3a4859;
  border-radius: 9px;
  background: #0b1119;
  color: #f1f6ff;
  font: inherit;
  font-size: 13px;
  outline: 0;
}

.z17-input:focus { border-color: #b4ff67; }

.z17-form button {
  width: 42px;
  border: 0;
  border-radius: 9px;
  background: #b4ff67;
  color: #132014;
  font-size: 19px;
  cursor: pointer;
}

.z17-fine {
  margin: 0;
  padding: 0 12px 10px;
  font-size: 9px;
  color: #7f8fa4;
}

@media (max-width: 620px) {
  .z17-chat { right: 12px; bottom: 12px; }
  .z17-panel { bottom: 68px; }
}
