/* =====================================================================
   Zenve BI — Global AI Co-Pilot & Natural Language Command Bar (Cmd + K)
   Cinematic glassmorphism, glowing telemetry, and instant spotlight HUD.
   ===================================================================== */

/* Floating Launch Icon (Only the icon is displayed across all dashboards) */
.zcp-launcher-pill {
  position: fixed;
  bottom: 52px;
  right: 24px;
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  padding: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.94));
  border: 1.5px solid rgba(56, 189, 248, 0.45);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 0 18px rgba(56, 189, 248, 0.3);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #ffffff;
  font-family: 'Manrope', -apple-system, sans-serif;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.zcp-launcher-pill:hover {
  transform: translateY(-3px) scale(1.08);
  border-color: rgba(56, 189, 248, 0.85);
  box-shadow: 0 14px 32px -5px rgba(0, 0, 0, 0.6), 0 0 25px rgba(56, 189, 248, 0.55);
}

.zcp-launcher-pill:active {
  transform: translateY(0) scale(0.96);
}

.zcp-sparkle-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #38bdf8;
  border: 1.5px solid #0f172a;
  box-shadow: 0 0 8px #38bdf8;
  animation: zcp-pulse 2s infinite ease-in-out;
}

.zcp-launcher-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  line-height: 1;
}

.zcp-launcher-pill::after {
  content: "AI Chatbot (Ctrl+K)";
  position: absolute;
  right: 60px;
  top: 50%;
  transform: translateY(-50%) scale(0.92);
  padding: 6px 11px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  font-family: 'Manrope', -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}

.zcp-launcher-pill:hover::after {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

@keyframes zcp-pulse {
  0%, 100% { opacity: 0.6; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.2); }
}

.zcp-kbd-chip {
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: #94a3b8;
  font-weight: 700;
}

/* Modal Overlay Backdrop */
.zcp-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(3, 7, 18, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 20px 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.zcp-backdrop.zcp-open {
  opacity: 1;
  visibility: visible;
}

/* Modal Box */
.zcp-modal {
  width: 100%;
  max-width: 720px;
  border-radius: 18px;
  background: #0f172a;
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 40px rgba(56, 189, 248, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(-16px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Manrope', -apple-system, sans-serif;
  color: #f8fafc;
}

.zcp-backdrop.zcp-open .zcp-modal {
  transform: translateY(0) scale(1);
}

/* Modal Header & Input */
.zcp-header-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(30, 41, 59, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.zcp-ai-icon {
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(99, 102, 241, 0.2));
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.zcp-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 16px;
  font-weight: 500;
  color: #ffffff;
  font-family: 'Manrope', sans-serif;
}

.zcp-input::placeholder {
  color: #64748b;
  font-weight: 400;
}

.zcp-action-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.zcp-action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.zcp-action-btn.active {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
  animation: zcp-pulse 1s infinite;
}

/* Modal Body */
.zcp-body {
  max-height: 520px;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.zcp-body::-webkit-scrollbar {
  width: 6px;
}

.zcp-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

/* Sections */
.zcp-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Chips / Suggestions Grid */
.zcp-suggestions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
}

.zcp-suggestion-chip {
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: #cbd5e1;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.18s ease;
}

.zcp-suggestion-chip:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.4);
  color: #ffffff;
  transform: translateX(2px);
}

.zcp-chip-icon {
  font-size: 15px;
}

/* Response Container */
.zcp-response-box {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: zcp-fadeIn 0.25s ease;
}

@keyframes zcp-fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.zcp-query-echo {
  font-size: 12px;
  color: #94a3b8;
  font-family: 'IBM Plex Mono', monospace;
  display: flex;
  align-items: center;
  gap: 6px;
}

.zcp-query-echo strong {
  color: #38bdf8;
}

.zcp-response-text {
  font-size: 14px;
  line-height: 1.6;
  color: #e2e8f0;
}

.zcp-response-text strong {
  color: #ffffff;
}

.zcp-response-text ul {
  margin: 6px 0;
  padding-left: 20px;
}

.zcp-response-text li {
  margin-bottom: 4px;
}

/* Metric Cards in Response */
.zcp-metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.zcp-metric-card {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.zcp-metric-card .label {
  font-size: 10px;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 700;
}

.zcp-metric-card .val {
  font-size: 16px;
  font-weight: 800;
  color: #38bdf8;
  font-family: 'IBM Plex Mono', monospace;
  margin-top: 3px;
}

/* Action Buttons in Response */
.zcp-action-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.zcp-btn-jump {
  padding: 7px 14px;
  border-radius: 8px;
  background: #2563eb;
  border: 1px solid #3b82f6;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.zcp-btn-jump:hover {
  background: #1d4ed8;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.zcp-btn-copy {
  padding: 7px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.zcp-btn-copy:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

/* Modal Footer */
.zcp-footer {
  padding: 10px 20px;
  background: rgba(15, 23, 42, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #64748b;
}

.zcp-footer-badges {
  display: flex;
  align-items: center;
  gap: 12px;
}

.zcp-footer-badge {
  display: flex;
  align-items: center;
  gap: 4px;
}
