/* Afzina Assistant Chat Widget */
:root {
  --afzina-color: #0ea5e9;
  --afzina-bg: #f8fafc;
  --afzina-panel: #ffffff;
  --afzina-text: #111827;
  --afzina-bot-bg: #ffffff;
  --afzina-user-bg: #0ea5e9;
  --afzina-border: #e5e7eb;
}
.afzina-dark {
  --afzina-bg: #0b1220;
  --afzina-panel: #0f172a;
  --afzina-text: #e5e7eb;
  --afzina-bot-bg: #111827;
  --afzina-user-bg: #2563eb;
  --afzina-border: #1f2937;
}

.afzina-chat-fab {
  position: fixed; z-index: 99999; bottom: 18px; right: 18px;
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; background: linear-gradient(135deg, var(--afzina-color), #7c3aed);
  box-shadow: 0 12px 28px rgba(0,0,0,.25); cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.afzina-chat-fab.left { right: auto; left: 18px; }
.afzina-chat-fab:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 16px 34px rgba(0,0,0,.28); }
.afzina-chat-box {
  position: fixed; z-index: 99999; bottom: 86px; right: 18px;
  width: 360px; max-width: calc(100% - 36px); height: 480px;
  background: var(--afzina-panel); color: var(--afzina-text);
  border-radius: 12px; overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,.25); display: flex; flex-direction: column;
  opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}
.afzina-chat-box.left { right: auto; left: 18px; }
.afzina-chat-box.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.afzina-chat-header {
  background: linear-gradient(135deg, var(--afzina-color), #7c3aed);
  color: #fff; padding: 14px; font-weight: 600; display: flex; align-items: center; justify-content: space-between;
}
.afzina-chat-body {
  padding: 12px; flex: 1; background: var(--afzina-bg); overflow-y: auto;
}
.afzina-typing { display: inline-block; background: var(--afzina-bot-bg); color: var(--afzina-text); padding: 8px 10px; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.afzina-typing .dot { display:inline-block; width:6px; height:6px; margin:0 2px; background: var(--afzina-text); border-radius:50%; animation: blink 1.2s infinite ease-in-out; }
.afzina-typing .dot:nth-child(2){ animation-delay: .2s; }
.afzina-typing .dot:nth-child(3){ animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity:.2 } 40% { opacity:1 } }
.afzina-msg { margin: 8px 0; max-width: 80%; padding: 10px 12px; border-radius: 12px; line-height: 1.4; font-size: 14px; }
.afzina-msg.user { background: var(--afzina-user-bg); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.afzina-msg.bot { background: var(--afzina-bot-bg); color: var(--afzina-text); margin-right: auto; border-bottom-left-radius: 4px; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.afzina-chat-input { display: flex; gap: 8px; padding: 12px; background: var(--afzina-panel); border-top: 1px solid var(--afzina-border); }
.afzina-chat-input input { flex: 1; border: 1px solid var(--afzina-border); background: var(--afzina-panel); color: var(--afzina-text); border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.afzina-chat-input button { border: 0; background: var(--afzina-color); color: #fff; padding: 10px 14px; border-radius: 8px; font-weight: 600; cursor: pointer; }
.afzina-chat-close { background: rgba(255,255,255,.2); color: #fff; border: 0; border-radius: 6px; padding: 6px 8px; cursor: pointer; }

/* Login guard view */
.afzina-login-guard { background: linear-gradient(135deg, #0ea5e9, #7c3aed); color: #fff; padding: 18px; border-radius: 12px; text-align: center; box-shadow: 0 10px 24px rgba(0,0,0,.25); margin: 18px 6px; }
.afzina-login-guard .title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.afzina-login-guard .desc { opacity: .95; margin-bottom: 14px; }
.afzina-login-actions { display: flex; gap: 10px; justify-content: center; }
.afzina-login-btn { display: inline-block; background: #111827; color: #fff; padding: 10px 16px; border-radius: 999px; font-weight: 700; text-decoration: none; box-shadow: 0 8px 20px rgba(0,0,0,.2); transition: transform .12s ease, box-shadow .12s ease; }
.afzina-login-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(0,0,0,.28); }
