.dropas-chatnex {
  position: fixed;
  z-index: 1500;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  font-family: inherit;
}

.dropas-chatnex .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dropas-chatnex[hidden],
.dropas-chatnex [hidden] {
  display: none !important;
}

.dropas-chatnex-launcher {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  min-height: 48px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #2563eb);
  box-shadow: 0 14px 36px rgba(15, 23, 42, .28);
  cursor: pointer;
}

.dropas-chatnex-launcher svg {
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  stroke: #93c5fd;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dropas-chatnex-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .38);
}

.dropas-chatnex-panel {
  position: absolute;
  right: 0;
  bottom: 62px;
  display: flex;
  flex-direction: column;
  width: min(390px, calc(100vw - 28px));
  max-height: min(660px, calc(100vh - 110px));
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .3);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 26px 70px rgba(15, 23, 42, .34);
}

.dropas-chatnex-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  color: #fff;
  background: #0f172a;
}

.dropas-chatnex-panel header div:first-child {
  display: grid;
  gap: 2px;
}

.dropas-chatnex-panel header small {
  color: #cbd5e1;
}

.dropas-chatnex-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dropas-chatnex-header-actions button {
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, .22);
  color: #fff;
  background: rgba(255, 255, 255, .08);
}

.dropas-chatnex-close {
  font-size: 22px;
  line-height: 1;
}

.dropas-chatnex-messages {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  min-height: 280px;
  padding: 16px;
  overflow-y: auto;
  background: #f8fafc;
}

.dropas-chatnex-message {
  align-self: flex-start;
  max-width: 88%;
  padding: 11px 13px;
  border-radius: 16px 16px 16px 4px;
  color: #0f172a;
  background: #fff;
  box-shadow: 0 3px 12px rgba(15, 23, 42, .07);
  white-space: pre-wrap;
}

.dropas-chatnex-message.user {
  align-self: flex-end;
  border-radius: 16px 16px 4px 16px;
  color: #fff;
  background: #2563eb;
}

.dropas-chatnex-message p {
  margin: 0;
}

.dropas-chatnex-message.pending {
  color: #64748b;
}

.dropas-chatnex-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.dropas-chatnex-actions button {
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 7px 10px;
  border: 1px solid #93c5fd;
  color: #1d4ed8;
  background: #eff6ff;
}

.dropas-chatnex-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

.dropas-chatnex-form input {
  min-width: 0;
  margin: 0;
}

.dropas-chatnex-form button {
  width: auto;
  margin: 0;
}

@media (max-width: 560px) {
  .dropas-chatnex {
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
  }

  .dropas-chatnex-panel {
    position: fixed;
    inset: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
    width: auto;
    max-height: none;
  }

  .dropas-chatnex-messages {
    min-height: 0;
  }

  .dropas-chatnex-launcher {
    width: 50px;
    padding: 0;
    justify-content: center;
  }
}
