/* ===== FERRARI AI CONCIERGE WIDGET ===== */
.fc-launcher {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  background: #d40000;
  cursor: pointer;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 0 rgba(212, 0, 0, 0.55), 0 12px 32px rgba(0, 0, 0, 0.6);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.3s ease, box-shadow 0.3s ease;
  animation: fc-pulse 2.8s ease-out infinite;
}
.fc-launcher:hover {
  transform: scale(1.08) translateY(-2px);
  background: #ec0000;
}
.fc-launcher svg {
  width: 34px;
  height: 34px;
  fill: #ffffff;
  transition: transform 0.35s ease, opacity 0.25s ease;
}
.fc-launcher .fc-close-icon {
  position: absolute;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 1.8;
  opacity: 0;
  transform: rotate(-90deg) scale(0.6);
}
.fc-launcher.open .fc-horse-icon {
  opacity: 0;
  transform: rotate(90deg) scale(0.6);
}
.fc-launcher.open .fc-close-icon {
  opacity: 1;
  transform: rotate(0) scale(1);
}
.fc-launcher.open {
  animation: none;
}
@keyframes fc-pulse {
  0% { box-shadow: 0 0 0 0 rgba(212, 0, 0, 0.55), 0 12px 32px rgba(0, 0, 0, 0.6); }
  70% { box-shadow: 0 0 0 18px rgba(212, 0, 0, 0), 0 12px 32px rgba(0, 0, 0, 0.6); }
  100% { box-shadow: 0 0 0 0 rgba(212, 0, 0, 0), 0 12px 32px rgba(0, 0, 0, 0.6); }
}

.fc-panel {
  position: fixed;
  right: 28px;
  bottom: 108px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: calc(100vh - 140px);
  z-index: 199;
  display: flex;
  flex-direction: column;
  background: rgba(8, 8, 8, 0.86);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  font-family: var(--font-main);
}
.fc-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.fc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(212, 0, 0, 0.18), rgba(0, 0, 0, 0));
}
.fc-header-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #d40000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fc-header-badge svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}
.fc-header-title {
  font-size: 13px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 500;
}
.fc-header-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.fc-header-sub::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.fc-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: #27272a transparent;
}
.fc-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  animation: fc-in 0.3s ease both;
}
@keyframes fc-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.fc-msg.user {
  align-self: flex-end;
  background: #d40000;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.fc-msg.assistant {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  border-bottom-left-radius: 4px;
}
.fc-msg.assistant.typing::after {
  content: '▍';
  animation: fc-blink 1s steps(2) infinite;
  color: #d40000;
}
@keyframes fc-blink { to { opacity: 0; } }
.fc-msg.error {
  align-self: center;
  background: rgba(212, 0, 0, 0.12);
  border: 1px solid rgba(212, 0, 0, 0.35);
  color: #ffb4b4;
  font-size: 12px;
}

.fc-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 18px 12px;
}
.fc-chip {
  font-family: var(--font-main);
  font-size: 11.5px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.fc-chip:hover {
  background: rgba(212, 0, 0, 0.2);
  border-color: rgba(212, 0, 0, 0.6);
  transform: translateY(-1px);
}

.fc-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.4);
}
.fc-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 11px 16px;
  color: #fff;
  font-family: var(--font-main);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}
.fc-input::placeholder { color: rgba(255, 255, 255, 0.4); }
.fc-input:focus {
  border-color: rgba(212, 0, 0, 0.7);
  background: rgba(255, 255, 255, 0.09);
}
.fc-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #d40000;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.25s ease, transform 0.25s ease, opacity 0.25s ease;
}
.fc-send:hover { background: #ec0000; transform: scale(1.06); }
.fc-send:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.fc-send svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2; }

@media (max-width: 640px) {
  .fc-launcher { right: 16px; bottom: 16px; width: 58px; height: 58px; }
  .fc-panel { right: 16px; left: 16px; bottom: 86px; width: auto; height: 70vh; }
}
