/* ==========================================================================
   CREATIPLEX SOLUTIONS - RISHIKA CHATBOT STYLESHEET
   Human-like Floating Chatbot Widget with Connecting & Typing Effects
   ========================================================================== */

:root {
  --cpx-chat-primary: #0052ff;
  --cpx-chat-cyan: #00c2ff;
  --cpx-chat-teal: #00e5bf;
  --cpx-chat-bg: #0b1220;
  --cpx-chat-surface: #111c30;
  --cpx-chat-card: #17243c;
  --cpx-chat-card-hover: #1e2f4e;
  --cpx-chat-border: rgba(255, 255, 255, 0.1);
  --cpx-chat-border-glow: rgba(0, 194, 255, 0.35);
  --cpx-chat-text: #f8fafc;
  --cpx-chat-text-muted: #94a3b8;
  --cpx-chat-agent-bubble: #17243e;
  --cpx-chat-visitor-bubble: linear-gradient(135deg, #0052ff 0%, #0077ff 100%);
  --cpx-chat-success: #10b981;
  --cpx-chat-radius-sm: 8px;
  --cpx-chat-radius-md: 14px;
  --cpx-chat-radius-lg: 20px;
  --cpx-chat-radius-full: 9999px;
  --cpx-chat-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 35px rgba(0, 82, 255, 0.15);
  --cpx-chat-font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --cpx-chat-font-display: 'Space Grotesk', system-ui, -apple-system, sans-serif;
}

/* Floating Launcher Button */
.cpx-chat-launcher {
  position: fixed;
  bottom: 26px;
  right: 26px;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 66px;
  height: 66px;
  border-radius: var(--cpx-chat-radius-full);
  background: linear-gradient(135deg, #0052ff 0%, #00a3c4 100%);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 82, 255, 0.4), 0 0 20px rgba(0, 194, 255, 0.25);
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  user-select: none;
}

.cpx-chat-launcher:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 82, 255, 0.55), 0 0 25px rgba(0, 194, 255, 0.4);
}

.cpx-chat-launcher:active {
  transform: scale(0.96);
}

.cpx-chat-launcher-img {
  width: 58px;
  height: 58px;
  border-radius: var(--cpx-chat-radius-full);
  object-fit: cover;
  display: block;
}

.cpx-chat-launcher-icon {
  display: none;
  width: 28px;
  height: 28px;
}

.cpx-chat-launcher.is-open .cpx-chat-launcher-img {
  display: none;
}

.cpx-chat-launcher.is-open .cpx-chat-launcher-icon {
  display: block;
}

.cpx-chat-launcher.is-open {
  background: #111c30;
  border-color: rgba(255, 255, 255, 0.15);
}

/* Online Pulse Dot on Launcher */
.cpx-chat-launcher-online {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 15px;
  height: 15px;
  background-color: var(--cpx-chat-success);
  border-radius: 50%;
  border: 2.5px solid #0b1220;
}

.cpx-chat-launcher-online::after {
  content: '';
  position: absolute;
  top: -2.5px;
  left: -2.5px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid var(--cpx-chat-success);
  animation: cpx-pulse 2s infinite ease-out;
  opacity: 0.8;
}

@keyframes cpx-pulse {
  0% { transform: scale(1); opacity: 0.9; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* Unread Badge */
.cpx-chat-badge {
  position: absolute;
  top: -4px;
  left: -4px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 12px;
  background: #ff3366;
  color: #ffffff;
  font-family: var(--cpx-chat-font);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(255, 51, 102, 0.5);
  border: 2px solid #0b1220;
  animation: cpx-bounce-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cpx-bounce-in {
  0% { transform: scale(0); }
  80% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Teaser Greeting Bubble */
.cpx-chat-teaser {
  position: fixed;
  bottom: 104px;
  right: 26px;
  z-index: 99998;
  max-width: 290px;
  background: #111c30;
  border: 1px solid rgba(0, 194, 255, 0.3);
  border-radius: var(--cpx-chat-radius-md);
  padding: 12px 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), 0 0 20px rgba(0, 194, 255, 0.12);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  animation: cpx-slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transition: transform 0.2s ease, opacity 0.2s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.cpx-chat-teaser:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 194, 255, 0.55);
}

.cpx-chat-teaser-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid var(--cpx-chat-cyan);
}

.cpx-chat-teaser-text {
  font-family: var(--cpx-chat-font);
  font-size: 13px;
  line-height: 1.45;
  color: var(--cpx-chat-text);
}

.cpx-chat-teaser-author {
  font-weight: 700;
  color: var(--cpx-chat-cyan);
  font-size: 12px;
  display: block;
  margin-bottom: 2px;
}

.cpx-chat-teaser-close {
  background: none;
  border: none;
  color: var(--cpx-chat-text-muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.cpx-chat-teaser-close:hover {
  opacity: 1;
  color: #ffffff;
}

@keyframes cpx-slide-up {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ==========================================================================
   MAIN CHAT WINDOW
   ========================================================================== */
.cpx-chat-window {
  position: fixed;
  bottom: 104px;
  right: 26px;
  width: 400px;
  max-width: calc(100vw - 32px);
  height: 640px;
  max-height: calc(100vh - 130px);
  background: var(--cpx-chat-bg);
  border: 1px solid var(--cpx-chat-border);
  border-radius: var(--cpx-chat-radius-lg);
  box-shadow: var(--cpx-chat-shadow);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(24px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
  font-family: var(--cpx-chat-font);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.cpx-chat-window.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Chat Header */
.cpx-chat-header {
  background: linear-gradient(180deg, #131e33 0%, #0e1728 100%);
  border-bottom: 1px solid var(--cpx-chat-border);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  position: relative;
}

.cpx-chat-header-agent {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.cpx-chat-avatar-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.cpx-chat-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--cpx-chat-cyan);
  box-shadow: 0 0 12px rgba(0, 194, 255, 0.35);
}

.cpx-chat-avatar-online {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: var(--cpx-chat-success);
  border: 2px solid #0e1728;
  border-radius: 50%;
}

.cpx-chat-header-info {
  display: flex;
  flex-direction: column;
}

.cpx-chat-header-name {
  font-family: var(--cpx-chat-font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--cpx-chat-text);
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}

.cpx-chat-verified-badge {
  display: inline-flex;
  color: var(--cpx-chat-cyan);
}

.cpx-chat-header-title {
  font-size: 11.5px;
  color: var(--cpx-chat-text-muted);
  line-height: 1.3;
  margin-top: 2px;
}

.cpx-chat-header-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--cpx-chat-success);
  font-weight: 500;
}

.cpx-chat-header-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cpx-chat-success);
}

.cpx-chat-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cpx-chat-header-btn {
  background: transparent;
  border: none;
  color: var(--cpx-chat-text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--cpx-chat-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cpx-chat-header-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--cpx-chat-text);
}

.cpx-chat-header-btn.is-active {
  color: var(--cpx-chat-cyan);
}

/* Connecting Agent Notification Bar */
.cpx-chat-connecting-bar {
  background: linear-gradient(90deg, rgba(0, 82, 255, 0.15), rgba(0, 194, 255, 0.15));
  border-bottom: 1px solid rgba(0, 194, 255, 0.2);
  padding: 8px 16px;
  font-size: 11.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--cpx-chat-cyan);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.cpx-chat-connecting-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0, 194, 255, 0.25);
  border-top-color: var(--cpx-chat-cyan);
  border-radius: 50%;
  animation: cpx-spin 0.8s linear infinite;
}

@keyframes cpx-spin {
  to { transform: rotate(360deg); }
}

.cpx-chat-connecting-bar.is-connected {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.25);
  color: #34d399;
}

.cpx-chat-connecting-bar.is-connected .cpx-chat-connecting-spinner {
  display: none;
}

/* Messages Container */
.cpx-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.cpx-chat-messages::-webkit-scrollbar {
  width: 5px;
}

.cpx-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

/* Date / System Separator */
.cpx-chat-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px 0;
}

.cpx-chat-divider-text {
  font-size: 11px;
  color: var(--cpx-chat-text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 10px;
  border-radius: var(--cpx-chat-radius-full);
  border: 1px solid rgba(255, 255, 255, 0.05);
  letter-spacing: 0.02em;
}

/* Message Rows */
.cpx-chat-msg-row {
  display: flex;
  gap: 10px;
  max-width: 88%;
  animation: cpx-msg-appear 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cpx-msg-appear {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.cpx-chat-msg-agent {
  align-self: flex-start;
}

.cpx-chat-msg-visitor {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.cpx-chat-msg-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid var(--cpx-chat-cyan);
  align-self: flex-end;
}

.cpx-chat-msg-content {
  display: flex;
  flex-direction: column;
}

.cpx-chat-msg-bubble {
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.48;
  word-break: break-word;
}

.cpx-chat-msg-agent .cpx-chat-msg-bubble {
  background: var(--cpx-chat-agent-bubble);
  border: 1px solid var(--cpx-chat-border);
  color: var(--cpx-chat-text);
  border-radius: 18px 18px 18px 4px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.18);
}

.cpx-chat-msg-visitor .cpx-chat-msg-bubble {
  background: var(--cpx-chat-visitor-bubble);
  color: #ffffff;
  border-radius: 18px 18px 4px 18px;
  box-shadow: 0 4px 15px rgba(0, 82, 255, 0.28);
}

.cpx-chat-msg-time {
  font-size: 10px;
  color: var(--cpx-chat-text-muted);
  margin-top: 4px;
  padding: 0 4px;
}

.cpx-chat-msg-visitor .cpx-chat-msg-time {
  text-align: right;
}

/* Typing Indicator Bubble */
.cpx-chat-typing-row {
  display: flex;
  gap: 10px;
  align-self: flex-start;
  align-items: flex-end;
  animation: cpx-msg-appear 0.25s ease-out;
}

.cpx-chat-typing-bubble {
  background: var(--cpx-chat-agent-bubble);
  border: 1px solid var(--cpx-chat-border);
  border-radius: 18px 18px 18px 4px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cpx-chat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cpx-chat-cyan);
  animation: cpx-dot-bounce 1.4s infinite ease-in-out both;
}

.cpx-chat-dot:nth-child(1) { animation-delay: -0.32s; }
.cpx-chat-dot:nth-child(2) { animation-delay: -0.16s; }
.cpx-chat-dot:nth-child(3) { animation-delay: 0s; }

@keyframes cpx-dot-bounce {
  0%, 80%, 100% { transform: scale(0.4); opacity: 0.4; }
  40% { transform: scale(1.1); opacity: 1; }
}

.cpx-chat-typing-label {
  font-size: 11px;
  color: var(--cpx-chat-text-muted);
  font-style: italic;
  margin-left: 6px;
}

/* Options / Choice Chips Container */
.cpx-chat-options-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 6px 0 10px 0;
  animation: cpx-msg-appear 0.3s ease-out;
}

.cpx-chat-options-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cpx-chat-cyan);
  margin-bottom: 2px;
}

.cpx-chat-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.cpx-chat-chip {
  background: var(--cpx-chat-card);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 13px;
  border-radius: var(--cpx-chat-radius-full);
  font-family: var(--cpx-chat-font);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.cpx-chat-chip:hover {
  background: var(--cpx-chat-primary);
  border-color: var(--cpx-chat-cyan);
  color: #ffffff;
  transform: translateY(-1.5px);
  box-shadow: 0 4px 12px rgba(0, 82, 255, 0.35);
}

.cpx-chat-chip:active {
  transform: scale(0.96);
}

.cpx-chat-chip.is-selected {
  background: var(--cpx-chat-primary);
  border-color: var(--cpx-chat-cyan);
  color: #ffffff;
  pointer-events: none;
}

.cpx-chat-chip.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* Inline Interactive Lead / Contact Form */
.cpx-chat-form-card {
  background: var(--cpx-chat-surface);
  border: 1px solid rgba(0, 194, 255, 0.3);
  border-radius: var(--cpx-chat-radius-md);
  padding: 14px;
  margin: 6px 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cpx-chat-form-title {
  font-family: var(--cpx-chat-font-display);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--cpx-chat-text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.cpx-chat-form-input {
  width: 100%;
  background: #090e18;
  border: 1px solid var(--cpx-chat-border);
  border-radius: var(--cpx-chat-radius-sm);
  padding: 8px 12px;
  color: var(--cpx-chat-text);
  font-family: var(--cpx-chat-font);
  font-size: 12.5px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cpx-chat-form-input:focus {
  border-color: var(--cpx-chat-cyan);
  box-shadow: 0 0 0 2px rgba(0, 194, 255, 0.2);
}

.cpx-chat-form-submit {
  background: linear-gradient(135deg, #0052ff, #00a3c4);
  color: #ffffff;
  border: none;
  border-radius: var(--cpx-chat-radius-sm);
  padding: 9px 14px;
  font-family: var(--cpx-chat-font);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: opacity 0.2s, transform 0.2s;
}

.cpx-chat-form-submit:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

/* Quick Action Callout Buttons (e.g. WhatsApp / Call Direct / Track) */
.cpx-chat-action-btn-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.cpx-chat-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: var(--cpx-chat-radius-full);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.cpx-chat-action-wa {
  background: #25d366;
  color: #ffffff;
}

.cpx-chat-action-wa:hover {
  background: #20bd5a;
  transform: translateY(-1px);
}

.cpx-chat-action-call {
  background: #0e1728;
  color: var(--cpx-chat-cyan);
  border-color: rgba(0, 194, 255, 0.35);
}

.cpx-chat-action-call:hover {
  background: rgba(0, 194, 255, 0.12);
  border-color: var(--cpx-chat-cyan);
}

/* Inline Project Card (Tracker response inside chat) */
.cpx-chat-project-card {
  background: var(--cpx-chat-surface);
  border: 1px solid rgba(0, 194, 255, 0.35);
  border-radius: var(--cpx-chat-radius-md);
  padding: 12px 14px;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cpx-chat-project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.cpx-chat-project-id {
  font-family: var(--cpx-chat-font-display);
  font-weight: 700;
  font-size: 12px;
  color: var(--cpx-chat-cyan);
  letter-spacing: 0.05em;
}

.cpx-chat-project-title {
  font-weight: 600;
  font-size: 13px;
  color: #ffffff;
}

.cpx-chat-project-status {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--cpx-chat-radius-full);
  text-transform: uppercase;
}

.cpx-chat-progress-wrap {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.cpx-chat-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0052ff, #00c2ff);
  border-radius: 4px;
  transition: width 0.4s ease;
}

/* Input Area */
.cpx-chat-input-area {
  background: #0e1728;
  border-top: 1px solid var(--cpx-chat-border);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.cpx-chat-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cpx-chat-input {
  flex: 1;
  background: #17243c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--cpx-chat-radius-full);
  padding: 10px 16px;
  color: var(--cpx-chat-text);
  font-family: var(--cpx-chat-font);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cpx-chat-input:focus {
  border-color: var(--cpx-chat-cyan);
  box-shadow: 0 0 0 2px rgba(0, 194, 255, 0.2);
}

.cpx-chat-input::placeholder {
  color: var(--cpx-chat-text-muted);
}

.cpx-chat-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0052ff, #00a3c4);
  border: none;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(0, 82, 255, 0.35);
}

.cpx-chat-send-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(0, 82, 255, 0.5);
}

.cpx-chat-send-btn:active {
  transform: scale(0.94);
}

.cpx-chat-footer-brand {
  font-size: 10px;
  color: var(--cpx-chat-text-muted);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.cpx-chat-footer-brand a {
  color: var(--cpx-chat-cyan);
  text-decoration: none;
}

.cpx-chat-footer-brand a:hover {
  text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .cpx-chat-launcher {
    bottom: 18px;
    right: 18px;
    width: 58px;
    height: 58px;
  }
  .cpx-chat-launcher-img {
    width: 50px;
    height: 50px;
  }
  .cpx-chat-teaser {
    bottom: 86px;
    right: 18px;
    max-width: calc(100vw - 36px);
  }
  .cpx-chat-window {
    bottom: 0;
    right: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border: none;
  }
}

/* Chat Ended & Feedback Star Rating Card */
.cpx-chat-ended-card {
  background: linear-gradient(180deg, #131e33 0%, #0d1627 100%);
  border: 1px solid rgba(0, 194, 255, 0.3);
  border-radius: var(--cpx-chat-radius-md);
  padding: 16px;
  margin: 12px 0 6px 0;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  animation: cpx-slide-up 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.cpx-chat-ended-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: var(--cpx-chat-radius-full);
}

.cpx-chat-rating-title {
  font-family: var(--cpx-chat-font-display);
  font-size: 13.5px;
  font-weight: 600;
  color: #ffffff;
  margin: 12px 0 6px 0;
}

.cpx-chat-stars-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 8px 0;
}

.cpx-star-btn {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  padding: 4px;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}

.cpx-star-btn:hover {
  color: #fbbf24;
  transform: scale(1.25);
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.6);
}

.cpx-star-btn.is-active {
  color: #fbbf24;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

.cpx-chat-rating-feedback {
  font-size: 12px;
  color: #38bdf8;
  margin: 6px 0 10px 0;
  font-weight: 500;
  animation: cpx-slide-up 0.3s ease;
}

.cpx-chat-ended-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.cpx-chat-exit-btn {
  background: #1e293b;
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--cpx-chat-radius-full);
  padding: 7px 15px;
  font-family: var(--cpx-chat-font);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.cpx-chat-exit-btn:hover {
  background: #334155;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.cpx-chat-restart-btn {
  background: transparent;
  color: var(--cpx-chat-cyan);
  border: 1px solid rgba(0, 194, 255, 0.35);
  border-radius: var(--cpx-chat-radius-full);
  padding: 7px 14px;
  font-family: var(--cpx-chat-font);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.cpx-chat-restart-btn:hover {
  background: rgba(0, 194, 255, 0.15);
  border-color: var(--cpx-chat-cyan);
  transform: translateY(-1px);
}
