/* مساعد منصة الأسماك — أيقونة جانبية / أزرق بحري */
#fishbot-root, #fishbot-root * { box-sizing: border-box; }
#fishbot-root {
  --fb-navy-900: #072a45;
  --fb-navy-800: #0b3a5c;
  --fb-navy-700: #12557f;
  --fb-aqua: #0f9b9b;
  --fb-amber: #d99a2b;
  --fb-ink: #0a2540;
  --fb-muted: #5b7a93;
  --fb-line: #dbe6ef;
  --fb-surface: #ffffff;
  --fb-radius: 16px;
  --fb-shadow: 0 18px 44px rgba(4, 18, 31, .28);
  font-family: 'Noto Sans Arabic', system-ui, sans-serif;
  color: var(--fb-ink);
  line-height: 1.7;
  position: relative;
  z-index: 70;
}
#fishbot-root button { font-family: inherit; cursor: pointer; }

/* ===== الأيقونة الجانبية ===== */
.fb-launcher {
  position: fixed; left: 18px; bottom: 20px; z-index: 70;
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .55rem .95rem .55rem .7rem;
  border: 1px solid rgba(127, 196, 224, .35);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--fb-navy-800), var(--fb-navy-900) 62%, #04121f);
  color: #eaf6fd; box-shadow: var(--fb-shadow);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.fb-launcher:hover { transform: translateY(-3px); border-color: rgba(127, 196, 224, .7); }
.fb-launcher:focus-visible { outline: 3px solid rgba(15, 155, 155, .55); outline-offset: 3px; }
.fb-launcher .fb-glyph {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, rgba(127, 196, 224, .35), rgba(4, 18, 31, .1));
}
.fb-launcher .fb-glyph svg { width: 22px; height: 22px; display: block; }
.fb-launcher .fb-label { font-size: .86rem; font-weight: 600; letter-spacing: .1px; }
.fb-dot {
  position: absolute; top: -4px; inset-inline-end: -4px; min-width: 20px; height: 20px;
  border-radius: 999px; background: var(--fb-amber); color: #2b1c02;
  font-size: .68rem; font-weight: 700; display: grid; place-items: center; padding: 0 4px;
  border: 2px solid #f4f8fb;
}
.fb-dot[hidden] { display: none; }
.fb-launcher.is-open .fb-label { display: none; }

/* ===== اللوحة ===== */
.fb-panel {
  position: fixed; left: 18px; bottom: 82px; z-index: 71;
  width: min(392px, calc(100vw - 24px)); max-height: min(78vh, 660px);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--fb-surface); border: 1px solid var(--fb-line);
  border-radius: 20px; box-shadow: var(--fb-shadow);
  opacity: 0; transform: translateY(14px) scale(.98); pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.fb-panel.is-open { opacity: 1; transform: none; pointer-events: auto; }
.fb-head {
  display: flex; align-items: center; gap: .6rem; padding: .7rem .85rem;
  background: linear-gradient(120deg, var(--fb-navy-900), var(--fb-navy-700));
  color: #eef8ff;
}
.fb-head .fb-ava {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(127, 196, 224, .35);
}
.fb-head .fb-ava svg { width: 22px; height: 22px; }
.fb-head .fb-titles { flex: 1; min-width: 0; }
.fb-head strong { display: block; font-size: .92rem; }
.fb-head span { display: block; font-size: .7rem; color: #a9cfe6; }
.fb-iconbtn {
  border: 1px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .06);
  color: #eef8ff; border-radius: 10px; width: 30px; height: 30px; display: grid; place-items: center;
  transition: background .2s ease, transform .2s ease;
}
.fb-iconbtn:hover { background: rgba(255, 255, 255, .18); transform: translateY(-1px); }
.fb-iconbtn svg { width: 15px; height: 15px; }

/* ===== محتوى المحادثة ===== */
.fb-body { flex: 1; overflow-y: auto; padding: .85rem; background: #f7fafd; }
.fb-msg { display: flex; gap: .45rem; margin-bottom: .7rem; }
.fb-msg .fb-b { max-width: 92%; }
.fb-msg.bot .fb-b {
  background: #ffffff; border: 1px solid var(--fb-line); border-radius: 4px 14px 14px 14px;
  padding: .6rem .75rem; box-shadow: 0 1px 2px rgba(10, 37, 64, .05);
}
.fb-msg.me { justify-content: flex-start; }
.fb-msg.me .fb-b {
  background: var(--fb-navy-800); color: #eef8ff; border-radius: 14px 4px 14px 14px;
  padding: .5rem .75rem; font-size: .84rem;
}
.fb-msg .fb-b h4 { margin: 0 0 .3rem; font-family: 'Noto Naskh Arabic', serif; font-size: .95rem; }
.fb-msg .fb-b p { margin: 0 0 .35rem; font-size: .85rem; }
.fb-msg .fb-b p:last-child { margin-bottom: 0; }
.fb-badge {
  display: inline-block; font-size: .64rem; font-weight: 600; padding: .1rem .45rem;
  border-radius: 999px; margin-inline-start: .35rem; vertical-align: middle;
}
.fb-badge.live { background: #e3f5ec; color: #128a5f; }
.fb-badge.demo { background: #fdf3e0; color: #8a5a06; }
.fb-badge.est { background: #e8f1fa; color: var(--fb-navy-700); }
.fb-badge.ref { background: #eef1f5; color: var(--fb-muted); }
.fb-list { margin: .2rem 0 0; padding: 0; list-style: none; }
.fb-list li {
  font-size: .82rem; padding: .28rem 0; border-top: 1px dashed var(--fb-line);
  display: flex; justify-content: space-between; gap: .5rem;
}
.fb-list li:first-child { border-top: 0; }
.fb-list .k { color: var(--fb-muted); }
.fb-list .v { font-weight: 600; white-space: nowrap; }
.fb-note { font-size: .72rem; color: var(--fb-muted); margin-top: .35rem; }
.fb-bars { display: grid; gap: .3rem; margin-top: .35rem; }
.fb-bar { font-size: .76rem; }
.fb-bar .t { display: flex; justify-content: space-between; color: var(--fb-muted); }
.fb-bar .track { height: 6px; border-radius: 999px; background: #e6eef5; overflow: hidden; }
.fb-bar .fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--fb-navy-700), var(--fb-aqua)); }

/* ===== شرائح الأسئلة السريعة ===== */
.fb-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; }
.fb-chip {
  border: 1px solid #cfe1ee; background: #fff; color: var(--fb-navy-700);
  border-radius: 999px; padding: .25rem .6rem; font-size: .74rem;
  transition: background .18s ease, transform .18s ease, border-color .18s ease;
}
.fb-chip:hover { background: #eaf4fb; border-color: var(--fb-aqua); transform: translateY(-1px); }
.fb-typing { display: inline-flex; gap: 4px; padding: .2rem 0; }
.fb-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--fb-steel, #2e7ea8); animation: fbBlink 1s infinite; }
.fb-typing i:nth-child(2) { animation-delay: .15s; }
.fb-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes fbBlink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

/* ===== الإدخال والتذييل ===== */
.fb-foot { border-top: 1px solid var(--fb-line); background: #fff; padding: .6rem .7rem .5rem; }
.fb-input { display: flex; gap: .4rem; align-items: center; }
.fb-input input {
  flex: 1; min-width: 0; font-family: inherit; font-size: .85rem; color: var(--fb-ink);
  padding: .5rem .7rem; border: 1px solid var(--fb-line); border-radius: 12px; background: #f8fbfd;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.fb-input input:focus { outline: none; border-color: var(--fb-aqua); box-shadow: 0 0 0 3px rgba(15, 155, 155, .14); }
.fb-send {
  border: 0; border-radius: 12px; padding: .5rem .8rem; font-size: .82rem; font-weight: 600;
  background: linear-gradient(120deg, var(--fb-navy-800), var(--fb-navy-700)); color: #fff;
  transition: transform .18s ease, filter .18s ease;
}
.fb-send:hover { transform: translateY(-1px); filter: brightness(1.08); }
.fb-send:disabled { opacity: .55; cursor: default; transform: none; }
.fb-legal { font-size: .66rem; color: var(--fb-muted); text-align: center; margin: .4rem 0 0; }
.fb-legal a { color: var(--fb-navy-700); }

/* ===== الجوال ===== */
@media (max-width: 560px) {
  .fb-launcher { left: 12px; bottom: 14px; padding: .5rem; }
  .fb-launcher .fb-label { display: none; }
  .fb-panel { left: 8px; right: 8px; width: auto; bottom: 72px; max-height: 76vh; border-radius: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .fb-panel, .fb-launcher, .fb-chip, .fb-send, .fb-iconbtn { transition: none; }
  .fb-typing i { animation: none; }
}
