/**
 * @file theme.css
 * shadcn/ui-compatible theme variables for Rtscap.
 *
 * You can customize these values without rebuilding the compiled CSS.
 * Tools like https://tweakcn.com can help generate these values. Copy this
 * file to your web root, so it sits next to index.php, and clear Drupal's
 * cache. Then, any changes you make in this file should be reflected right away.
 */

:root {
  --background: oklch(1 0 0);
  --foreground: #090909;
  --color-gray-500: #727272;
  --color-brand-blue: #0073e6;
  --color-blue: #0073e6;
  --card: oklch(0.967 0.003 264.542);
  --card-foreground: oklch(0.21 0.032 264.665);
  --primary: oklch(0.547 0.246 262.866);
  --primary-foreground: oklch(1 0 0);
  --secondary: oklch(0.9219 0 0);
  --secondary-foreground: oklch(0.28 0.041 260.329);
  --muted: oklch(0.967 0.003 264.542);
  --muted-foreground: #090909;
  --accent: oklch(0.932 0.032 255.585);
  --accent-foreground: var(--foreground);
  --destructive: oklch(0.6368 0.2078 25.3313);
  --destructive-foreground: oklch(1 0 0);
  --border: oklch(0.872 0.009 258.338);
  --input: oklch(0.872 0.009 258.338);
  --font-sans: "Proxima Nova", "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;
  --font-body: "Proxima Nova", "Helvetica Neue", Arial, Helvetica, sans-serif;
  --font-display: "Proxima Nova", "Helvetica Neue", Arial, Helvetica, sans-serif;
  --radius: 0.5rem;
  --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 3px 1px hsl(0 0% 0% / 0.05);
  --shadow-xs: 0 1px 3px 1px hsl(0 0% 0% / 0.05), 0 1px 2px -1px hsl(0 0% 0% / 0.1);
  --shadow-sm: 0 1px 3px 1px hsl(0 0% 0% / 0.1), 0 2px 4px -1px hsl(0 0% 0% / 0.1);
  --shadow: 0 1px 3px 1px hsl(0 0% 0% / 0.1), 0 2px 4px -1px hsl(0 0% 0% / 0.1);
  --shadow-md: 0 1px 3px 1px hsl(0 0% 0% / 0.1), 0 4px 6px -2px hsl(0 0% 0% / 0.1);
  --shadow-lg: 0 1px 3px 1px hsl(0 0% 0% / 0.1), 0 8px 10px -2px hsl(0 0% 0% / 0.1);
  --shadow-xl: 0 1px 3px 1px hsl(0 0% 0% / 0.1), 0 12px 14px -3px hsl(0 0% 0% / 0.1);
  --shadow-2xl: 0 1px 3px 1px hsl(0 0% 0% / 0.1), 0 16px 18px -3px hsl(0 0% 0% / 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);
  }
}

.dark {
  --background: #090909;
  --foreground: oklch(1 0 89.876);
  --card: oklch(0.208 0.042 266.359);
  --card-foreground: var(--foreground);
  --primary: oklch(0.547 0.246 262.866);
  --primary-foreground: var(--foreground);
  --secondary: oklch(0.704 0.04 256.993);
  --secondary-foreground: #090909;
  --muted: oklch(0.28 0.041 260.329);
  --muted-foreground: oklch(0.967 0.003 264.542);
  --accent: oklch(0.932 0.032 255.585);
  --accent-foreground: #090909;
  --destructive: oklch(0.6368 0.2078 25.3313);
  --destructive-foreground: oklch(1 0 0);
  --border: oklch(0.373 0.031 259.733);
  --input: oklch(0.373 0.031 259.733);
  --font-sans: "Proxima Nova", "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;
  --font-body: "Proxima Nova", "Helvetica Neue", Arial, Helvetica, sans-serif;
  --font-display: "Proxima Nova", "Helvetica Neue", Arial, Helvetica, sans-serif;
  --radius: 0.5rem;
  --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 3px 0px hsl(0 0% 0% / 0.05);
  --shadow-xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
  --shadow-sm: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);
  --shadow: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);
  --shadow-md: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 2px 4px -1px hsl(0 0% 0% / 0.1);
  --shadow-lg: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 4px 6px -1px hsl(0 0% 0% / 0.1);
  --shadow-xl: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 8px 10px -1px hsl(0 0% 0% / 0.1);
  --shadow-2xl: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 12px 14px -1px hsl(0 0% 0% / 0.1);
}

/* Drupal 11 Navigation / Admin Toolbar integration */
:root {
  --admin-toolbar-top-bar-height: 0px;
  --admin-toolbar-sidebar-width: 0px;
}

html[data-admin-toolbar] {
  --admin-toolbar-top-bar-height: 48px;
}

@media (min-width: 64rem) {
  html[data-admin-toolbar] {
    --admin-toolbar-sidebar-width: 4.5rem;
  }
  html[data-admin-toolbar="expanded"] {
    --admin-toolbar-sidebar-width: 16.5rem;
  }
}

/* Adjust fixed main header when admin toolbar is present */
html[data-admin-toolbar] .main-header {
  top: var(--admin-toolbar-top-bar-height, 0px) !important;
  left: var(--admin-toolbar-sidebar-width, 0px) !important;
  width: calc(100% - var(--admin-toolbar-sidebar-width, 0px)) !important;
}

/* On mobile with admin toolbar, keep header sticky below relative admin bars */
@media (max-width: 63.99rem) {
  body.user-logged-in:has(#admin-toolbar) .main-header {
    position: sticky !important;
    top: 0 !important;
  }
}

/* Adjust off-canvas menu when admin toolbar is present */
html[data-admin-toolbar] #headerNav {
  top: var(--admin-toolbar-top-bar-height, 0px) !important;
  left: var(--admin-toolbar-sidebar-width, 0px) !important;
  height: calc(100dvh - var(--admin-toolbar-top-bar-height, 0px)) !important;
  max-height: calc(100dvh - var(--admin-toolbar-top-bar-height, 0px)) !important;
}

:is(.admin-toolbar, #admin-toolbar, [data-drupal-admin-styles], .admin-toolbar-control-bar) {
  z-index: 1000 !important;
}

/* Ensure popover wrappers do not block sidebar buttons when closed */
[data-toolbar-popover-wrapper] {
  pointer-events: none;
}

[data-toolbar-popover-control][aria-expanded="true"] + [data-toolbar-popover-wrapper],
.toolbar-popover--expanded [data-toolbar-popover-wrapper] {
  pointer-events: auto;
}

/* Eliminate gap between sidebar and popover submenu for seamless hover transition */
html[data-admin-toolbar] [data-toolbar-popover-wrapper] {
  inset-inline-start: 0px !important;
}

[data-toolbar-popover-control][aria-expanded="true"] + [data-toolbar-popover-wrapper]::before,
.toolbar-popover--expanded [data-toolbar-popover-wrapper]::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  inset-inline-start: -24px;
  width: 24px;
  pointer-events: auto;
}

.top-bar {
  z-index: 999 !important;
}

#headerNav:not(.translate-x-0) {
  pointer-events: none !important;
}

#headerNav.translate-x-0 {
  pointer-events: auto !important;
  z-index: 1002 !important;
}

#headerNavBackdrop.opacity-0 {
  pointer-events: none !important;
}

#headerNavBackdrop.opacity-100 {
  pointer-events: auto !important;
  z-index: 1001 !important;
}

