:root {
  --bg: #111315;
  --fg: #f1f1f1;
  --muted: #a0a0a0;
  --bar: #2d2f33;
  --card: #1c1f22;
  --accent: #2b5cff;
  --radius: 26px;
  --slide-speed: 0.45s;
  font-family: 'Outfit', sans-serif;
}

/* Lock page scroll when wizard is open */
html.modal-open,
body.modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}
/* Style the final success bubble */
.chat-msg.messagex-bot.success {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 100px;
  padding: 1rem;
  box-sizing: border-box;
  background-color: #f0f0f0;    /* or your bubble color */
  color: #000;                  /* text color */
  border-radius: 8px;
  margin-top: 1rem;
}

/* Position and style the Close button within it */
.chat-msg.messagex-bot.success .pwr4-inline-close {
  background: #007aff;          /* your button bg */
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
}


/* 1) Overlay: full viewport with fade + slide in */
.chat-wizard {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  visibility: hidden;
  transform: translateY(100vh);
  pointer-events: none;
  transition:
    transform var(--slide-speed) cubic-bezier(.22,1,.36,1),
    visibility 0s linear var(--slide-speed);
  z-index: 1000;
}
.chat-wizard.active {
  visibility: visible;
  transform: translateY(0);
  pointer-events: all;
  transition:
    transform var(--slide-speed) cubic-bezier(.22,1,.36,1),
    visibility 0s;
}

/* 2) Panel: slide-up container */
.wizard-container {
  width: 100%;
  max-width: 900px;
  height: 100%;
  max-height: 600px;
  background: var(--bg);
  transform: translateY(100%);
  transition: transform var(--slide-speed) cubic-bezier(.22,1,.36,1);
  will-change: transform;
  margin: 0 auto;
}
.chat-wizard.active .wizard-container {
  transform: translateY(0);
}

/* Header */
.chat-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 24px;
  background: var(--bg);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.wizard-title {
  flex: 1;
  text-align: center;
}
.chat-header h2 {
  margin: 0;
  font-size: clamp(20px, 4vw, 32px);
  color: var(--fg);
}
.chat-header .icon-btn {
  background: none;
  border: none;
  color: var(--fg);
  font-size: 24px;
  cursor: pointer;
}

/* Thread & bubbles */
.chat-messages,
.chat-thread {
  flex: 1;
  overflow-y: auto;
  padding: 12px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.chat-msg {
  max-width: 78%;
  padding: 14px 18px;
  border-radius: 18px;
  line-height: 1.4;
  font-size: 16px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.05) inset;
  word-wrap: break-word;
  background: var(--card);
  color: var(--fg);
}
.messagex-user {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 6px;
}
.messagex-bot {
  margin-right: auto;
  border-bottom-left-radius: 6px;
}

/* Typing indicator */
.typing {
  width: 46px;
  height: 20px;
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
}
.typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: blink 1s infinite ease-in-out;
}

/* Inline send button */
.pwr4-inline-send {
  display: inline-block;
  margin-left: 0.5em;
  padding: 0.4em 1em;
  font-size: 0.95rem;
  background-color: #1a73e8;
  color: #fff;
  border: none;
  border-radius: 1.4em;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.pwr4-inline-send:hover {
  background-color: #155dc4;
}

/* Inline close button */
.pwr4-inline-close {
  display: inline-block;
  margin-top: 1em;
  padding: 0.5em 1.2em;
  font-size: 0.95rem;
  background-color: #555;
  color: #fff;
  border: none;
  border-radius: 1.4em;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.pwr4-inline-close:hover {
  background-color: #333;
}

@keyframes blink {
  0%, 80%, 100% { opacity: .2; transform: translateY(0); }
  40%           { opacity: 1; transform: translateY(-3px); }
}

/* Shake on invalid input */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-4px); }
  50%      { transform: translateX(4px); }
  75%      { transform: translateX(-4px); }
}
.shake {
  animation: shake .3s;
}

/* Input bar */
.copilot-search {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bar);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.05) inset;
}
.copilot-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--fg);
  font-size: 18px;
  outline: none;
}

.icon-btn {
  width: auto;
  height: auto;
  padding: 0.75rem 1.2rem;
  justify-content: center;
  align-items: center;
  border-radius: 2.1rem;
  background-color: var(--webflowblue);
}
.icon-btn:hover {
  opacity: .85;
}
.send-btn {
  background: var(--accent);
  color: #fff;
  padding: 6px;
  border-radius: 50%;
  font-weight: 600;
  margin-left: auto;
}

/* Close button in success state */
.success-close {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  margin-left: 8px;
  cursor: pointer;
}
