/* Compact FETAMIN AI widget — pill button in the site's tan style */
.fa-root {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9000;
  font-family: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.fa-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid #e9cba799;
  border-radius: 12px;
  background: #e9cba7;
  color: #241a10;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 10px 24px -14px #000000cc;
  transition: transform 0.15s ease, background 0.15s ease;
}

.fa-toggle:hover {
  transform: translateY(-1px);
  background: #f0d5b3;
}

.fa-toggle-icon {
  flex: none;
  font-size: 16px;
  line-height: 1;
  opacity: 0.85;
}

.fa-send i {
  font-size: 17px;
  line-height: 1;
}

.fa-toggle-label {
  white-space: nowrap;
}

.fa-root.is-open .fa-toggle {
  display: none;
}

.fa-panel {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 360px;
  max-width: calc(100vw - 28px);
  height: 470px;
  max-height: calc(100vh - 100px);
  display: none;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid #262119;
  background: #100e0b;
  box-shadow: 0 20px 48px -26px #000000cc;
}

.fa-panel.is-open {
  display: flex;
}

.fa-head {
  display: flex;
  align-items: center;
  padding: 9px 12px;
  border-bottom: 1px solid #1d1914;
}

.fa-title {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #b8ad9c;
}

.fa-close {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #6f6659;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  padding: 1px 5px;
  border-radius: 5px;
}

.fa-close:hover {
  color: #ff9400;
}

.fa-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  scrollbar-width: thin;
  scrollbar-color: #2b251d transparent;
}

.fa-msg {
  font-size: 12.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.fa-msg--bot {
  align-self: stretch;
  color: #d9d2c6;
}

.fa-msg--user {
  align-self: flex-end;
  max-width: 88%;
  padding: 6px 10px;
  border-radius: 10px;
  background: #e9cba7;
  color: #241a10;
  font-weight: 500;
}

.fa-msg code {
  background: #00000066;
  padding: 0 4px;
  border-radius: 4px;
  font-family: "Iosevka", ui-monospace, monospace;
  font-size: 11.5px;
}

.fa-form {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 8px 10px 10px;
  border-top: 1px solid #1d1914;
}

.fa-root .fa-input,
.fa-root .fa-input:focus {
  flex: 1;
  resize: none !important;
  height: 30px !important;
  min-height: 30px !important;
  max-height: 60px !important;
  padding: 5px 2px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #efe9df;
  font: inherit;
  font-size: 12.5px;
  outline: none;
}

.fa-input::placeholder {
  color: #6f6659;
}

.fa-send {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: #e9cba7;
  color: #241a10;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.fa-send:disabled {
  opacity: 0.4;
  cursor: default;
}

.fa-typing {
  display: flex;
  gap: 3px;
  padding: 1px 0;
}

.fa-typing i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #6f6659;
  animation: fa-blink 1.1s infinite ease-in-out;
}

.fa-typing i:nth-child(2) { animation-delay: 0.15s; }
.fa-typing i:nth-child(3) { animation-delay: 0.3s; }

@keyframes fa-blink {
  0%, 80%, 100% { opacity: 0.3; }
  40% { opacity: 1; }
}

@media (max-width: 480px) {
  .fa-root { right: 12px; bottom: 12px; }
  .fa-panel { width: calc(100vw - 24px); height: 62vh; }
}
