#solvera-live-support-root {
  position: fixed !important;
  right: 20px !important;
  left: auto !important;
  bottom: 20px !important;
  top: auto !important;
  z-index: 2147483000 !important;
  display: flex !important;
  flex-direction: column-reverse !important;
  align-items: flex-end !important;
  gap: 12px !important;
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif !important;
  color: #0f172a !important;
  line-height: 1.5 !important;
  pointer-events: none;
}

#solvera-live-support-root > * {
  pointer-events: auto;
}

#solvera-live-support-root button,
#solvera-live-support-root input {
  font-family: inherit;
  box-sizing: border-box;
  margin: 0;
}

#solvera-live-support-root .solvera-live-toggle {
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(145deg, #a78bfa 0%, #7c3aed 55%, #6d28d9 100%);
  font-size: 22px;
  line-height: 1;
  padding: 0;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 10px 28px rgba(109, 40, 217, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
  flex-shrink: 0;
}

#solvera-live-support-root.is-collapsed .solvera-live-toggle {
  animation: solvera-live-pulse 2.8s ease-in-out infinite;
}

@keyframes solvera-live-pulse {
  0%,
  100% {
    box-shadow:
      0 10px 28px rgba(109, 40, 217, 0.35),
      0 0 0 0 rgba(139, 92, 246, 0.35);
  }
  50% {
    box-shadow:
      0 12px 32px rgba(109, 40, 217, 0.42),
      0 0 0 8px rgba(139, 92, 246, 0);
  }
}

#solvera-live-support-root .solvera-live-toggle:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 32px rgba(109, 40, 217, 0.45);
}

#solvera-live-support-root .solvera-live-toggle.is-open {
  background: linear-gradient(145deg, #6d28d9 0%, #5b21b6 100%);
  animation: none;
}

#solvera-live-support-root .solvera-live-panel {
  width: min(380px, calc(100vw - 24px));
  height: min(520px, calc(100vh - 110px));
  background: #fff !important;
  border-radius: 18px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow:
    0 24px 60px rgba(15, 23, 42, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.6) inset;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: solvera-live-slide-up 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: bottom right;
}

@keyframes solvera-live-slide-up {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

#solvera-live-support-root .solvera-live-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 52%, #5b21b6 100%) !important;
  color: #fff !important;
  padding: 14px 14px 14px 16px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

#solvera-live-support-root .solvera-live-header-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

#solvera-live-support-root .solvera-live-status {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.28);
  flex-shrink: 0;
}

#solvera-live-support-root .solvera-live-header-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

#solvera-live-support-root .solvera-live-header-title {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#solvera-live-support-root .solvera-live-header-sub {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.88;
  letter-spacing: 0.02em;
}

#solvera-live-support-root .solvera-live-close {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14) !important;
  color: #fff !important;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s ease, transform 0.15s ease;
}

#solvera-live-support-root .solvera-live-close:hover {
  background: rgba(255, 255, 255, 0.24) !important;
  transform: translateY(-1px);
}

#solvera-live-support-root .solvera-live-messages {
  flex: 1;
  overflow: auto;
  padding: 16px;
  background:
    linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%) !important;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#solvera-live-support-root .solvera-live-msg {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

#solvera-live-support-root .solvera-live-msg-user {
  margin-left: auto;
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%) !important;
  color: #fff !important;
  border-bottom-right-radius: 5px;
  box-shadow: 0 4px 14px rgba(109, 40, 217, 0.22);
}

#solvera-live-support-root .solvera-live-msg-bot {
  margin-right: auto;
  background: #fff !important;
  color: #0f172a !important;
  border: 1px solid #e2e8f0;
  border-bottom-left-radius: 5px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

#solvera-live-support-root .solvera-live-msg-typing {
  opacity: 0.8;
  font-style: italic;
}

#solvera-live-support-root .solvera-live-hint {
  padding: 8px 14px;
  font-size: 12px;
  line-height: 1.4;
  color: #64748b !important;
  border-top: 1px solid #e2e8f0;
  background: #fff !important;
  flex-shrink: 0;
}

#solvera-live-support-root .solvera-live-form {
  display: flex;
  gap: 8px;
  padding: 12px 12px 14px;
  border-top: 1px solid #e2e8f0;
  background: #fff !important;
  flex-shrink: 0;
}

#solvera-live-support-root .solvera-live-input {
  flex: 1;
  min-width: 0;
  border: 1px solid #cbd5e1 !important;
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 14px !important;
  outline: none;
  background: #f8fafc !important;
  color: #0f172a !important;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

#solvera-live-support-root .solvera-live-input:focus {
  border-color: #8b5cf6 !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.14);
}

#solvera-live-support-root .solvera-live-input:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

#solvera-live-support-root .solvera-live-send {
  border: 0 !important;
  border-radius: 12px;
  padding: 0 18px;
  min-height: 44px;
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%) !important;
  color: #fff !important;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px !important;
  letter-spacing: normal !important;
  white-space: nowrap;
  transition:
    opacity 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
  box-shadow: 0 4px 14px rgba(109, 40, 217, 0.25);
}

#solvera-live-support-root .solvera-live-send:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(109, 40, 217, 0.32);
}

#solvera-live-support-root .solvera-live-send:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

@media (max-width: 768px) {
  #solvera-live-support-root {
    right: 12px !important;
    bottom: 12px !important;
  }

  #solvera-live-support-root .solvera-live-panel {
    width: min(380px, calc(100vw - 16px));
    height: min(70vh, 520px);
  }

  #solvera-live-support-root .solvera-live-send {
    padding: 0 14px;
  }
}
