#mai-root {
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  direction: rtl;
}

.mai-fab {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 99999;
  background: linear-gradient(135deg, #00B4D8, #1E88E5);
  color: #fff;
  border-radius: 30px;
  padding: 13px 20px 13px 16px;
  display: flex;
  align-items: center;
  gap: 9px;
  box-shadow: 0 10px 26px rgba(11,37,69,.28);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  border: none;
}
.mai-fab .mai-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #8FE3FF;
  box-shadow: 0 0 0 4px rgba(143,227,255,.3);
}

.mai-panel {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 99999;
  width: 340px;
  max-width: calc(100vw - 40px);
  height: 460px;
  max-height: calc(100vh - 100px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(18,23,43,.25);
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.mai-panel.mai-open { display: flex; }

.mai-header {
  background: #0B2545;
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mai-header b { font-size: 14px; }
.mai-header span { font-size: 11px; color: #7EA0C4; display:block; }
.mai-close {
  background: none; border: none; color: #D6E4F0; font-size: 18px; cursor: pointer;
}

.mai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #F2F6FA;
}

.mai-msg {
  max-width: 85%;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.8;
}
.mai-msg.mai-bot {
  background: #fff;
  color: #1B2233;
  border: 1px solid #E1EAF2;
  align-self: flex-start;
  border-bottom-right-radius: 3px;
}
.mai-msg.mai-user {
  background: #0B2545;
  color: #fff;
  align-self: flex-end;
  border-bottom-left-radius: 3px;
}
.mai-msg.mai-error {
  background: #FEECEC;
  color: #B3261E;
  border: 1px solid #F3C6C6;
  align-self: flex-start;
}

.mai-suggestions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-self: flex-start;
  max-width: 92%;
}
.mai-suggestion-card {
  background: #fff;
  border: 1px solid #E1EAF2;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  text-decoration: none;
  color: #0B2545;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.mai-suggestion-card b { font-weight: 600; }
.mai-suggestion-card span { color: #00B4D8; font-weight: 700; white-space: nowrap; }

.mai-typing {
  align-self: flex-start;
  font-size: 12px;
  color: #7A7F94;
  padding: 4px 10px;
}

.mai-inputbar {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #E1EAF2;
  background: #fff;
}
.mai-inputbar input {
  flex: 1;
  border: 1px solid #E1EAF2;
  border-radius: 10px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13px;
}
.mai-inputbar input:focus { outline: 2px solid #00B4D8; }
.mai-inputbar button {
  background: #1E88E5;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.mai-inputbar button:disabled { opacity: .5; cursor: default; }
