/* PowerStacks Assistant (Pax) floating chat widget, ported from the marketing-site widget. */

#ps-assistant-root {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
}

#ps-assistant-toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #051441;
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(5, 20, 65, 0.35);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

#ps-assistant-toggle:hover {
  background: #0a1f5e;
  transform: scale(1.07);
  box-shadow: 0 6px 20px rgba(5, 20, 65, 0.45);
}

#ps-assistant-toggle svg {
  width: 24px;
  height: 24px;
  pointer-events: none;
}

#ps-assistant-panel {
  position: absolute;
  bottom: 68px;
  right: 0;
  width: 400px;
  height: 600px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(5, 20, 65, 0.18);
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.97);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

#ps-assistant-panel.ps-open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0) scale(1);
}

#ps-assistant-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(90deg, #3221aa, #5670f0);
  color: #ffffff;
  flex-shrink: 0;
}

#ps-assistant-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

#ps-assistant-title svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

#ps-assistant-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
}

#ps-assistant-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
}

#ps-assistant-close svg {
  width: 16px;
  height: 16px;
}

#ps-assistant-body {
  flex: 1;
  overflow: hidden;
}

#ps-assistant-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

@media (max-width: 480px) {
  #ps-assistant-root {
    bottom: 16px;
    right: 16px;
  }

  #ps-assistant-panel {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 90dvh;
    border-radius: 16px 16px 0 0;
    border-bottom: none;
  }
}
