/* FEDS assistant widget
   Self-contained; uses the theme's --blue where available. */
.fedsbot {
  --bot-blue: var(--blue, #0057B8);
  --bot-ink: #1a2230;
  --bot-mut: #5a6473;
  --bot-line: #e2e6ea;
  --bot-bg: #ffffff;
  --bot-user: var(--bot-blue);
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99999;
  font-family: var(--font-sans, system-ui, -apple-system, sans-serif);
}

/* Launcher */
.fedsbot__launch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  background: var(--bot-blue);
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 40, 90, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.fedsbot__launch:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0, 40, 90, 0.34); }
.fedsbot__launch svg { flex: none; }
.fedsbot[data-open="true"] .fedsbot__launch { display: none; }

/* Panel */
.fedsbot__panel {
  display: none;
  flex-direction: column;
  width: 370px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: calc(100vh - 120px);
  background: var(--bot-bg);
  border: 1px solid var(--bot-line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 20, 50, 0.28);
}
.fedsbot[data-open="true"] .fedsbot__panel { display: flex; animation: fedsbot-in 0.18s ease; }
@keyframes fedsbot-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.fedsbot__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  background: var(--bot-blue);
  color: #fff;
}
.fedsbot__head-txt { display: flex; flex-direction: column; line-height: 1.25; }
.fedsbot__head-txt strong { font-size: 15px; }
.fedsbot__sub { font-size: 12px; opacity: 0.85; }
.fedsbot__close {
  background: rgba(255, 255, 255, 0.15);
  border: 0; color: #fff; cursor: pointer;
  width: 28px; height: 28px; border-radius: 8px; font-size: 14px;
}
.fedsbot__close:hover { background: rgba(255, 255, 255, 0.28); }

.fedsbot__log {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #f6f8fb;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fedsbot__msg { display: flex; }
.fedsbot__msg--user { justify-content: flex-end; }
.fedsbot__bubble {
  max-width: 82%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--bot-ink);
  background: #fff;
  border: 1px solid var(--bot-line);
  white-space: pre-wrap;
  word-wrap: break-word;
}
.fedsbot__msg--user .fedsbot__bubble {
  background: var(--bot-user);
  color: #fff;
  border-color: transparent;
}
.fedsbot__typing .fedsbot__bubble { letter-spacing: 2px; color: var(--bot-mut); }

/* Chips */
.fedsbot__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fedsbot__chip {
  border: 1px solid var(--bot-blue);
  background: #fff;
  color: var(--bot-blue);
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.fedsbot__chip:hover { background: var(--bot-blue); color: #fff; }

/* Link button */
.fedsbot__linkbtn {
  align-self: flex-start;
  background: var(--bot-blue);
  color: #fff;
  text-decoration: none;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
}

/* Product cards */
.fedsbot__products { display: flex; flex-direction: column; gap: 8px; }
.fedsbot__card {
  display: flex;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--bot-line);
  border-radius: 12px;
  padding: 8px;
  transition: border-color 0.12s ease, transform 0.12s ease;
}
.fedsbot__card:hover { border-color: var(--bot-blue); transform: translateY(-1px); }
.fedsbot__card-img { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; flex: none; background: #eef2f7; }
.fedsbot__card-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fedsbot__card-title { font-size: 13.5px; color: var(--bot-ink); line-height: 1.3; }
.fedsbot__card-spec { font-size: 12px; color: var(--bot-mut); }
.fedsbot__card-cta { font-size: 12px; color: var(--bot-blue); font-weight: 600; }

.fedsbot__form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--bot-line); background: #fff; }
.fedsbot__input {
  flex: 1;
  border: 1px solid var(--bot-line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}
.fedsbot__input:focus { border-color: var(--bot-blue); }
.fedsbot__send {
  border: 0;
  background: var(--bot-blue);
  color: #fff;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.fedsbot__send:hover { filter: brightness(1.06); }

/* Mobile */
@media (max-width: 480px) {
  .fedsbot { right: 12px; bottom: 12px; }
  .fedsbot__panel {
    width: calc(100vw - 24px);
    height: calc(100vh - 90px);
  }
  .fedsbot__launch-txt { display: none; }
  .fedsbot__launch { padding: 14px; }
}
