@tailwind base;
@tailwind components;
@tailwind utilities;

/* Definition of the design system. All colors, gradients, fonts, etc should be defined here. 
All colors MUST be HSL.
*/

@layer base {
  :root {
    /* Dark theme como padrão - estilo NotebookLM */
    --background: 240 10% 8%;
    --foreground: 0 0% 95%;

    --card: 240 8% 12%;
    --card-foreground: 0 0% 95%;

    --popover: 240 8% 12%;
    --popover-foreground: 0 0% 95%;

    /* Brand system */
    --brand: 222 88% 56%; /* primary accent */
    --brand-foreground: 0 0% 100%;
    --brand-muted: 222 88% 96%;

    --primary: var(--brand);
    --primary-foreground: var(--brand-foreground);

    --secondary: 240 6% 18%;
    --secondary-foreground: 0 0% 95%;

    --muted: 240 6% 18%;
    --muted-foreground: 240 5% 60%;

    --accent: 257 92% 62%;
    --accent-foreground: 0 0% 100%;

    --destructive: 0 62.8% 50%;
    --destructive-foreground: 0 0% 98%;

    --border: 240 6% 20%;
    --input: 240 6% 20%;
    --ring: var(--brand);

    /* Gradients & shadows */
    --gradient-primary: linear-gradient(135deg, hsl(var(--brand) / 0.95), hsl(257 92% 62% / 0.95));
    --gradient-muted: linear-gradient(180deg, hsl(240 8% 12%), hsl(240 10% 8%));
    --shadow-elevate: 0 10px 30px -10px hsl(0 0% 0% / 0.5);
    --shadow-glow: 0 0 40px hsl(var(--brand) / 0.35);

    --radius: 0.75rem;

    /* Sidebar */
    --sidebar-background: 240 10% 8%;
    --sidebar-foreground: 0 0% 95%;
    --sidebar-primary: var(--brand);
    --sidebar-primary-foreground: 0 0% 98%;
    --sidebar-accent: 240 6% 18%;
    --sidebar-accent-foreground: 0 0% 95%;
    --sidebar-border: 240 6% 20%;
    --sidebar-ring: var(--brand);

    /* Typography */
    --font-sans: 'Plus Jakarta Sans', ui-sans-serif, system-ui;
  }

  .light {
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;

    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;

    --popover: 0 0% 100%;
    --popover-foreground: 222.2 84% 4.9%;

    --primary: var(--brand);
    --primary-foreground: 0 0% 100%;

    --secondary: 210 40% 96.1%;
    --secondary-foreground: 222.2 47.4% 11.2%;

    --muted: 210 40% 96.1%;
    --muted-foreground: 215.4 16.3% 46.9%;

    --accent: 257 92% 62%;
    --accent-foreground: 0 0% 100%;

    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;

    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 222.2 84% 4.9%;

    --sidebar-background: 0 0% 98%;
    --sidebar-foreground: 240 5.3% 26.1%;
    --sidebar-primary: var(--brand);
    --sidebar-primary-foreground: 0 0% 98%;
    --sidebar-accent: 240 4.8% 95.9%;
    --sidebar-accent-foreground: 240 5.9% 10%;
    --sidebar-border: 220 13% 91%;
    --sidebar-ring: 217.2 91.2% 59.8%;
  }
}

/* Custom scrollbar styles */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: hsl(var(--muted-foreground) / 0.2);
  border-radius: 4px;
}

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

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: hsl(var(--muted-foreground) / 0.2) transparent;
}

@layer base {
  * {
    @apply border-border;
  }

  body {
    @apply bg-background text-foreground;
    font-family: var(--font-sans);
  }
}

/* Signature interaction - interactive gradient */
.interactive-gradient {
  background: radial-gradient(600px circle at var(--x, 50%) var(--y, 50%), hsl(var(--brand) / 0.25), transparent 40%),
    radial-gradient(800px circle at var(--x2, 60%) var(--y2, 40%), hsl(257 92% 62% / 0.22), transparent 40%);
}

/* Fallback markdown spacing for summary reports. */
.table-summary-markdown {
  line-height: 1.7;
}

.table-summary-markdown > :first-child {
  margin-top: 0;
}

.table-summary-markdown > :last-child {
  margin-bottom: 0;
}

.table-summary-markdown h1,
.table-summary-markdown h2,
.table-summary-markdown h3,
.table-summary-markdown h4 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

.table-summary-markdown h1 {
  font-size: 1.5rem;
}

.table-summary-markdown h2 {
  font-size: 1.25rem;
}

.table-summary-markdown p,
.table-summary-markdown ul,
.table-summary-markdown ol,
.table-summary-markdown table,
.table-summary-markdown blockquote,
.table-summary-markdown pre {
  margin: 0.75rem 0;
}

.table-summary-markdown li + li {
  margin-top: 0.25rem;
}

.table-summary-markdown table {
  width: 100%;
  border-collapse: collapse;
}

.table-summary-markdown th,
.table-summary-markdown td {
  padding: 0.5rem 0.75rem;
  vertical-align: top;
}
