/* ============================================================
   Aerozone Job Chatbot — Stylesheet
   /wp-content/plugins/aerozone-chatbot/chatbot.css
   ============================================================ */

/* ── Chat container ─────────────────────────────────────────── */
.az-chat-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
}

/* ── Header ─────────────────────────────────────────────────── */
.az-chat-header {
  padding: 13px 16px;
  border-bottom: 1px solid #eeeeee;
  display: flex;
  align-items: center;
  gap: 11px;
  background: #fafafa;
  flex-shrink: 0;
}
.az-logo {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: #185FA5;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.az-ch-info p  { font-size: 14px; font-weight: 600; color: #111; margin: 0; }
.az-ch-info span { font-size: 12px; color: #888; }
.az-online-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; flex-shrink: 0; margin-left: auto; }
.az-job-label  { display: block; }

/* ── Messages ────────────────────────────────────────────────── */
.az-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}
.az-msg { display: flex; gap: 8px; max-width: 86%; }
.az-msg--user { align-self: flex-end;  flex-direction: row-reverse; }
.az-msg--bot  { align-self: flex-start; }

.az-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #185FA5;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: #fff; font-weight: 700;
  flex-shrink: 0; margin-top: 2px;
}
.az-msg--user .az-avatar { background: #e5e7eb; color: #555; }

.az-bubble {
  padding: 9px 13px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.6;
  word-wrap: break-word;
}
.az-msg--bot  .az-bubble { background: #f3f4f6; color: #111; border-radius: 4px 16px 16px 16px; }
.az-msg--user .az-bubble { background: #185FA5; color: #fff; border-radius: 16px 4px 16px 16px; }
.az-msg--user .az-bubble a { color: #bfdbfe; }
.az-msg--bot  .az-bubble a { color: #185FA5; }

/* ── Typing indicator ────────────────────────────────────────── */
.az-typing span {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #999;
  margin: 0 2px;
  animation: az-bounce 1.1s infinite;
}
.az-typing span:nth-child(2) { animation-delay: 0.2s; }
.az-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes az-bounce {
  0%,60%,100% { transform: translateY(0); }
  30%          { transform: translateY(-6px); }
}

/* ── Job cards ───────────────────────────────────────────────── */
.az-job-card {
  display: block;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.az-job-card:hover { border-color: #185FA5; box-shadow: 0 2px 8px rgba(24,95,165,0.12); }
.az-jt { font-weight: 600; color: #111; font-size: 13px; }
.az-jc { color: #185FA5; font-size: 12px; margin-top: 2px; }
.az-jm { color: #666; font-size: 11.5px; margin-top: 4px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.az-tag { background: #dbeafe; color: #1e40af; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 500; }

/* ── Suggestion chips ────────────────────────────────────────── */
.az-chips {
  padding: 7px 12px 4px;
  display: flex; flex-wrap: wrap; gap: 6px;
  flex-shrink: 0;
}
.az-chip {
  font-size: 12px; padding: 4px 11px;
  border-radius: 20px;
  border: 1px solid #d1d5db;
  background: #fff; color: #555;
  cursor: pointer; white-space: nowrap;
  font-family: inherit;
  transition: all 0.15s;
}
.az-chip:hover { background: #f3f4f6; border-color: #185FA5; color: #185FA5; }

/* ── Input row ───────────────────────────────────────────────── */
.az-input-row {
  display: flex; gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #eee;
  flex-shrink: 0;
}
.az-user-input {
  flex: 1;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 13.5px;
  font-family: inherit;
  background: #f9fafb; color: #111;
  outline: none; resize: none;
  min-height: 36px; max-height: 100px;
  transition: border-color 0.15s;
}
.az-user-input:focus { border-color: #185FA5; background: #fff; }
.az-send-btn {
  width: 36px; height: 36px;
  border-radius: 10px; border: none;
  background: #185FA5; color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}
.az-send-btn:hover    { background: #0C447C; }
.az-send-btn:disabled { background: #93c5fd; cursor: not-allowed; }

/* ── Inline shortcode embed ──────────────────────────────────── */
.az-chatbot-inline { display: block; min-height: 400px; }

/* ── Floating FAB button ─────────────────────────────────────── */
#az-chat-fab {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 9998;
  background: #185FA5; color: #fff;
  border: none; border-radius: 28px;
  padding: 12px 20px 12px 16px;
  display: flex; align-items: center; gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(24,95,165,0.35);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px; font-weight: 600;
  transition: background 0.15s, transform 0.15s;
  user-select: none;
}
#az-chat-fab:hover { background: #0C447C; transform: translateY(-2px); }
.az-fab-label { color: #fff; }
.az-fab-close { color: #fff; font-size: 16px; }

/* ── Floating popup ──────────────────────────────────────────── */
#az-chat-popup {
  position: fixed;
  bottom: 84px; right: 24px;
  z-index: 9999;
  width: 380px;
  height: 560px;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  overflow: hidden;
  background: #fff;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 480px) {
  #az-chat-popup { width: calc(100vw - 24px); right: 12px; bottom: 76px; height: 70vh; }
  #az-chat-fab   { bottom: 16px; right: 12px; padding: 10px 16px 10px 12px; }
}
