/* FlyBot styles are isolated so a cached main stylesheet cannot leave the chat unstyled. */
.flybot {
  position: fixed !important;
  z-index: 1000 !important;
  right: 28px !important;
  bottom: 26px !important;
  direction: rtl;
  font-family: "Cairo", Arial, sans-serif;
}
.flybot-launcher {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 54px;
  padding: 9px 20px 9px 11px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px;
  background: linear-gradient(135deg,#0b4778,#062d52 75%);
  color: #fff;
  box-shadow: 0 8px 22px rgba(6,45,82,.24),inset 0 1px 0 rgba(255,255,255,.15);
  font: 700 14px "Cairo",Arial,sans-serif;
  cursor: pointer;
}
.flybot-launcher:hover { background: linear-gradient(135deg,#105a91,#08375f 75%); }
.flybot-launcher > svg {
  box-sizing: border-box;
  display: block;
  width: 34px;
  height: 34px;
  padding: 8px;
  border-radius: 50%;
  background: #e5b951;
  color: #062d52;
}
.flybot-launcher > span { white-space: nowrap; }
.flybot-panel {
  position: absolute !important;
  right: 0 !important;
  bottom: 72px !important;
  display: flex;
  flex-direction: column;
  width: min(360px,calc(100vw - 32px));
  max-height: min(520px,calc(100vh - 112px));
  overflow: hidden;
  border: 1px solid #dbe5ed;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(6,45,82,.2);
}
.flybot-panel[hidden] { display: none !important; }
.flybot-header {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: none;
  padding: 14px 16px;
  background: #062d52;
  color: #fff;
}
.flybot-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 13px;
  background: rgba(255,255,255,.12);
  color: #e5b951;
}
.flybot-avatar svg { width: 21px; }
.flybot-header > div { display: grid; line-height: 1.45; }
.flybot-header strong { font: 700 16px "Cairo",Arial,sans-serif; }
.flybot-header small { color: #d5e4ef; font: 400 11px "Cairo",Arial,sans-serif; }
.flybot-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-inline-start: auto;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.flybot-close:hover { background: rgba(255,255,255,.12); }
.flybot-messages {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 11px;
  min-height: 160px;
  max-height: 330px;
  overflow: auto;
  padding: 16px;
  background: #f8fbfd;
}
.flybot-greeting,.flybot-reply {
  max-width: 94%;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #e5edf2;
  border-radius: 4px 14px 14px 14px;
  background: #fff;
  color: #18344e;
  font: 400 13px/1.8 "Cairo",Arial,sans-serif;
}
.flybot-quick-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; width: 100%; }
.flybot-quick-actions[hidden] { display: none !important; }
.flybot-quick-actions button {
  max-width: 100%;
  padding: 7px 11px;
  border: 1px solid #cbdce8;
  border-radius: 12px;
  background: #fff;
  color: #0d5689;
  font: 600 12px/1.6 "Cairo",Arial,sans-serif;
  text-align: right;
  cursor: pointer;
}
.flybot-quick-actions button:hover { border-color: #0d5689; background: #eef5f9; }
.flybot-user-message {
  align-self: flex-end;
  max-width: 90%;
  margin: 0;
  padding: 9px 13px;
  border-radius: 14px 4px 14px 14px;
  background: #0d5689;
  color: #fff;
  font: 400 13px/1.7 "Cairo",Arial,sans-serif;
}
.flybot-messages > .text-link { color: #0d5689; font: 700 12px "Cairo",Arial,sans-serif; text-decoration: none; }
.flybot-form { display: flex; flex: none; gap: 9px; padding: 11px; border-top: 1px solid #dbe5ed; background: #fff; }
.flybot-form input {
  min-width: 0;
  flex: 1;
  padding: 9px 11px;
  border: 1px solid #dbe5ed;
  border-radius: 10px;
  outline: none;
  color: #18344e;
  font: 400 13px "Cairo",Arial,sans-serif;
}
.flybot-form input:focus { border-color: #0d5689; box-shadow: 0 0 0 3px rgba(12,86,141,.12); }
.flybot-form button {
  display: grid;
  place-items: center;
  width: 42px;
  flex: none;
  border: 0;
  border-radius: 10px;
  background: #e5b951;
  color: #062d52;
  cursor: pointer;
}
.flybot-form button svg { width: 18px; }
.flybot :focus-visible { outline: 3px solid #78bde0; outline-offset: 2px; }
@media(max-width:520px) {
  .flybot { right: 16px !important; bottom: 16px !important; }
  .flybot-panel { bottom: 66px !important; max-height: min(520px,calc(100vh - 96px)); }
  .flybot-launcher { min-height: 50px; padding: 8px 16px 8px 9px; }
}
@media(prefers-reduced-motion:reduce) { .flybot * { scroll-behavior: auto; } }
