/**
 * @file theme.css
 * Custom theme variables for Drupal CMS 2 Demo.
 * TU/e (Technische Universiteit Eindhoven) color scheme.
 * Primary: TU/e Red #c72125 — oklch(0.50 0.19 27)
 *
 * Based on shadcn/ui-compatible Mercury theme variables.
 * Placed in web root to override default Mercury colors.
 */

:root {
  --background: oklch(0.985 0.002 27);
  --foreground: oklch(0.145 0.015 27);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.18 0.015 27);
  --primary: oklch(0.50 0.19 27);
  --primary-foreground: oklch(1 0 0);
  --secondary: oklch(0.94 0.012 27);
  --secondary-foreground: oklch(0.26 0.02 27);
  --muted: oklch(0.955 0.006 27);
  --muted-foreground: oklch(0.42 0.02 27);
  --accent: oklch(0.92 0.04 27);
  --accent-foreground: oklch(0.145 0.015 27);
  --destructive: oklch(0.6368 0.2078 25.3313);
  --destructive-foreground: oklch(1 0 0);
  --border: oklch(0.90 0.008 27);
  --input: oklch(0.90 0.008 27);
  --font-sans: "Outfit", "Helvetica Neue", Arial, Helvetica, sans-serif;
  --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  --font-mono: "Fira Mono", "Menlo", "Consolas", "Liberation Mono", monospace;
  --radius: 0.625rem;
  --shadow-x: 0;
  --shadow-y: 1px;
  --shadow-blur: 3px;
  --shadow-spread: 0px;
  --shadow-opacity: 0.08;
  --shadow-color: oklch(0 0 0);
  --shadow-2xs: 0 1px 2px 0 hsl(180 10% 10% / 0.03);
  --shadow-xs: 0 1px 3px 0 hsl(180 10% 10% / 0.04), 0 1px 2px -1px hsl(180 10% 10% / 0.06);
  --shadow-sm: 0 1px 3px 0 hsl(180 10% 10% / 0.06), 0 2px 4px -1px hsl(180 10% 10% / 0.06);
  --shadow: 0 2px 6px 0 hsl(180 10% 10% / 0.06), 0 4px 8px -2px hsl(180 10% 10% / 0.06);
  --shadow-md: 0 4px 8px 0 hsl(180 10% 10% / 0.07), 0 6px 12px -3px hsl(180 10% 10% / 0.07);
  --shadow-lg: 0 8px 16px 0 hsl(180 10% 10% / 0.07), 0 12px 20px -4px hsl(180 10% 10% / 0.07);
  --shadow-xl: 0 12px 24px 0 hsl(180 10% 10% / 0.08), 0 16px 28px -4px hsl(180 10% 10% / 0.08);
  --shadow-2xl: 0 16px 32px 0 hsl(180 10% 10% / 0.1), 0 20px 36px -6px hsl(180 10% 10% / 0.1);
  --tracking-normal: 0em;
  --spacing: 0.25rem;

  /* Set navbar height for hero billboard overlay */
  --navbar-height: calc(var(--spacing) * 15);

  @media (min-width: 768px) {
    --navbar-height: calc(var(--spacing) * 18);
  }
}

/* Language switcher in navbar */
.language-switcher {
  position: fixed;
  top: 0.75rem;
  right: 4rem;
  z-index: 600;
  display: flex;
  gap: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 500;
}

@media (min-width: 768px) {
  .language-switcher {
    top: 1.25rem;
    right: 2rem;
  }
}

.language-switcher__link {
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--muted-foreground);
  transition: background 0.15s, color 0.15s;
}

.language-switcher__link:hover {
  background: var(--secondary);
  color: var(--foreground);
}

.language-switcher__link.is-active {
  background: var(--primary);
  color: var(--primary-foreground);
}

/* Round user profile pictures everywhere */
.field--name-user-picture {
  display: inline-block;
  overflow: hidden;
  border-radius: 9999px;
}

.field--name-user-picture img,
img[alt^="Profile picture"] {
  border-radius: 9999px;
  object-fit: cover;
  aspect-ratio: 1;
}

/* Smaller h2 titles in blog and news listing views */
.view-blog-listing h2,
.view-news-listing h2 {
  font-size: 1.5rem;
  line-height: 1.333;
}

@media (min-width: 768px) {
  .view-blog-listing h2,
  .view-news-listing h2 {
    font-size: 1.75rem;
    line-height: 1.3;
  }
}

/* Smaller h2 titles on blog and news detail pages */
.page-node-type-blog article h2,
.page-node-type-news article h2 {
  font-size: 1.5rem;
  line-height: 1.333;
}

@media (min-width: 768px) {
  .page-node-type-blog article h2,
  .page-node-type-news article h2 {
    font-size: 1.75rem;
    line-height: 1.3;
  }
}

/* Style tags on blog and news detail pages */
.field--name-field-tags {
  margin-top: 2rem;
}

.field--name-field-tags .field__label {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.field--name-field-tags > div:has(.field__item) {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.field--name-field-tags .field__item a {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--secondary);
  color: var(--secondary-foreground);
  border-radius: var(--radius);
  font-size: 0.875rem;
  text-decoration: none;
  transition: background 0.15s;
}

.field--name-field-tags .field__item a:hover {
  background: var(--accent);
}

/* Remove top border line in footer (keep only the bottom one) */
.site-footer > div > div:first-child {
  border-top: none;
}

.dark {
  --background: oklch(0.14 0.015 27);
  --foreground: oklch(0.96 0.005 27);
  --card: oklch(0.19 0.015 27);
  --card-foreground: oklch(0.96 0.005 27);
  --primary: oklch(0.55 0.19 27);
  --primary-foreground: oklch(1 0 0);
  --secondary: oklch(0.7 0.04 27);
  --secondary-foreground: oklch(0.14 0.015 27);
  --muted: oklch(0.25 0.015 27);
  --muted-foreground: oklch(0.7 0.01 27);
  --accent: oklch(0.35 0.06 27);
  --accent-foreground: oklch(0.96 0.005 27);
  --destructive: oklch(0.6368 0.2078 25.3313);
  --destructive-foreground: oklch(1 0 0);
  --border: oklch(0.3 0.015 27);
  --input: oklch(0.3 0.015 27);
  --font-sans: "Outfit", "Helvetica Neue", Arial, Helvetica, sans-serif;
  --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  --font-mono: "Fira Mono", "Menlo", "Consolas", "Liberation Mono", monospace;
  --radius: 0.625rem;
  --shadow-x: 0;
  --shadow-y: 1px;
  --shadow-blur: 3px;
  --shadow-spread: 0px;
  --shadow-opacity: 0.1;
  --shadow-color: oklch(0 0 0);
  --shadow-2xs: 0 1px 2px 0 hsl(0 0% 0% / 0.05);
  --shadow-xs: 0 1px 3px 0 hsl(0 0% 0% / 0.05);
  --shadow-sm: 0 1px 3px 0 hsl(0 0% 0% / 0.08), 0 1px 2px -1px hsl(0 0% 0% / 0.08);
  --shadow: 0 2px 6px 0 hsl(0 0% 0% / 0.1), 0 4px 8px -2px hsl(0 0% 0% / 0.1);
  --shadow-md: 0 4px 8px 0 hsl(0 0% 0% / 0.12), 0 6px 12px -3px hsl(0 0% 0% / 0.12);
  --shadow-lg: 0 8px 16px 0 hsl(0 0% 0% / 0.12), 0 12px 20px -4px hsl(0 0% 0% / 0.12);
  --shadow-xl: 0 12px 24px 0 hsl(0 0% 0% / 0.14), 0 16px 28px -4px hsl(0 0% 0% / 0.14);
  --shadow-2xl: 0 16px 32px 0 hsl(0 0% 0% / 0.16), 0 20px 36px -6px hsl(0 0% 0% / 0.16);
}
