/*
 * Component-specific CSS for @docyrus/ui-pro-ai-assistant.
 *
 * This file ships ONLY custom rules that cannot be expressed as Tailwind
 * utilities (container queries, has-selectors, data-attribute overrides,
 * markdown styling). The Tailwind utility classes used by the package's
 * React components are generated by the consumer's Tailwind v4 build —
 * see the README "Setup" section for the required @source directives.
 *
 * Theme tokens (--background, --foreground, --primary, ...) must be defined
 * by the consumer following shadcn conventions, plus a Tailwind @theme inline
 * mapping (--color-background: var(--background), etc.) for utility classes
 * like bg-background to resolve.
 */

@container (width >= 48rem) {
  .\@3xl\:hidden { display: none; }
  .\@3xl\:flex { display: flex; }
  .\@3xl\:block { display: block; }
  .\@3xl\:flex-col { flex-direction: column; }
}

[data-slot="input-group"]:has(> textarea) { height: auto; }
[data-slot="input-group"]:has(> [data-align="block-end"]) { height: auto; flex-direction: column; }
[data-slot="input-group"]:has(> [data-align="block-start"]) { height: auto; flex-direction: column; }
[data-slot="input-group"]:has(> [data-align="block-end"]) > input { padding-top: 0.75rem; }
[data-slot="input-group"]:has(> [data-align="block-start"]) > input { padding-bottom: 0.75rem; }
[data-slot="input-group"]:has(> [data-align="inline-end"]) > input { padding-inline-end: 0.375rem; }
[data-slot="input-group"]:has(> [data-align="inline-start"]) > input { padding-inline-start: 0.375rem; }

textarea.field-sizing-content { field-sizing: content; }

[data-slot="dropdown-menu-content"],
[data-slot="dropdown-menu-sub-content"],
[data-slot="card"] {
  --tw-ring-color: var(--color-border);
}

[data-slot="tooltip-content"] { z-index: 9999; }

[data-slot="tabs-trigger"][data-state="active"] {
  background-color: var(--color-background);
  color: var(--color-foreground);
  box-shadow: var(--shadow-sm);
}

.docy-template-markdown {
  width: 100%;
  font-size: 0.875rem;
  line-height: 1.5rem;
  color: var(--color-foreground);
}
.docy-template-markdown > * + * { margin-top: 0.75rem; }
.docy-template-markdown h1 { margin-top: 1rem; margin-bottom: 0.5rem; font-size: 1.5rem; font-weight: 600; }
.docy-template-markdown h2 { margin-top: 1rem; margin-bottom: 0.5rem; font-size: 1.25rem; font-weight: 600; }
.docy-template-markdown h3 { margin-top: 0.75rem; margin-bottom: 0.25rem; font-size: 1.125rem; font-weight: 600; }
.docy-template-markdown h4 { margin-top: 0.5rem; margin-bottom: 0.25rem; font-size: 1rem; font-weight: 600; }
.docy-template-markdown p { margin: 0.5rem 0; }
.docy-template-markdown a { color: var(--color-primary); text-decoration: underline; }
.docy-template-markdown strong { font-weight: 600; }
.docy-template-markdown em { font-style: italic; }
.docy-template-markdown ul { margin: 0.5rem 0; padding-left: 1.25rem; list-style: disc; }
.docy-template-markdown ol { margin: 0.5rem 0; padding-left: 1.25rem; list-style: decimal; }
.docy-template-markdown li { margin: 0.125rem 0; }
.docy-template-markdown blockquote {
  margin: 0.5rem 0;
  padding-left: 0.75rem;
  border-left: 2px solid var(--color-border);
  color: var(--color-muted-foreground);
}
.docy-template-markdown hr { margin: 1rem 0; border: 0; border-top: 1px solid var(--color-border); }
.docy-template-markdown table { margin: 0.5rem 0; width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.docy-template-markdown th {
  border: 1px solid var(--color-border);
  background-color: var(--color-muted);
  padding: 0.25rem 0.5rem;
  text-align: left;
  font-weight: 600;
}
.docy-template-markdown td {
  border: 1px solid var(--color-border);
  padding: 0.25rem 0.5rem;
}
.docy-template-markdown :not(pre) > code {
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  background-color: var(--color-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
}
.docy-template-markdown pre {
  margin: 0.75rem 0;
  overflow-x: auto;
  border-radius: 0.375rem;
}
