/* ==========================================================================
   W-AI Intelligent Student Counsellor — Luxury Floating Chat Widget
   Wolfy AI Institute
   ========================================================================== */

:root {
  --wai-gold: #d4af37;
  --wai-gold-light: #f5e6b3;
  --wai-bg-dark: #090c13;
  --wai-bg-card: rgba(15, 19, 29, 0.95);
  --wai-user-bubble: linear-gradient(135deg, #1c2438 0%, #151b2a 100%);
  --wai-bot-bubble: rgba(22, 28, 42, 0.9);
  --wai-border: rgba(212, 175, 55, 0.25);
}

/* Floating Trigger Button */
.wai-chat-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #1a2234 0%, #0d121e 100%);
  border: 1px solid var(--wai-gold);
  border-radius: 50px;
  padding: 10px 18px 10px 12px;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(212, 175, 55, 0.25);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.wai-chat-launcher:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(212, 175, 55, 0.45);
  border-color: var(--wai-gold-light);
}

.wai-launcher-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4af37 0%, #9a7b1c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.5);
  position: relative;
}

.wai-online-pulse {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 10px;
  height: 10px;
  background: #10b981;
  border: 2px solid #090c13;
  border-radius: 50%;
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.wai-launcher-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.wai-launcher-name {
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wai-counsellor-badge {
  font-size: 0.65rem;
  font-family: var(--font-mono, monospace);
  background: rgba(212, 175, 55, 0.18);
  color: var(--wai-gold-light);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.wai-launcher-sub {
  font-size: 0.72rem;
  color: #94a3b8;
}

/* Chat Widget Window */
.wai-chat-window {
  position: fixed;
  bottom: 85px;
  right: 24px;
  width: 420px;
  max-width: calc(100vw - 32px);
  height: 640px;
  max-height: calc(100vh - 110px);
  background: var(--wai-bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--wai-border);
  border-radius: 20px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.9), 0 0 40px rgba(212, 175, 55, 0.15);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.96);
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.wai-chat-window.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Header */
.wai-chat-header {
  padding: 14px 18px;
  background: rgba(10, 13, 20, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wai-header-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wai-avatar-frame {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4af37 0%, #8f6e16 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.35);
  position: relative;
}

.wai-header-info {
  display: flex;
  flex-direction: column;
}

.wai-header-title {
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}

.wai-header-subtitle {
  font-size: 0.72rem;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 4px;
}

.wai-header-subtitle::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  display: inline-block;
}

.wai-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wai-header-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: all 0.2s;
}

.wai-header-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

/* Messages Body */
.wai-chat-body {
  flex: 1;
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 55, 0.3) transparent;
}

.wai-message-row {
  display: flex;
  gap: 10px;
  max-width: 88%;
}

.wai-message-row.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.wai-message-row.bot {
  align-self: flex-start;
}

.wai-bubble-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--wai-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.wai-bubble-content {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #e2e8f0;
}

.wai-message-row.user .wai-bubble-content {
  background: var(--wai-user-bubble);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-top-right-radius: 4px;
  color: #fff;
}

.wai-message-row.bot .wai-bubble-content {
  background: var(--wai-bot-bubble);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top-left-radius: 4px;
}

.wai-bubble-content strong {
  color: var(--wai-gold-light);
  font-weight: 600;
}

.wai-bubble-content p {
  margin: 0 0 8px 0;
}

.wai-bubble-content p:last-child {
  margin-bottom: 0;
}

.wai-bubble-content ul {
  margin: 6px 0 8px 16px;
  padding: 0;
}

.wai-bubble-content li {
  margin-bottom: 4px;
}

/* Quick Suggestion Chips */
.wai-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.wai-chip {
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 0.75rem;
  color: var(--wai-gold-light);
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.wai-chip:hover {
  background: var(--wai-gold);
  color: #080a0f;
  border-color: var(--wai-gold);
  transform: translateY(-1px);
}

/* Lead Capture Card inside chat */
.wai-lead-card {
  background: rgba(10, 14, 24, 0.95);
  border: 1px solid var(--wai-gold);
  border-radius: 12px;
  padding: 14px;
  margin-top: 8px;
}

.wai-lead-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--wai-gold-light);
  margin-bottom: 8px;
}

.wai-lead-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.82rem;
  color: #fff;
  margin-bottom: 8px;
  box-sizing: border-box;
}

.wai-lead-input:focus {
  outline: none;
  border-color: var(--wai-gold);
}

.wai-lead-submit {
  width: 100%;
  background: linear-gradient(135deg, #d4af37 0%, #aa8c2c 100%);
  border: none;
  border-radius: 6px;
  padding: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #080a0f;
  cursor: pointer;
  transition: opacity 0.2s;
}

.wai-lead-submit:hover {
  opacity: 0.92;
}

/* Typing Indicator */
.wai-typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  background: var(--wai-bot-bubble);
  border-radius: 16px;
  border-top-left-radius: 4px;
  width: fit-content;
}

.wai-typing-dot {
  width: 6px;
  height: 6px;
  background: var(--wai-gold);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out;
}

.wai-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.wai-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-5px); opacity: 1; }
}

/* Footer / Input Area */
.wai-chat-footer {
  padding: 12px 14px;
  background: rgba(10, 13, 20, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.wai-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(22, 28, 42, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 25px;
  padding: 6px 6px 6px 14px;
  transition: border-color 0.2s;
}

.wai-input-row:focus-within {
  border-color: var(--wai-gold);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.2);
}

.wai-chat-input {
  flex: 1;
  background: transparent;
  border: none;
  font-size: 0.86rem;
  color: #fff;
  font-family: inherit;
}

.wai-chat-input:focus {
  outline: none;
}

.wai-chat-input::placeholder {
  color: #64748b;
}

.wai-send-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4af37 0%, #aa8c2c 100%);
  border: none;
  color: #080a0f;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  transition: transform 0.2s;
}

.wai-send-btn:hover {
  transform: scale(1.08);
}

.wai-footer-sub {
  font-size: 0.65rem;
  color: #64748b;
  text-align: center;
  margin-top: 6px;
  font-family: var(--font-mono, monospace);
}

@media (max-width: 480px) {
  .wai-chat-window {
    bottom: 0;
    right: 0;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
  }
}

/* Quick Lead Registration Card */
.wai-lead-register-card {
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 12px;
  padding: 14px;
  margin: 10px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.wai-register-heading {
  font-weight: 700;
  color: var(--wai-gold);
  font-size: 0.88rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wai-lead-input {
  width: 100%;
  box-sizing: border-box;
  background: #090c13;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: #fff;
  padding: 8px 12px;
  font-size: 0.85rem;
  margin-bottom: 6px;
  outline: none;
  transition: border-color 0.2s;
}

.wai-lead-input:focus {
  border-color: var(--wai-gold);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.25);
}

.wai-reg-submit-btn {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, #d4af37, #f5e6b3);
  color: #080a0f;
  border: none;
  border-radius: 6px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.wai-reg-footer-link {
  text-align: center;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 8px;
}

.wai-reg-footer-link a {
  color: var(--wai-gold);
  text-decoration: underline;
  font-weight: 600;
}

/* Choice Prompt Box */
.wai-choice-prompt-box {
  padding: 12px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 10px;
  color: #fff;
  font-size: 0.9rem;
  margin: 8px 0;
  line-height: 1.5;
}

/* Job Listings Inside Maya */
.wai-job-listings {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0;
}

.wai-job-item {
  background: rgba(15, 19, 29, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 12px;
  border-left: 3px solid var(--wai-gold);
}

.wai-job-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
}

.wai-job-company {
  font-size: 0.78rem;
  color: #94a3b8;
  margin: 2px 0;
}

.wai-job-meta {
  font-size: 0.75rem;
  color: var(--wai-gold-light);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Course Options Grid */
.wai-course-options-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0;
}

.wai-course-opt-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wai-course-opt-btn:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--wai-gold);
  color: #fff;
  transform: translateX(3px);
}
