#azChatRoot{
  --az-bg:#071427;
  --az-bg-2:#0f213d;
  --az-panel:#ffffff;
  --az-text:#0f172a;
  --az-soft:#f6f8fc;
  --az-soft-2:#edf2f7;
  --az-border:#d7deea;
  --az-muted:#64748b;
  --az-gold:#c59b31;
  --az-gold-dark:#9c7416;
  --az-success:#18a957;
  --az-shadow:0 18px 50px rgba(2,8,23,.24);
  --az-radius:24px;
  font-family:Tahoma,'Segoe UI',Arial,sans-serif;
  direction:rtl;
}

#azChatRoot button,
#azChatRoot input{
  font-family:inherit;
}

.az-chat-launcher{
  position:fixed;
  right:22px;
  bottom:24px;
  z-index:9995;
  width:68px;
  height:68px;
  border:none;
  border-radius:50%;
  background:linear-gradient(135deg,var(--az-bg),var(--az-bg-2));
  box-shadow:0 12px 28px rgba(7,20,39,.35),0 0 0 3px rgba(197,155,49,.24);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:transform .18s ease, box-shadow .18s ease;
  overflow:hidden;
}
.az-chat-launcher:hover{transform:translateY(-2px) scale(1.02);box-shadow:0 16px 34px rgba(7,20,39,.42),0 0 0 3px rgba(197,155,49,.32)}
.az-chat-launcher img{width:100%;height:100%;object-fit:cover}
.az-chat-launcher-badge{
  position:absolute;top:4px;left:4px;width:17px;height:17px;border-radius:50%;background:#ef4444;border:2px solid #fff;
}

.az-chat-teaser{
  position:fixed;
  right:24px;
  bottom:104px;
  z-index:9994;
  max-width:250px;
  background:linear-gradient(135deg,var(--az-bg),var(--az-bg-2));
  color:#fff;
  border:1px solid rgba(255,255,255,.12);
  border-right:4px solid var(--az-gold);
  border-radius:18px 18px 4px 18px;
  box-shadow:var(--az-shadow);
  padding:12px 42px 12px 14px;
  line-height:1.7;
  font-size:13px;
  cursor:pointer;
  display:none;
}
.az-chat-teaser-close{
  position:absolute;top:9px;left:10px;background:none;border:none;color:rgba(255,255,255,.7);cursor:pointer;font-size:14px;line-height:1;padding:2px;
}

.az-chat-window{
  position:fixed;
  right:22px;
  bottom:106px;
  z-index:9996;
  width:410px;
  max-width:calc(100vw - 24px);
  height:clamp(480px, calc(100vh - 118px), 760px);
  max-height:calc(100vh - 24px);
  border-radius:var(--az-radius);
  background:var(--az-panel);
  box-shadow:var(--az-shadow);
  border:1px solid rgba(15,23,42,.08);
  overflow:hidden;
  display:none;
  flex-direction:column;
}
.az-chat-window.is-open{display:flex}

.az-chat-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 16px;
  background:linear-gradient(135deg,var(--az-bg),var(--az-bg-2));
  color:#fff;
  flex:0 0 auto;
  position:relative;
  z-index:2;
}
.az-chat-head-main{display:flex;align-items:center;gap:10px;min-width:0}
.az-chat-head-logo{width:42px;height:42px;object-fit:contain;display:block;flex:0 0 auto;filter:drop-shadow(0 4px 10px rgba(0,0,0,.18));}
.az-chat-head-title{font-size:16px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.az-chat-head-sub{display:block;font-size:12px;color:rgba(255,255,255,.72);margin-top:3px}
.az-chat-head-close{
  width:38px;height:38px;border-radius:50%;border:1px solid rgba(255,255,255,.15);background:rgba(255,255,255,.06);color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;flex:0 0 auto;
}
.az-chat-head-close:hover{background:rgba(255,255,255,.12)}

.az-chat-body{flex:1;min-height:0;display:flex;flex-direction:column;background:linear-gradient(180deg,#f8fafc 0%, #eef3f8 100%)}
.az-chat-messages{flex:1;min-height:220px;overflow:auto;padding:16px 14px 10px;display:flex;flex-direction:column;gap:10px;scroll-behavior:smooth}
.az-chat-messages::-webkit-scrollbar{width:5px}
.az-chat-messages::-webkit-scrollbar-thumb{background:#ced8e6;border-radius:999px}

.az-msg{display:flex;gap:8px;max-width:92%;align-items:flex-end;animation:azFade .18s ease}
.az-msg.bot{align-self:flex-end;flex-direction:row-reverse}
.az-msg.user{align-self:flex-start}
@keyframes azFade{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.az-msg-avatar{width:28px;height:28px;border-radius:50%;overflow:hidden;flex:0 0 auto;border:1px solid rgba(15,23,42,.08)}
.az-msg-avatar img{width:100%;height:100%;object-fit:cover}
.az-msg-card{display:flex;flex-direction:column;gap:4px;min-width:0}
.az-msg-bubble{
  border-radius:18px;
  padding:11px 14px;
  line-height:1.8;
  font-size:13px;
  word-break:break-word;
}
.az-msg.bot .az-msg-bubble{background:var(--az-bg);color:#fff;border-top-right-radius:6px}
.az-msg.user .az-msg-bubble{background:#fff;color:var(--az-text);border:1px solid var(--az-border);border-top-left-radius:6px}
.az-msg-time{font-size:10px;color:#94a3b8;padding:0 4px}
.az-msg.bot .az-msg-time{text-align:right}
.az-msg.user .az-msg-time{text-align:left}
.az-msg-bubble a{color:#ffe08a;font-weight:700;text-decoration:none}
.az-msg-bubble a:hover{text-decoration:underline}

.az-typing{
  align-self:flex-end;
  display:flex;
  align-items:center;
  gap:5px;
  background:var(--az-bg);
  color:#fff;
  border-radius:16px 16px 16px 6px;
  padding:10px 12px;
}
.az-typing span{width:6px;height:6px;border-radius:50%;background:rgba(255,255,255,.72);animation:azTyping 1.3s infinite}
.az-typing span:nth-child(2){animation-delay:.15s}
.az-typing span:nth-child(3){animation-delay:.3s}
@keyframes azTyping{0%,60%,100%{transform:none;opacity:.35}30%{transform:translateY(-4px);opacity:1}}

.az-chat-actions,
.az-chat-quick{
  padding:10px 12px;
  background:#fff;
  border-top:1px solid var(--az-border);
  flex:0 0 auto;
}
.az-chat-actions:empty,
.az-chat-quick:empty{display:none}
.az-chat-quick.is-hidden{display:none}
.az-chat-actions-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.az-chat-quick-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}
.az-action-chip,
.az-quick-btn,
.az-card-btn{
  border:1px solid var(--az-border);
  background:var(--az-soft);
  color:var(--az-text);
  border-radius:13px;
  padding:10px 11px;
  font-size:11.5px;
  font-weight:700;
  line-height:1.5;
  cursor:pointer;
  transition:border-color .18s ease, background .18s ease, transform .12s ease;
}
.az-action-chip:hover,
.az-quick-btn:hover,
.az-card-btn:hover{border-color:rgba(197,155,49,.58);background:#fff9ec}
.az-action-chip:active,
.az-quick-btn:active,
.az-card-btn:active{transform:scale(.98)}
.az-quick-label,
.az-actions-label{font-size:11px;color:var(--az-muted);margin-bottom:8px;font-weight:700}
.az-quick-label{display:none}
.az-quick-btn{
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  min-height:44px;
  padding:9px 10px;
}

.az-chat-composer{
  padding:12px 14px 14px;
  background:#fff;
  border-top:1px solid var(--az-border);
  display:flex;
  gap:8px;
  align-items:center;
}

.az-chat-service-toggle{
  flex:0 0 auto;
  height:34px;
  padding:0 12px;
  border-radius:999px;
  border:1px solid var(--az-border);
  background:#fff;
  color:var(--az-text);
  font-size:11px;
  font-weight:800;
  line-height:1;
  cursor:pointer;
  white-space:nowrap;
}
.az-chat-service-toggle:hover{border-color:rgba(197,155,49,.58);background:#fff9ec}
.az-chat-service-toggle.is-hidden{display:none}
.az-chat-input{
  flex:1;min-width:0;height:46px;border-radius:999px;border:1px solid var(--az-border);background:var(--az-soft);padding:0 16px;font-size:16px;color:var(--az-text);outline:none;touch-action:manipulation;-webkit-text-size-adjust:100%;
}
.az-chat-input:focus{border-color:rgba(197,155,49,.7);background:#fff;box-shadow:0 0 0 4px rgba(197,155,49,.08)}
.az-chat-send{
  width:46px;height:46px;border:none;border-radius:50%;background:linear-gradient(135deg,var(--az-bg),var(--az-bg-2));color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 8px 18px rgba(7,20,39,.2);touch-action:manipulation
}
.az-chat-send:hover{transform:translateY(-1px)}

.az-cars{display:grid;gap:8px;margin-top:6px}
.az-car-card{background:#fff;border:1px solid var(--az-border);border-radius:18px;padding:10px;display:grid;grid-template-columns:84px 1fr;gap:10px;color:var(--az-text)}
.az-car-card-thumb{width:84px;height:64px;border-radius:12px;overflow:hidden;background:#e5edf6}
.az-car-card-thumb img{width:100%;height:100%;object-fit:cover}
.az-car-card-title{font-size:13px;font-weight:800;line-height:1.5;margin-bottom:3px}
.az-car-card-meta{font-size:11px;color:var(--az-muted);line-height:1.6}
.az-car-card-price{font-size:12px;color:var(--az-gold-dark);font-weight:800;margin-top:4px}
.az-car-card-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.az-card-btn{padding:8px 10px;border-radius:999px;background:#fff}
.az-card-btn--primary{background:linear-gradient(135deg,var(--az-bg),var(--az-bg-2));color:#fff;border-color:transparent}
.az-card-btn--primary:hover{background:linear-gradient(135deg,var(--az-bg-2),var(--az-bg))}

.az-compare-box{background:#fff;border:1px solid var(--az-border);border-radius:18px;padding:12px;margin-top:6px}
.az-compare-box ul{margin:0;padding:0 18px 0 0}
.az-compare-box li{margin:0 0 6px;color:var(--az-text);line-height:1.7;font-size:12px}

@media (max-width: 640px){
  .az-chat-window{
    right:10px;
    left:10px;
    bottom:84px;
    width:auto;
    height:min(78dvh, calc(100dvh - 98px));
    max-height:calc(100dvh - 10px);
    border-radius:20px;
  }
  .az-chat-head{padding:12px 14px}
  .az-chat-head-logo{width:38px;height:38px}
  .az-chat-head-title{font-size:15px}
  .az-chat-head-sub{font-size:11px}
  .az-chat-head-close{width:36px;height:36px}
  .az-chat-messages{padding:14px 12px 8px}
  .az-chat-actions,
  .az-chat-quick{padding:8px 10px}
  .az-chat-composer{padding:10px 12px 12px}
  .az-chat-input{height:44px;font-size:13px;padding:0 14px}
  .az-chat-send{width:44px;height:44px}
  .az-chat-launcher{right:14px;bottom:14px;width:60px;height:60px}
  .az-chat-teaser{right:12px;left:12px;bottom:82px;max-width:none}
  .az-chat-actions-grid,.az-chat-quick-grid{grid-template-columns:1fr 1fr}
}

@media (max-width: 420px){
  .az-chat-window{
    right:8px;
    left:8px;
    bottom:78px;
    height:min(76dvh, calc(100dvh - 88px));
    max-height:calc(100dvh - 8px);
    border-radius:18px;
  }
  .az-chat-head{padding:11px 12px}
  .az-chat-head-main{gap:8px}
  .az-chat-head-logo{width:34px;height:34px}
  .az-chat-head-title{font-size:14px}
  .az-chat-head-sub{font-size:10px}
  .az-msg{max-width:96%}
  .az-msg-bubble{font-size:12.5px;padding:10px 12px}
  .az-chat-quick-grid{grid-template-columns:1fr}
  .az-chat-actions-grid{grid-template-columns:1fr 1fr}
  .az-quick-btn{min-height:40px;font-size:11px}
  .az-car-card{grid-template-columns:1fr}
  .az-car-card-thumb{width:100%;height:118px}
}


@media (max-width: 768px){
  .az-chat-composer{padding:10px 12px 12px;gap:6px}
  .az-chat-input{font-size:16px;height:44px;padding:0 14px}
  .az-chat-send{width:44px;height:44px}
  .az-chat-service-toggle{height:31px;padding:0 10px;font-size:10.5px}
}
