/* ApeX Payment — visitor chat widget */
.axchat-launcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9998;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 0;
  background: #2e5bff;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(10, 37, 64, .28);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s ease, background .15s ease;
}
.axchat-launcher:hover { transform: translateY(-2px); background: #274fd6; }
.axchat-launcher svg { width: 24px; height: 24px; }
.axchat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: #d1435b;
  color: #fff;
  font: 600 12px/20px Inter, sans-serif;
  text-align: center;
  padding: 0 5px;
  display: none;
}
.axchat-badge.on { display: block; }

.axchat-panel {
  position: fixed;
  right: 20px;
  bottom: 88px;
  z-index: 9999;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 540px;
  max-height: calc(100vh - 120px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(10, 37, 64, .30);
  display: none;
  flex-direction: column;
  overflow: hidden;
  font: 14px/1.5 Inter, "Segoe UI", system-ui, sans-serif;
  color: #0a2540;
}
.axchat-panel.on { display: flex; }

.axchat-head {
  background: #0a2540;
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.axchat-head .axchat-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #0ea47a;
  box-shadow: 0 0 0 3px rgba(14, 164, 122, .3);
}
.axchat-head .axchat-title { font-weight: 600; font-size: 14px; }
.axchat-head .axchat-close {
  margin-left: auto;
  background: none;
  border: 0;
  color: rgba(255, 255, 255, .7);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
}
.axchat-head .axchat-close:hover { color: #fff; background: rgba(255, 255, 255, .12); }

.axchat-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #f6f9fc;
}
.axchat-row { display: flex; margin-bottom: 10px; }
.axchat-row.me { justify-content: flex-end; }
.axchat-bub {
  max-width: 78%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 13.5px;
  white-space: pre-wrap;
  word-break: break-word;
}
.axchat-row.them .axchat-bub { background: #fff; border: 1px solid #e3e8ee; border-top-left-radius: 4px; }
.axchat-row.me .axchat-bub { background: #2e5bff; color: #fff; border-top-right-radius: 4px; }
.axchat-row.sys { justify-content: center; }
.axchat-row.sys .axchat-bub { background: none; border: 0; color: #8aa0b4; font-size: 12px; }
.axchat-time { font-size: 10.5px; color: #8aa0b4; margin-top: 3px; }
.axchat-row.me .axchat-time { text-align: right; }

.axchat-form { padding: 12px 14px 14px; background: #fff; border-top: 1px solid #e3e8ee; }
.axchat-fields { display: flex; gap: 8px; margin-bottom: 8px; }
.axchat-fields input {
  flex: 1;
  min-width: 0;
  border: 1px solid #e3e8ee;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  outline: none;
  color: #0a2540;
  background: #f6f9fc;
}
.axchat-fields input:focus { border-color: #2e5bff; background: #fff; }
.axchat-inputrow { display: flex; gap: 8px; align-items: flex-end; }
.axchat-inputrow textarea {
  flex: 1;
  resize: none;
  border: 1px solid #e3e8ee;
  border-radius: 10px;
  padding: 9px 11px;
  font: inherit;
  font-size: 13.5px;
  height: 44px;
  outline: none;
  color: #0a2540;
}
.axchat-inputrow textarea:focus { border-color: #2e5bff; box-shadow: 0 0 0 3px rgba(46, 91, 255, .12); }
.axchat-send {
  border: 0;
  border-radius: 10px;
  background: #2e5bff;
  color: #fff;
  font: 600 13.5px Inter, sans-serif;
  padding: 11px 18px;
  cursor: pointer;
  white-space: nowrap;
}
.axchat-send:hover { background: #274fd6; }
.axchat-send:disabled { opacity: .5; cursor: default; }
.axchat-note {
  margin-top: 8px;
  font-size: 11.5px;
  color: #8aa0b4;
  text-align: center;
}
.axchat-err {
  margin-top: 8px;
  font-size: 12px;
  color: #d1435b;
  text-align: center;
  display: none;
}
.axchat-err.on { display: block; }

@media (max-width: 480px) {
  .axchat-panel {
    right: 8px;
    left: 8px;
    bottom: 84px;
    width: auto;
    max-width: none;
    height: 70vh;
  }
}
