/* Self-hosted via @fontsource-variable/inter — no render-blocking Google Fonts request */
@import "@fontsource-variable/inter";

@import "tailwindcss";
@import "@agent-native/core/styles/agent-native.css";
@import "@agent-native/toolkit/styles.css";

@source "./**/*.{ts,tsx}";

:root {
  --background: 0 0% 100%;
  --foreground: 0 0% 10%;
  --card: 0 0% 100%;
  --card-foreground: 0 0% 10%;
  --popover: 0 0% 100%;
  --popover-foreground: 0 0% 10%;
  --primary: 0 0% 15%;
  --primary-foreground: 0 0% 100%;
  --secondary: 0 0% 95%;
  --secondary-foreground: 0 0% 15%;
  --muted: 0 0% 95%;
  --muted-foreground: 0 0% 45%;
  --accent: 0 0% 95%;
  --accent-foreground: 0 0% 15%;
  --destructive: 0 91% 71%;
  --destructive-foreground: 0 0% 98%;
  --border: 0 0% 90%;
  --input: 0 0% 90%;
  --ring: 0 0% 40%;
  --radius: 0.5rem;
  --sidebar-background: 0 0% 97%;
  --sidebar-foreground: 0 0% 45%;
  --sidebar-primary: 0 0% 15%;
  --sidebar-primary-foreground: 0 0% 100%;
  --sidebar-accent: 0 0% 95%;
  --sidebar-accent-foreground: 0 0% 15%;
  --sidebar-border: 0 0% 90%;
  --sidebar-ring: 0 0% 40%;
}

.dark {
  --background: 0 0% 13%;
  --foreground: 0 0% 90%;
  --card: 0 0% 15%;
  --card-foreground: 0 0% 90%;
  --popover: 0 0% 15%;
  --popover-foreground: 0 0% 90%;
  --primary: 0 0% 75%;
  --primary-foreground: 0 0% 10%;
  --secondary: 0 0% 18%;
  --secondary-foreground: 0 0% 90%;
  --muted: 0 0% 16%;
  --muted-foreground: 0 0% 60%;
  --accent: 0 0% 18%;
  --accent-foreground: 0 0% 90%;
  --destructive: 0 84% 60%;
  --destructive-foreground: 0 0% 98%;
  --border: 0 0% 24%;
  --input: 0 0% 24%;
  --ring: 0 0% 60%;
  --sidebar-background: 0 0% 10%;
  --sidebar-foreground: 0 0% 60%;
  --sidebar-primary: 0 0% 75%;
  --sidebar-primary-foreground: 0 0% 10%;
  --sidebar-accent: 0 0% 16%;
  --sidebar-accent-foreground: 0 0% 90%;
  --sidebar-border: 0 0% 20%;
  --sidebar-ring: 0 0% 60%;
}

@layer base {
  html,
  body {
    @apply bg-background text-foreground;
    font-family: "Inter Variable", "Inter", sans-serif;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  }
}

@container agent-native-main (min-width: 760px) {
  .brain-provider-catalog-grid,
  .brain-search-filter-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@container agent-native-main (min-width: 980px) {
  .brain-source-card-grid {
    grid-template-columns: minmax(0, 1fr) minmax(20rem, auto) auto;
    align-items: center;
  }
}

@container agent-native-main (min-width: 1120px) {
  .brain-provider-catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .brain-search-filter-grid {
    grid-template-columns: 1fr 1fr 1fr 120px auto;
  }
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: hsl(var(--border));
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--muted-foreground) / 0.4);
}

.brain-chat-intro {
  display: none;
}

.brain-chat-panel [data-agent-empty-state="centered"] .brain-chat-intro {
  display: grid;
  width: 100%;
  max-width: min(684px, 90%);
  gap: 0.5rem;
  margin: 0 auto 1rem;
  text-align: center;
}

.brain-chat-intro h1 {
  margin: 0;
  color: hsl(var(--foreground));
  font-size: clamp(1.75rem, 2.5vw, 2.75rem);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.12;
}

.brain-chat-intro p {
  margin: 0;
  color: hsl(var(--muted-foreground));
  font-size: 0.9375rem;
  line-height: 1.5;
}

.brain-chat-panel [data-agent-empty-state="centered"] .agent-chat-scroll {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
}

.brain-chat-panel [data-agent-empty-state="centered"] .agent-composer-area {
  width: 100%;
  max-width: min(684px, 90%);
  padding: 0;
}

.brain-chat-panel [data-agent-empty-state="centered"] .agent-composer-root {
  min-height: 7.875rem;
  border-color: hsl(var(--border));
  border-radius: 1rem;
  background: hsl(var(--card));
  box-shadow: none;
}

.dark
  .brain-chat-panel
  [data-agent-empty-state="centered"]
  .agent-composer-root {
  box-shadow: none;
}

.brain-chat-panel
  [data-agent-empty-state="centered"]
  .agent-composer-prosemirror {
  min-height: 5.0625rem;
  font-size: 1rem;
  line-height: 1.625rem;
}

@media (max-width: 767px) {
  .brain-chat-panel [data-agent-empty-state="centered"] {
    padding: 1rem;
    padding-bottom: 5rem;
  }

  .brain-chat-panel [data-agent-empty-state="centered"] .brain-chat-intro {
    width: 100%;
    margin-bottom: 0.875rem;
  }

  .brain-chat-intro h1 {
    font-size: 1.75rem;
  }

  .brain-chat-panel [data-agent-empty-state="centered"] .agent-composer-area {
    width: 100%;
  }

  .brain-chat-panel [data-agent-empty-state="centered"] .agent-composer-root {
    min-height: 6.75rem;
  }
}
