@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&display=swap');

@custom-variant dark (&:is(.dark *));

:root {
  --font-size: 16px;
  /* Typography variables */
  --text-h1: 48px;
  --text-h2: 40px;
  --text-h3: 32px;
  --text-h4: 26px;
  --text-large-body: 18px;
  --text-base: 16px;
  --text-label: 14px;
  --text-caption: 13px;
  --font-weight-bold: 700;
  --font-weight-semibold: 600;
  --font-weight-medium: 500;
  --font-weight-normal: 400;
  --font-family-base: 'Roboto', sans-serif;
  /* The default background color for the application. */
  --background: rgba(255, 255, 255, 1.00);
  /* The default color for elements or text that appears on top of the background. */
  --foreground: rgba(0, 0, 0, 1.00);
  /* The background color for cards, modals, and other containers. */
  --card: rgba(255, 255, 255, 1.00);
  /* The default color for text or elements that appear on top of cards, modals and other background containers. */
  --card-foreground: rgba(0, 0, 0, 1.00);
  /* The background color for dropdowns and tooltips. */
  --popover: rgba(255, 255, 255, 1.00);
  /* The default color for text or elements that appear on top of dropdowns and tooltips. */
  --popover-foreground: rgba(0, 0, 0, 1.00);
  /* The primary color used for buttons, links, and other interactive elements. */
  --primary: rgba(45, 45, 134, 1.00);
  /* The default color for text or elements that appear on top of primary colored elements. */
  --primary-foreground: rgba(255, 255, 255, 1.00);
  /* The secondary color used for secondary(but NOT-DESTRUCTIVE) buttons and interactive elements. */
  --secondary: rgba(55, 129, 103, 1.00);
  /* The default color for text or elements that appear on top of secondary colored elements. */
  --secondary-foreground: rgba(255, 255, 255, 1.00);
  /* The muted color used for less prominent elements, such as disabled buttons or disabled text. */
  --muted: rgba(216, 216, 216, 1.00);
  /* The default color for text or elements that appear on top of muted colored elements. */
  --muted-foreground: rgba(94, 94, 94, 1.00);
  /* The accent color used for highlights, links, and other interactive elements. */
  --accent: rgba(88, 184, 151, 1.00);
  /* The default color for text or elements that appear on top of accent colored elements. */
  --accent-foreground: rgba(255, 255, 255, 1.00);
  /* The color used for background in destructive actions, such as delete buttons or error messages. */
  --destructive: rgba(220, 53, 69, 1.00);
  /* The default color for text or elements that appear on top of destructive colored elements. */
  --destructive-foreground: rgba(255, 255, 255, 1.00);
  /* The default border color for elements such as inputs, buttons, and other containers. */
  --border: rgba(188, 188, 188, 1.00);
  /* The default background color for input fields once the text has been filled. Should be either transparent or match the input-background. */
  --input: rgba(255, 255, 255, 1.00);
  /* The default background color for input fields, text areas, and other input elements. */
  --input-background: rgba(255, 255, 255, 1.00);
  /* The color for focus rings, outlines, and other focus indicators. */
  --ring: rgba(12, 62, 78, 1.00);
  /* Shadow for small elevations, such as cards or modals. */
  --elevation-sm: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.1) 0px 1px 2px 0px;
  /* The color for chart elements, such as a bar or line in a chart. */
  --chart-1: rgba(45, 45, 134, 1.00);
  /* The color for another chart element, such as a bar or line in a chart. */
  --chart-2: rgba(230, 64, 17, 1.00);
  /* The color for another chart element, such as a bar or line in a chart. */
  --chart-3: rgba(88, 184, 151, 1.00);
  /* The color for another chart element, such as a bar or line in a chart. */
  --chart-4: rgba(151, 110, 28, 1.00);
  /* The color for another chart element, such as a bar or line in a chart. */
  --chart-5: rgba(55, 129, 103, 1.00);
  /* The default border radius for elements such as buttons, tooltip, and other containers. */
  --radius: 4px;
  /* The border radius specifically for button elements. */
  --radius-button: 16px;
  /* The background color for sidebars, navigation menus, and other persistent elements. */
  --sidebar: rgba(45, 45, 134, 1.00);
  /* The default color for text or elements that appear on top of sidebars, navigation menus, and other persistent elements. */
  --sidebar-foreground: rgba(255, 255, 255, 1.00);
  /* The primary color used for buttons, links, and other interactive elements in sidebars and navigation menus. */
  --sidebar-primary: rgba(88, 184, 151, 1.00);
  /* The default color for text or elements that appear on top of primary colored elements in sidebars and navigation menus. */
  --sidebar-primary-foreground: rgba(255, 255, 255, 1.00);
  /* The accent color used for highlights, links, and other interactive elements in sidebars and navigation menus. */
  --sidebar-accent: rgba(230, 64, 17, 1.00);
  /* The default color for text or elements that appear on top of accent colored elements in sidebars and navigation menus. */
  --sidebar-accent-foreground: rgba(255, 255, 255, 1.00);
  /* The default border color for elements in sidebars and navigation menus. */
  --sidebar-border: rgba(188, 188, 188, 1.00);
  /* The default color for focus rings, outlines, and other focus indicators in sidebars and navigation menus. */
  --sidebar-ring: rgba(12, 62, 78, 1.00);
  /* Legacy brand variables */
  --color-brand: #E30613;
  --color-brand-dark: #a80410;
  --color-secondary: #2B2B2B;
  --color-accent-blue: #2d2d86;
  --color-accent-green: #378167;
  --color-text-dark: #2B2B2B;
  --color-text-light: #666666;
  --color-bg-light: #FFFFFF;
  --color-bg-gray: #F5F5F5;
  --color-border: #E5E5E5;
  --color-brand-bg: rgba(227, 6, 19, 0.1);
}

[data-theme="partimmo"] {
  --primary: rgba(0, 163, 224, 1.00);
  --sidebar: rgba(0, 163, 224, 1.00);
  --chart-1: rgba(0, 163, 224, 1.00);
  --ring: rgba(0, 163, 224, 1.00);
  --color-brand: #00A3E0;
  --color-brand-dark: #0082b3;
  --color-brand-bg: rgba(0, 163, 224, 0.1);
}

[data-theme="partenium"] {
  --color-brand: #8B4789;
  --color-brand-dark: #6e3870;
  --color-brand-bg: rgba(139, 71, 137, 0.1);
}

.dark {
  --background: rgba(26, 26, 26, 1.00);
  --foreground: rgba(255, 255, 255, 1.00);
  --card: rgba(38, 38, 38, 1.00);
  --card-foreground: rgba(255, 255, 255, 1.00);
  --popover: rgba(38, 38, 38, 1.00);
  --popover-foreground: rgba(255, 255, 255, 1.00);
  --primary: rgba(88, 184, 151, 1.00);
  --primary-foreground: rgba(26, 26, 26, 1.00);
  --secondary: rgba(65, 145, 115, 1.00);
  --secondary-foreground: rgba(255, 255, 255, 1.00);
  --muted: rgba(64, 64, 64, 1.00);
  --muted-foreground: rgba(163, 163, 163, 1.00);
  --accent: rgba(230, 64, 17, 1.00);
  --accent-foreground: rgba(255, 255, 255, 1.00);
  --destructive: rgba(239, 68, 68, 1.00);
  --destructive-foreground: rgba(255, 255, 255, 1.00);
  --border: rgba(64, 64, 64, 1.00);
  --input: rgba(38, 38, 38, 1.00);
  --ring: rgba(88, 184, 151, 1.00);
  --chart-1: rgba(88, 184, 151, 1.00);
  --chart-2: rgba(230, 64, 17, 1.00);
  --chart-3: rgba(45, 45, 134, 1.00);
  --chart-4: rgba(151, 110, 28, 1.00);
  --chart-5: rgba(65, 145, 115, 1.00);
  --sidebar: rgba(38, 38, 38, 1.00);
  --sidebar-foreground: rgba(255, 255, 255, 1.00);
  --sidebar-primary: rgba(88, 184, 151, 1.00);
  --sidebar-primary-foreground: rgba(26, 26, 26, 1.00);
  --sidebar-accent: rgba(230, 64, 17, 1.00);
  --sidebar-accent-foreground: rgba(255, 255, 255, 1.00);
  --sidebar-border: rgba(64, 64, 64, 1.00);
  --sidebar-ring: rgba(88, 184, 151, 1.00);
}

@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-card: var(--card);
  --color-card-foreground: var(--card-foreground);
  --color-popover: var(--popover);
  --color-popover-foreground: var(--popover-foreground);
  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);
  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --color-destructive: var(--destructive);
  --color-destructive-foreground: var(--destructive-foreground);
  --color-border: var(--border);
  --color-input: var(--input);
  --color-input-background: var(--input-background);
  --color-ring: var(--ring);
  --color-chart-1: var(--chart-1);
  --color-chart-2: var(--chart-2);
  --color-chart-3: var(--chart-3);
  --color-chart-4: var(--chart-4);
  --color-chart-5: var(--chart-5);
  --radius-sm: calc(var(--radius) - 2px);
  --radius-md: var(--radius);
  --radius-lg: calc(var(--radius) + 4px);
  --radius-xl: calc(var(--radius) + 8px);
  --radius-button: var(--radius-button);
  --color-sidebar: var(--sidebar);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-border: var(--sidebar-border);
  --color-sidebar-ring: var(--sidebar-ring);
  --shadow-sm: var(--elevation-sm);
}

@layer base {
  * {
    @apply border-border outline-ring/50;
  }

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

/**
 * Base typography. This is not applied to elements which have an ancestor with a Tailwind text class.
 */
@layer base {
  :where(:not(:has([class*=" text-"]), :not(:has([class^="text-"])))) {
    h1 {
      font-family: var(--font-family-base);
      font-size: var(--text-h1);
      font-weight: var(--font-weight-bold);
      line-height: 1.2;
    }

    h2 {
      font-family: var(--font-family-base);
      font-size: var(--text-h2);
      font-weight: var(--font-weight-bold);
      line-height: 1.2;
    }

    h3 {
      font-family: var(--font-family-base);
      font-size: var(--text-h3);
      font-weight: var(--font-weight-bold);
      line-height: 1.25;
    }

    h4 {
      font-family: var(--font-family-base);
      font-size: var(--text-h4);
      font-weight: var(--font-weight-bold);
      line-height: 1.3;
    }

    p {
      font-family: var(--font-family-base);
      font-size: var(--text-base);
      font-weight: var(--font-weight-normal);
      line-height: 1.5;
    }

    label {
      font-family: var(--font-family-base);
      font-size: var(--text-label);
      font-weight: var(--font-weight-normal);
      line-height: 1.4;
    }

    button {
      font-family: var(--font-family-base);
      font-size: var(--text-base);
      font-weight: var(--font-weight-semibold);
      line-height: 1.5;
    }

    input {
      font-family: var(--font-family-base);
      font-size: var(--text-base);
      font-weight: var(--font-weight-normal);
      line-height: 1.5;
    }

    .large-body {
      font-family: var(--font-family-base);
      font-size: var(--text-large-body);
      font-weight: var(--font-weight-normal);
      line-height: 1.5;
    }

    .caption {
      font-family: var(--font-family-base);
      font-size: var(--text-caption);
      font-weight: var(--font-weight-normal);
      line-height: 1.4;
    }
  }
}

html {
  font-size: var(--font-size);
}
