/* مساعد الضبع (الشات بوت) */
.dc-launcher{
  position:fixed; left:20px; bottom:calc(20px + env(safe-area-inset-bottom,0px)); z-index:95;
  width:58px; height:58px; border-radius:50%; border:0; cursor:pointer; padding:0;
  display:grid; place-items:center;
  background:linear-gradient(135deg,#E2C9A0,#C6A16B 55%,#A8854F); color:#2a2118;
  box-shadow:0 12px 28px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.35) inset;
  transition:transform .2s, box-shadow .2s;
}
.dc-launcher:hover{ transform:translateY(-3px) scale(1.04); box-shadow:0 16px 34px rgba(0,0,0,.45); }
.dc-launcher svg{ width:28px; height:28px; }
.dc-launcher::after{
  content:""; position:absolute; inset:0; border-radius:50%;
  border:2px solid rgba(198,161,107,.7); animation:dcPulse 2.8s ease-out 1.2s 3;
  pointer-events:none;
}
.dc-launcher.is-open::after{ display:none; }
@keyframes dcPulse{ from{ transform:scale(1); opacity:.9 } to{ transform:scale(1.7); opacity:0 } }

.dc-tip{
  position:fixed; left:88px; bottom:calc(32px + env(safe-area-inset-bottom,0px)); z-index:95;
  background:#fff; color:var(--ink,#343A36); font:600 13px/1.4 'Cairo',sans-serif;
  padding:9px 14px; border-radius:14px 14px 14px 4px; box-shadow:0 10px 26px rgba(0,0,0,.25);
  opacity:0; transform:translateY(6px); pointer-events:none; transition:opacity .3s, transform .3s;
}
.dc-tip.show{ opacity:1; transform:none; }

.dc-panel{
  position:fixed; left:20px; bottom:calc(92px + env(safe-area-inset-bottom,0px)); z-index:95;
  width:min(380px, calc(100vw - 24px)); height:min(560px, calc(100vh - 120px));
  display:flex; flex-direction:column; overflow:hidden;
  background:var(--cream,#F5F1E9); color:var(--ink,#343A36);
  border-radius:20px; border:1px solid rgba(198,161,107,.45);
  box-shadow:0 28px 70px rgba(0,0,0,.45);
  font-family:'Cairo',Tahoma,sans-serif; direction:inherit;
  opacity:0; transform:translateY(14px) scale(.98); transform-origin:bottom left;
  transition:opacity .2s, transform .2s;
}
.dc-panel[hidden]{ display:none; }
.dc-panel.open{ opacity:1; transform:none; }
@supports (height:100dvh){ .dc-panel{ height:min(560px, calc(100dvh - 120px)); } }

.dc-head{
  display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 16px;
  background:linear-gradient(160deg,var(--green,#24382F),var(--deep,#1B2A23)); color:#fff;
  border-bottom:2px solid var(--gold,#C6A16B);
}
.dc-head-txt{ display:flex; flex-direction:column; line-height:1.3; }
.dc-head-txt strong{ font-size:16px; font-weight:800; }
.dc-head-txt span{ font-size:12px; color:#E2C9A0; }
.dc-close{
  width:34px; height:34px; border-radius:50%; border:1px solid rgba(226,201,160,.6);
  background:transparent; color:#fff; cursor:pointer; font-size:15px; flex-shrink:0;
}
.dc-close:hover{ background:rgba(255,255,255,.12); }

.dc-msgs{
  flex:1; overflow-y:auto; padding:16px 14px 8px; display:flex; flex-direction:column; gap:10px;
  -webkit-overflow-scrolling:touch; overscroll-behavior:contain;
}
.dc-row{ display:flex; }
.dc-row.user{ justify-content:flex-start; }
.dc-row.bot{ justify-content:flex-end; }
.dc-bub{
  max-width:88%; padding:10px 14px; border-radius:16px; font-size:14.5px; line-height:1.75; word-wrap:break-word;
}
.dc-row.bot .dc-bub{ background:#fff; border:1px solid rgba(198,161,107,.35); border-bottom-left-radius:4px; box-shadow:0 4px 12px rgba(36,56,47,.08); }
.dc-row.user .dc-bub{ background:linear-gradient(135deg,var(--green,#24382F),#3a4f46); color:#fff; border-bottom-right-radius:4px; }
.dc-bub p + p{ margin-top:6px; }
.dc-ltr{ unicode-bidi:isolate; font-weight:700; }

.dc-btns{ display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.dc-btn{
  display:inline-flex; align-items:center; justify-content:center; text-decoration:none; cursor:pointer;
  font:700 13px/1.2 'Cairo',sans-serif; padding:9px 14px; border-radius:999px; border:0;
  background:linear-gradient(135deg,#E2C9A0,#C6A16B 55%,#A8854F); color:#2a2118;
  box-shadow:0 5px 14px rgba(198,161,107,.4); transition:transform .15s;
}
.dc-btn:hover{ transform:translateY(-2px); }

.dc-typing{ display:flex; gap:5px; padding:14px 16px; }
.dc-typing i{ width:7px; height:7px; border-radius:50%; background:#A8854F; animation:dcDot 1s infinite ease-in-out; }
.dc-typing i:nth-child(2){ animation-delay:.15s } .dc-typing i:nth-child(3){ animation-delay:.3s }
@keyframes dcDot{ 0%,60%,100%{ transform:translateY(0); opacity:.4 } 30%{ transform:translateY(-5px); opacity:1 } }

.dc-chips{ display:flex; flex-wrap:wrap; gap:7px; padding:6px 14px 10px; max-height:104px; overflow-y:auto; }
.dc-chips:empty{ display:none; }
.dc-chip{
  font:600 12.5px/1.2 'Cairo',sans-serif; padding:7px 12px; border-radius:999px; cursor:pointer;
  background:#fff; color:var(--green,#24382F); border:1px solid rgba(198,161,107,.6); transition:background .15s, border-color .15s;
}
.dc-chip:hover{ background:#f3e6cf; border-color:var(--gold,#C6A16B); }

.dc-form{ display:flex; gap:8px; padding:10px 12px calc(12px + env(safe-area-inset-bottom,0px)); border-top:1px solid rgba(198,161,107,.35); background:#fbf7f0; }
.dc-input{
  flex:1; min-width:0; font:400 16px 'Cairo',sans-serif; color:var(--ink,#343A36);
  padding:11px 16px; border-radius:999px; border:1px solid rgba(198,161,107,.55); background:#fff; outline:none;
}
.dc-input:focus{ border-color:var(--gold,#C6A16B); box-shadow:0 0 0 3px rgba(198,161,107,.25); }
.dc-send{
  width:44px; height:44px; flex-shrink:0; border-radius:50%; border:0; cursor:pointer; display:grid; place-items:center;
  background:linear-gradient(135deg,var(--green,#24382F),var(--deep,#1B2A23)); color:#E2C9A0;
}
.dc-send svg{ width:20px; height:20px; transform:scaleX(-1); }
.dc-send:hover{ filter:brightness(1.2); }

@media (max-width:640px){
  .dc-launcher{ width:54px; height:54px; left:14px; bottom:calc(14px + env(safe-area-inset-bottom,0px)); }
  .dc-tip{ left:78px; bottom:calc(24px + env(safe-area-inset-bottom,0px)); }
  .dc-panel{ left:10px; right:10px; width:auto; bottom:calc(80px + env(safe-area-inset-bottom,0px)); border-radius:18px; }
}
@media (prefers-reduced-motion:reduce){
  .dc-launcher::after, .dc-typing i{ animation:none; }
  .dc-panel, .dc-tip, .dc-launcher{ transition:none; }
}
