/* ============================================================
   AWD Promotional Popup + Community Chat CSS
   ============================================================ */

/* ── PROMO POPUP ─────────────────────────────────────────── */
#awd-promo-popup {
  position: fixed;
  bottom: 90px;
  left: 24px;
  width: 320px;
  z-index: 99998;
  transform: translateX(-120%) scale(0.9);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.34,1.56,0.64,1), opacity 0.35s ease;
  pointer-events: none;
}
#awd-promo-popup.popup-visible {
  transform: translateX(0) scale(1);
  opacity: 1;
  pointer-events: all;
}
.popup-card {
  background: linear-gradient(145deg, #0d1e38, #0a1628);
  border: 1px solid rgba(201,150,60,0.35);
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(201,150,60,0.1);
  position: relative;
  overflow: hidden;
}
.popup-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #c9963c, transparent);
  animation: popup-shimmer 2s ease-in-out infinite;
}
@keyframes popup-shimmer {
  0%,100% { opacity: 0.4; } 50% { opacity: 1; }
}
.popup-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #c9963c, #f0c060);
  color: #0a1628;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 20px;
  font-family: Inter, sans-serif;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.popup-title {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  line-height: 1.35;
  margin: 0 0 8px;
}
.popup-body {
  font-size: 12.5px;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
  font-family: Inter, sans-serif;
  margin: 0 0 14px;
}
.popup-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.popup-cta {
  flex: 1;
  background: linear-gradient(135deg, #c9963c, #a07830);
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  padding: 9px 14px;
  border-radius: 10px;
  text-align: center;
  font-family: Inter, sans-serif;
  transition: filter 0.2s;
  display: block;
}
.popup-cta:hover { filter: brightness(1.1); }
.popup-dismiss {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.4);
  font-size: 11px;
  padding: 9px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-family: Inter, sans-serif;
  transition: all 0.2s;
}
.popup-dismiss:hover { color: #fff; background: rgba(255,255,255,0.12); }
.popup-close-btn {
  position: absolute;
  top: 12px; right: 12px;
  width: 22px; height: 22px;
  background: rgba(255,255,255,0.07);
  border: none;
  border-radius: 50%;
  color: rgba(255,255,255,0.5);
  font-size: 12px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.popup-close-btn:hover { background: rgba(255,255,255,0.15); color: #fff; }
.popup-timer-bar {
  height: 2px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  margin-top: 12px;
  overflow: hidden;
}
.popup-timer-fill {
  height: 100%;
  background: linear-gradient(90deg, #c9963c, #f0c060);
  border-radius: 2px;
  animation: timer-drain 30s linear forwards;
}
@keyframes timer-drain {
  from { width: 100%; } to { width: 0%; }
}

/* ── COMMUNITY CHAT SECTION ──────────────────────────────── */
#community-chat {
  background: linear-gradient(180deg, #060d1a 0%, #08111f 100%);
  padding: 72px 0;
}
.chat-section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 800px) {
  .chat-section-inner { grid-template-columns: 1fr; }
}
.chat-section-left h2 {
  font-size: 36px;
  font-weight: 800;
  color: #fff;
  font-family: 'Playfair Display', serif;
  line-height: 1.2;
  margin: 0 0 14px;
}
.chat-section-left p {
  color: rgba(255,255,255,0.5);
  font-size: 14px;
  line-height: 1.8;
  font-family: Inter, sans-serif;
  margin: 0 0 28px;
}
.chat-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.chat-stat {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 14px 20px;
  text-align: center;
}
.chat-stat-num {
  font-size: 22px;
  font-weight: 800;
  color: #c9963c;
  font-family: 'Playfair Display', serif;
}
.chat-stat-label {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  font-family: Inter, sans-serif;
}
/* Chat Box */
.chat-box {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 520px;
}
.chat-box-header {
  background: linear-gradient(135deg, #0d1e38, #0a1628);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-online-dot {
  width: 8px; height: 8px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 6px #22c55e;
  animation: pulse-green 2s ease-in-out infinite;
}
@keyframes pulse-green {
  0%,100%{box-shadow:0 0 4px #22c55e} 50%{box-shadow:0 0 12px #22c55e}
}
.chat-box-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  font-family: Inter, sans-serif;
}
.chat-box-subtitle {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  font-family: Inter, sans-serif;
  margin-left: auto;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
.chat-msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  animation: msg-appear 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes msg-appear {
  from { opacity: 0; transform: translateY(10px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.chat-msg.msg-user { flex-direction: row-reverse; }
.chat-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-family: Inter, sans-serif;
}
.chat-msg-bubble {
  max-width: 75%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 12.5px;
  line-height: 1.55;
  font-family: Inter, sans-serif;
}
.msg-visitor .chat-avatar { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.7); }
.msg-visitor .chat-msg-bubble { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.8); border-radius: 4px 14px 14px 14px; }
.msg-ai .chat-avatar { background: linear-gradient(135deg,#c9963c,#a07830); color: #fff; }
.msg-ai .chat-msg-bubble { background: linear-gradient(135deg, rgba(201,150,60,0.12), rgba(160,120,48,0.08)); border: 1px solid rgba(201,150,60,0.2); color: #fff; border-radius: 14px 4px 14px 14px; }
.msg-user .chat-avatar { background: linear-gradient(135deg,#3b82f6,#1d4ed8); color: #fff; }
.msg-user .chat-msg-bubble { background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(29,78,216,0.15)); border: 1px solid rgba(59,130,246,0.25); color: #fff; border-radius: 14px 4px 14px 14px; }
.chat-msg-meta {
  font-size: 10px;
  color: rgba(255,255,255,0.3);
  font-family: Inter, sans-serif;
  margin-top: 3px;
}
.chat-typing {
  display: flex; gap: 4px; padding: 10px 13px;
  background: rgba(201,150,60,0.08);
  border: 1px solid rgba(201,150,60,0.15);
  border-radius: 14px 4px 14px 14px;
  width: fit-content;
}
.chat-typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: #c9963c; animation: typing-dot 1.2s ease-in-out infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-dot { 0%,60%,100%{transform:scale(0.7);opacity:0.4} 30%{transform:scale(1);opacity:1} }
/* Input area */
.chat-input-area {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 12px 16px;
  display: flex;
  gap: 10px;
  align-items: center;
  background: rgba(255,255,255,0.02);
}
.chat-input-field {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  color: #fff;
  font-size: 13px;
  font-family: Inter, sans-serif;
  padding: 9px 14px;
  outline: none;
  transition: border-color 0.2s;
}
.chat-input-field:focus { border-color: rgba(201,150,60,0.4); }
.chat-input-field::placeholder { color: rgba(255,255,255,0.25); }
.chat-send-btn {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, #c9963c, #a07830);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: filter 0.2s;
}
.chat-send-btn:hover { filter: brightness(1.15); }
.chat-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }
