/* Portfolio assistant widget. Uses the site's :root tokens. */
.fc-toggle {
  position: fixed; right: 32px; bottom: 32px; z-index: 1000;
  display: grid; place-items: center;
  width: 68px; height: 68px; padding: 0;
  border: 0; border-radius: 50%; background: none;
  font-size: 3.25rem; line-height: 1;
  cursor: pointer;
  transition: transform 150ms ease;
}
.fc-toggle:hover { transform: scale(1.08); }
.fc-toggle:focus-visible, .fc-panel button:focus-visible, .fc-input:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px;
}
.fc-panel {
  position: fixed; right: 32px; bottom: 112px; z-index: 1000;
  display: flex; flex-direction: column;
  width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100dvh - 150px));
  background: var(--card); color: var(--foreground);
  border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 16px 48px rgb(0 0 0 / 0.5);
  font: 400 0.95rem/1.5 var(--font-geist-sans), system-ui, sans-serif;
  overflow: hidden;
}
.fc-panel[hidden] { display: none; }
.fc-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.fc-head strong { font-size: 0.95rem; }
.fc-head small { display: block; color: var(--muted-foreground); font-size: 0.75rem; }
.fc-close {
  background: none; border: 0; color: var(--muted-foreground);
  font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 4px 8px;
}
.fc-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.fc-msg { max-width: 85%; padding: 9px 13px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.fc-msg.user { align-self: flex-end; background: var(--primary); color: var(--primary-foreground); border-bottom-right-radius: 4px; }
.fc-msg.bot { align-self: flex-start; background: var(--secondary); border-bottom-left-radius: 4px; }
.fc-msg.error { color: #ffb4a8; }
.fc-suggest { display: flex; flex-wrap: wrap; gap: 6px; }
.fc-suggest button {
  background: none; border: 1px solid var(--border); border-radius: 999px;
  color: var(--foreground); padding: 6px 11px; font: inherit; font-size: 0.82rem; cursor: pointer;
}
.fc-suggest button:hover { border-color: var(--primary); }
.fc-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.fc-input {
  flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--background); color: var(--foreground); font: inherit;
}
.fc-send {
  padding: 0 14px; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--primary); color: var(--primary-foreground); font: 600 0.9rem var(--font-geist-sans), sans-serif;
}
.fc-send:disabled { opacity: 0.5; cursor: default; }
@media (max-width: 480px) {
  .fc-toggle { right: 20px; bottom: 20px; width: 60px; height: 60px; font-size: 2.85rem; }
  .fc-panel { right: 16px; left: 16px; width: auto; bottom: 92px; }
}
@media (prefers-reduced-motion: no-preference) {
  .fc-panel:not([hidden]) { animation: fc-in 160ms ease-out; }
  @keyframes fc-in { from { opacity: 0; transform: translateY(8px); } }
}
