/* TownConnect AI — Module 20: Fill-from-Chat widget */
.tc-af-panel {
  margin: 10px 0 14px;
  border: 1px solid #d7ebe0;
  border-radius: 12px;
  background: linear-gradient(180deg, #f3fbf6 0%, #ffffff 100%);
  overflow: hidden;
}
.tc-af-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 0;
  background: transparent;
  color: #0f7a4d;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-align: left;
}
.tc-af-toggle:hover { background: #e8f7ef; }
.tc-af-spark { font-size: 16px; }
.tc-af-body { padding: 0 14px 14px; }
.tc-af-hint {
  margin: 0 0 8px;
  font-size: 12px;
  color: #4b6b5c;
  line-height: 1.45;
}
.tc-af-input {
  width: 100%;
  min-height: 72px;
  padding: 10px 12px;
  border: 1px solid #c5ddd0;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  background: #fff;
  color: #1a2b23;
}
.tc-af-input:focus { outline: 2px solid #27ae60; border-color: #27ae60; }
.tc-af-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.tc-af-extract-btn {
  background: #1db954;
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.tc-af-extract-btn:disabled { opacity: 0.6; cursor: wait; }
.tc-af-overwrite {
  font-size: 12px;
  color: #4b6b5c;
  display: flex;
  align-items: center;
  gap: 4px;
}
.tc-af-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #cfe9db;
  border-top-color: #1db954;
  border-radius: 50%;
  animation: tc-af-spin 0.8s linear infinite;
  display: inline-block;
}
@keyframes tc-af-spin { to { transform: rotate(360deg); } }
.tc-af-status { margin-top: 10px; font-size: 13px; line-height: 1.5; }
.tc-af-loading { color: #0f7a4d; }
.tc-af-error { color: #c0392b; font-weight: 600; }
.tc-af-manual { color: #4b6b5c; }
.tc-af-result {
  background: #eefaf3;
  border: 1px solid #bfe8d2;
  border-radius: 10px;
  padding: 10px 12px;
  color: #14522f;
}
.tc-af-warn { color: #9a6700; }
.tc-af-follow { color: #1a5fb4; font-weight: 600; }
.tc-af-note { color: #6b4f1d; font-size: 12px; }
.tc-af-src { color: #7a8f84; font-size: 11px; }
.tc-af-filled {
  outline: 2px solid #1db954 !important;
  outline-offset: 1px;
  transition: outline-color 0.4s ease;
}
.tc-af-uncertain {
  outline: 2px solid #e6a700 !important;
  background: #fff8e6 !important;
}
.tc-af-missing {
  outline: 2px dashed #e74c3c !important;
  background: #fdf1f0 !important;
}
.tc-af-prefill-banner {
  background: #eefaf3;
  border: 1px solid #1db954;
  color: #14522f;
  border-radius: 10px;
  padding: 10px 12px;
  margin: 10px 0;
  font-size: 13px;
  font-weight: 600;
  transition: opacity 0.6s ease;
}
.tc-af-prefill-banner-hide { opacity: 0; pointer-events: none; }
@media (max-width: 640px) {
  .tc-af-actions { flex-direction: column; align-items: flex-start; }
  .tc-af-extract-btn { width: 100%; }
}
