/* ===== Assistant Designet (chatbot) ===== */
.ds-chat { position: fixed; bottom: 20px; right: 20px; z-index: 1900; font-family: inherit; }
[dir="rtl"] .ds-chat { right: auto; left: 20px; }
.ds-chat-fab {
  width: 58px; height: 58px; border-radius: 50%; border: 0; color: #fff; font-size: 1.5rem;
  background: linear-gradient(135deg, var(--ds-blue, #1e7fc1), var(--ds-cyan, #29aae2));
  box-shadow: 0 10px 28px rgba(30, 127, 193, .45); display: flex; align-items: center; justify-content: center;
  transition: transform .2s;
}
.ds-chat-fab:hover { transform: scale(1.07); }
.ds-chat-panel {
  position: absolute; bottom: 72px; right: 0; width: 370px; max-width: calc(100vw - 32px);
  height: 520px; max-height: calc(100vh - 120px); display: flex; flex-direction: column; overflow: hidden;
  background: var(--bs-body-bg, #fff); color: var(--bs-body-color, #1f2d3d);
  border-radius: 20px; box-shadow: 0 18px 60px rgba(15, 47, 79, .35); border: 1px solid rgba(120, 150, 180, .25);
}
.ds-chat-panel[hidden] { display: none; }
[dir="rtl"] .ds-chat-panel { right: auto; left: 0; }
.ds-chat-head {
  display: flex; align-items: center; gap: .7rem; padding: .85rem 1rem; color: #fff;
  background: linear-gradient(135deg, #17406a, #1e7fc1);
}
.ds-chat-head small { opacity: .85; }
.ds-chat-close { background: transparent; border: 0; color: #fff; opacity: .85; font-size: 1.05rem; }
.ds-chat-body { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .6rem; background: rgba(120, 150, 180, .06); }
.ds-msg { max-width: 86%; padding: .6rem .85rem; border-radius: 16px; font-size: .88rem; line-height: 1.5; word-wrap: break-word; }
.ds-msg a { color: inherit; text-decoration: underline; word-break: break-all; }
.ds-msg.bot { align-self: flex-start; background: var(--bs-body-bg, #fff); border: 1px solid rgba(120, 150, 180, .3); border-bottom-left-radius: 4px; }
.ds-msg.user { align-self: flex-end; color: #fff; background: linear-gradient(135deg, #1e7fc1, #29aae2); border-bottom-right-radius: 4px; }
[dir="rtl"] .ds-msg.bot { align-self: flex-end; border-bottom-left-radius: 16px; border-bottom-right-radius: 4px; }
[dir="rtl"] .ds-msg.user { align-self: flex-start; border-bottom-right-radius: 16px; border-bottom-left-radius: 4px; }
.ds-typing span { display: inline-block; width: 7px; height: 7px; margin: 0 2px; border-radius: 50%; background: #8fa3ba; animation: dsDot 1s infinite ease-in-out; }
.ds-typing span:nth-child(2) { animation-delay: .15s; }
.ds-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes dsDot { 0%, 80%, 100% { transform: scale(.6); opacity: .5; } 40% { transform: scale(1); opacity: 1; } }
.ds-chat-suggest { display: flex; flex-wrap: wrap; gap: .4rem; padding: .5rem .8rem 0; }
.ds-chat-suggest button {
  border: 1px solid #1e7fc1; color: #1e7fc1; background: transparent; border-radius: 99px; padding: .25rem .7rem; font-size: .75rem;
}
.ds-chat-suggest button:hover { background: #1e7fc1; color: #fff; }
.ds-chat-form { display: flex; gap: .5rem; padding: .7rem .8rem; }
.ds-chat-form input {
  flex: 1; border: 1px solid rgba(120, 150, 180, .45); border-radius: 12px; padding: .55rem .8rem; font-size: .88rem;
  background: var(--bs-body-bg, #fff); color: inherit; min-width: 0;
}
.ds-chat-form input:focus { outline: 0; border-color: #29aae2; box-shadow: 0 0 0 .15rem rgba(41, 170, 226, .2); }
.ds-chat-form button { width: 42px; border: 0; border-radius: 12px; color: #fff; background: linear-gradient(135deg, #1e7fc1, #29aae2); }
[dir="rtl"] .ds-chat-form button i { transform: scaleX(-1); display: inline-block; }
@media (max-width: 480px) {
  .ds-chat { bottom: 14px; right: 14px; }
  [dir="rtl"] .ds-chat { left: 14px; }
  .ds-chat-panel { height: calc(100vh - 100px); }
}
