.budgetiq-divider {
  height: 1px;
  background: #ecebe9;
}

.budgetiq-scroll {
  height: 500px;
  overflow-y: auto;
}

.budgetiq-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.75rem;
  padding: 0.6rem 0.9rem;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

.budgetiq-btn-primary {
  background: #171412;
  color: white;
}

.budgetiq-btn-primary:hover {
  background: #2d2823;
}

.budgetiq-btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.budgetiq-btn-ghost {
  background: transparent;
  color: #554e49;
  padding: 0.35rem 0.5rem;
  border-radius: 0.5rem;
}

.budgetiq-btn-ghost:hover {
  background: #f5f5f4;
}

.budgetiq-icon-btn {
  background: transparent;
  border-radius: 0.5rem;
  padding: 0.35rem;
}

.budgetiq-icon-btn:hover {
  background: #f5f5f4;
}

.budgetiq-badge-selected {
  background: #dbeafe; /* blue-100 */
  color: #1d4ed8; /* blue-700 */
  font-size: 11px;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  white-space: nowrap;
}

.budgetiq-copy-btn {
  margin-top: 0.5rem;
  height: 1.75rem;
  font-size: 12px;
  color: #78716c;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: transparent;
}

.budgetiq-copy-btn:hover {
  color: #171412;
}

.budgetiq-chip {
  font-size: 13px;
  color: #554e49;
  border: 1px solid #ecebe9;
  background: white;
  border-radius: 0.75rem;
  padding: 0.45rem 0.75rem;
}

.budgetiq-chip:hover {
  background: #f5f5f4;
}

.budgetiq-composer-input {
  background: white;
  border: 1px solid #ecebe9;
  border-radius: 0.75rem;
  padding: 0.65rem 0.85rem;
  font-size: 14px;
  color: #171412;
  resize: vertical;
  min-height: 44px;
}

.budgetiq-composer-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
  border-color: rgba(59, 130, 246, 0.7);
}

/* Loading animations */
@keyframes loading-progress {
  0% {
    width: 20%;
    opacity: 0.7;
  }
  50% {
    width: 80%;
    opacity: 1;
  }
  100% {
    width: 20%;
    opacity: 0.7;
  }
}

.budgetiq-loading-bar {
  animation: loading-progress 2s ease-in-out infinite;
}

/* Analyzing state overlay */
.budgetiq-analyzing-overlay {
  position: relative;
}

.budgetiq-analyzing-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.6);
  border-radius: inherit;
  pointer-events: none;
}

/* Markdown styling for AI responses */
.budgetiq-markdown {
  color: #171412;
  line-height: 1.6;
}

.budgetiq-markdown p {
  margin-bottom: 0.75rem;
}

.budgetiq-markdown p:last-child {
  margin-bottom: 0;
}

.budgetiq-markdown strong,
.budgetiq-markdown b {
  font-weight: 600;
  color: #0f0d0b;
}

.budgetiq-markdown em,
.budgetiq-markdown i {
  font-style: italic;
}

.budgetiq-markdown h1,
.budgetiq-markdown h2,
.budgetiq-markdown h3,
.budgetiq-markdown h4,
.budgetiq-markdown h5,
.budgetiq-markdown h6 {
  font-weight: 600;
  color: #0f0d0b;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.budgetiq-markdown h1 { font-size: 1.25rem; }
.budgetiq-markdown h2 { font-size: 1.125rem; }
.budgetiq-markdown h3 { font-size: 1rem; }

.budgetiq-markdown ul,
.budgetiq-markdown ol {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
}

.budgetiq-markdown ul {
  list-style-type: disc;
}

.budgetiq-markdown ol {
  list-style-type: decimal;
}

.budgetiq-markdown li {
  margin-bottom: 0.25rem;
}

.budgetiq-markdown li::marker {
  color: #78716c;
}

/* Table styling */
.budgetiq-markdown table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0;
  font-size: 13px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  overflow: hidden;
}

.budgetiq-markdown thead {
  background: #f5f5f4;
}

.budgetiq-markdown th {
  text-align: left;
  padding: 0.6rem 0.75rem;
  font-weight: 600;
  color: #171412;
  border-bottom: 1px solid #e5e5e5;
}

.budgetiq-markdown td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #f0f0f0;
  color: #374151;
}

.budgetiq-markdown tr:last-child td {
  border-bottom: none;
}

.budgetiq-markdown tbody tr:hover {
  background: #fafaf9;
}

/* Code styling */
.budgetiq-markdown code {
  background: #f5f5f4;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  font-size: 0.85em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.budgetiq-markdown pre {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 0.75rem 0;
}

.budgetiq-markdown pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

/* Blockquote */
.budgetiq-markdown blockquote {
  border-left: 3px solid #d4a574;
  padding-left: 1rem;
  margin: 0.75rem 0;
  color: #554e49;
  font-style: italic;
}

/* Links */
.budgetiq-markdown a {
  color: #2563eb;
  text-decoration: underline;
}

.budgetiq-markdown a:hover {
  color: #1d4ed8;
}

/* Horizontal rule */
.budgetiq-markdown hr {
  border: none;
  height: 1px;
  background: #e5e5e5;
  margin: 1rem 0;
}

