/* Theme Variables CSS */

:root {
  /* Default light theme variables - using shadcn UI HSL format */
  --background: 0 0% 98%; /* light: off-white instead of pure white */
  --foreground: 0 0% 9%;   /* dark: near-black for better contrast */
  --card: 0 0% 97%; /* surface: warm off-white for cards — avoids pure white for readability */
  --card-foreground: 0 0% 9%; /* near-black text on cards */
  --popover: 0 0% 97%; /* surface: warm off-white for popovers */
  --popover-foreground: 0 0% 9%; /* near-black text on popovers */
  --primary: 221 83% 53%; /* blue primary for better contrast */
  --primary-foreground: 0 0% 98%; /* light text on primary */
  --secondary: 210 40% 96%; /* light grey secondary */
  --secondary-foreground: 222 84% 5%; /* dark text on secondary */
  --muted: 210 40% 96%;
  --muted-foreground: 215 16% 47%; /* muted text color */
  --accent: 210 40% 96%; /* accent matches secondary */
  --accent-foreground: 222 84% 5%; /* dark text on accent */
  --destructive: 0 84% 60%;
  --destructive-foreground: 210 40% 98%;
  --border: 214 32% 91%; /* light grey border */
  --input: 214 32% 91%; /* light grey input border */
  --ring: 221 83% 53%; /* ring matches primary */
  /* Dropdown / select list hover & selection — darker than accent/muted for visibility */
  --menu-highlight: 210 25% 82%;
  --menu-highlight-foreground: 0 0% 9%;
  --radius: 0.5rem;
  --mellowYellow: 60 100% 50%; /* soft yellow */
  --purpleRain: 270 100% 25%;  /* deep purple */
  --blueSky: 200 100% 50%;     /* bright blue */

  /* Modular spacing scale */
  --spacing-0: 0;
  --spacing-1: 0.5rem;    /* 8px */
  --spacing-2: 1rem;      /* 16px */
  --spacing-3: 1.5rem;    /* 24px */
  --spacing-4: 2rem;      /* 32px */
  --spacing-5: 3rem;      /* 48px */
  
  /* Typography scale */
  --font-size-h1: 2rem;         /* 32px */
  --font-size-h2: 1.5rem;       /* 24px */
  --font-size-h3: 1.25rem;      /* 20px */
  --font-size-h4: 1rem;         /* 16px */
  --font-size-h5: 0.875rem;     /* 14px */
  --font-size-body: 1rem;       /* 16px */
  --font-size-small: 0.875rem;  /* 14px */
  --font-size-xs: 0.75rem;      /* 12px */
  
  /* Line heights */
  --line-height-h1: 1.2;
  --line-height-h2: 1.25;
  --line-height-h3: 1.3;
  --line-height-h4: 1.35;
  --line-height-h5: 1.4;
  --line-height-body: 1.5;

  /* Document and Slideshow specific theme variables */
  --document-bg: hsl(var(--background));
  --document-text: hsl(var(--foreground));
  --document-border: hsl(var(--border));
  --document-primary: hsl(var(--primary));
  --document-secondary: hsl(var(--secondary));
  --document-muted: hsl(var(--muted));
  --document-muted-text: hsl(var(--muted-foreground));
  --document-card-bg: hsl(var(--card));
  --document-card-text: hsl(var(--card-foreground));
  --document-accent: hsl(var(--accent));
  --document-accent-text: hsl(var(--accent-foreground));
}

/* Global theme transition rules to prevent flickering */
html {
  transition: background-color 0.3s ease, 
              color 0.3s ease, 
              border-color 0.3s ease !important;
}

/* Optimized: Only apply transitions to specific elements, not all elements */
body,
header, nav, main, footer,
.card, .card-content,
[class*="theme-transition"]:not(button):not(.button):not(.btn) {
  transition-property: background-color, color, border-color, box-shadow;
  transition-duration: 0.3s;
  transition-timing-function: ease;
}

/* Fast button interactions - buttons should transition quickly and be prioritized */
/* Use high specificity to override any other transition rules */
button, .button, .btn,
button *, .button *, .btn *,
.theme-transition button,
.theme-transition .button,
.theme-transition .btn,
.theme-transition button *,
.theme-transition .button *,
.theme-transition .btn * {
  transition: background-color 0.15s ease, 
              color 0.15s ease, 
              border-color 0.15s ease,
              box-shadow 0.15s ease,
              transform 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Modal animations */
.dialog-content, .modal-content {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Theme transition for smooth color changes - but exclude buttons for faster rendering */
/* Use descendant selector to exclude all nested buttons */
.theme-transition:not(button):not(.button):not(.btn),
.theme-transition :not(button):not(.button):not(.btn) {
  transition: background-color 0.3s ease, 
              color 0.3s ease, 
              border-color 0.3s ease,
              box-shadow 0.3s ease;
}

/* Fix for select components to prevent flickering */
.select-content[data-state="open"] {
  animation: none !important;
}

/* Dropdown menu specific fixes */
.dropdown-menu[data-state="open"],
.dropdown-menu-content[data-state="open"] {
  animation: none !important;
  transition: opacity 0.2s ease !important;
}

/* Popover / attach-lesson list rows — darker hover & selection per theme */
.menu-list-item-hover:hover,
.menu-list-item-hover:focus-visible {
  background-color: hsl(var(--menu-highlight));
  color: hsl(var(--menu-highlight-foreground));
}

.menu-list-item-selected {
  background-color: hsl(var(--menu-highlight));
  color: hsl(var(--menu-highlight-foreground));
}

/* Prevent background flashes.
   NOTE: `transform: translateZ(0)` was removed because it creates a CSS
   containing block, which breaks `position: fixed` descendants (they anchor
   to the transformed ancestor instead of the viewport — e.g. the mobile
   bottom nav ended up stuck near the top of the page). Modern browsers
   already promote elements with `will-change` to their own compositor layer,
   so the hack is no longer required. */
.theme-transition {
  will-change: background-color, color;
  backface-visibility: hidden;
}

/* Force hardware acceleration for smoother transitions.
   Same rationale as above — no `transform: translateZ(0)` here so fixed
   descendants (mobile bottom nav, modals, toasts) remain anchored to the
   viewport rather than any of these containers. */
body, 
.card, 
.button, 
.nav, 
.header, 
.footer,
.dropdown-menu,
.popover,
.dialog,
.toast {
  will-change: background-color, color, border-color;
  backface-visibility: hidden;
}

/* Use theme variables in your styles */
.themed-container {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.themed-button {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.themed-button:hover {
  background-color: hsl(var(--primary) / 0.9);
}

.themed-button:active {
  background-color: hsl(var(--primary) / 0.8);
}

.themed-secondary-button {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  cursor: pointer;
}

.themed-secondary-button:hover {
  background-color: hsl(var(--secondary) / 0.9);
}

.themed-secondary-button:active {
  background-color: hsl(var(--secondary) / 0.8);
}

.themed-error {
  color: hsl(var(--destructive));
}

/* Custom hover styles for mellow yellow elements */
.hover\:bg-mellowYellow:hover {
  background-color: hsl(var(--primary)) !important;
}

/* Dark theme — Apple grouped OLED: black canvas, cool-neutral lift, inverted plate, blue tint */
.dark, [data-theme="dark"] {
  --background: 0 0% 0%; /* #000000 canvas */
  --foreground: 0 0% 100%; /* label */
  --card: 240 4% 11%; /* #1C1C1E surface */
  --card-foreground: 0 0% 100%;
  --popover: 240 4% 11%;
  --popover-foreground: 0 0% 100%;
  --primary: 240 11% 97%; /* #F5F5F7 plate — nav/CTA fill, not tint */
  --primary-foreground: 0 0% 0%; /* black ink on plate */
  --secondary: 240 2% 18%; /* #2C2C2E raised */
  --secondary-foreground: 0 0% 100%;
  --muted: 240 2% 18%;
  --muted-foreground: 240 2% 57%; /* #8E8E93 secondary label */
  --accent: 240 2% 18%;
  --accent-foreground: 240 14% 93%; /* #EBEBF5 */
  --destructive: 4 100% 61%; /* #FF453A */
  --destructive-foreground: 0 0% 100%;
  --border: 240 2% 22%; /* #38383A separator */
  --input: 240 2% 22%;
  --tint: 211 100% 52%; /* #0A84FF focus/links/charts */
  --ring: 211 100% 52%;
  --menu-highlight: 240 2% 18%;
  --menu-highlight-foreground: 0 0% 100%;
  --mellowYellow: 60 100% 60%;
  --purpleRain: 270 100% 35%;
  --blueSky: 200 100% 60%;
}

/* Dark theme (night) - label white; muted/secondary ranks stay readable */
.dark p:not(.text-muted-foreground):not(.text-secondary-foreground),
.dark h1, .dark h2, .dark h3, .dark h4, .dark h5, .dark h6,
.dark span:not(.text-muted-foreground):not(.text-secondary-foreground),
.dark div:not(.text-muted-foreground):not(.text-secondary-foreground),
.dark label:not(.text-muted-foreground):not(.text-secondary-foreground),
.dark li:not(.text-muted-foreground):not(.text-secondary-foreground),
.dark a:not(.text-muted-foreground):not(.text-secondary-foreground):not(.bg-primary),
[data-theme="dark"] p:not(.text-muted-foreground):not(.text-secondary-foreground),
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3,
[data-theme="dark"] h4, [data-theme="dark"] h5, [data-theme="dark"] h6,
[data-theme="dark"] span:not(.text-muted-foreground):not(.text-secondary-foreground),
[data-theme="dark"] div:not(.text-muted-foreground):not(.text-secondary-foreground),
[data-theme="dark"] label:not(.text-muted-foreground):not(.text-secondary-foreground),
[data-theme="dark"] li:not(.text-muted-foreground):not(.text-secondary-foreground),
[data-theme="dark"] a:not(.text-muted-foreground):not(.text-secondary-foreground):not(.bg-primary) {
  color: hsl(var(--foreground)) !important;
}

.dark .text-muted-foreground,
.dark .text-muted-foreground *,
[data-theme="dark"] .text-muted-foreground,
[data-theme="dark"] .text-muted-foreground * {
  color: hsl(var(--muted-foreground)) !important;
}

.dark .text-secondary-foreground,
.dark .text-secondary-foreground *,
[data-theme="dark"] .text-secondary-foreground,
[data-theme="dark"] .text-secondary-foreground * {
  color: hsl(var(--secondary-foreground)) !important;
}

/* Canvas icons white; plates (default / bg-primary) get black glyphs below */
.dark svg:not([class*="text-"]),
[data-theme="dark"] svg:not([class*="text-"]) {
  color: #ffffff !important;
  stroke: #ffffff !important;
}

.dark svg[class*="text-red"],
.dark svg[class*="text-yellow"],
.dark svg[class*="text-blue"],
.dark svg[class*="text-green"],
.dark svg[class*="text-gray"],
.dark svg[class*="text-slate"],
[data-theme="dark"] svg[class*="text-red"],
[data-theme="dark"] svg[class*="text-yellow"],
[data-theme="dark"] svg[class*="text-blue"],
[data-theme="dark"] svg[class*="text-green"],
[data-theme="dark"] svg[class*="text-gray"],
[data-theme="dark"] svg[class*="text-slate"] {
  stroke: currentColor !important;
}

/* Override dark Tailwind text classes to use white/light in dark theme */
.dark .text-gray-600,
.dark .text-gray-700,
.dark .text-gray-800,
.dark .text-gray-900,
[data-theme="dark"] .text-gray-600,
[data-theme="dark"] .text-gray-700,
[data-theme="dark"] .text-gray-800,
[data-theme="dark"] .text-gray-900,
.dark .text-slate-600,
.dark .text-slate-700,
.dark .text-slate-800,
.dark .text-slate-900,
[data-theme="dark"] .text-slate-600,
[data-theme="dark"] .text-slate-700,
[data-theme="dark"] .text-slate-800,
[data-theme="dark"] .text-slate-900,
.dark .text-zinc-600,
.dark .text-zinc-700,
.dark .text-zinc-800,
.dark .text-zinc-900,
[data-theme="dark"] .text-zinc-600,
[data-theme="dark"] .text-zinc-700,
[data-theme="dark"] .text-zinc-800,
[data-theme="dark"] .text-zinc-900 {
  color: #e5e7eb !important;
}

/* Semantic colors - use lighter variants for dark theme */
.dark .text-red-600,
.dark .text-red-700,
.dark .text-red-800,
[data-theme="dark"] .text-red-600,
[data-theme="dark"] .text-red-700,
[data-theme="dark"] .text-red-800 {
  color: #fca5a5 !important;
}

.dark .text-blue-600,
.dark .text-blue-700,
.dark .text-blue-800,
.dark .text-blue-900,
[data-theme="dark"] .text-blue-600,
[data-theme="dark"] .text-blue-700,
[data-theme="dark"] .text-blue-800,
[data-theme="dark"] .text-blue-900 {
  color: #93c5fd !important;
}

.dark .text-yellow-600,
.dark .text-yellow-700,
.dark .text-yellow-800,
[data-theme="dark"] .text-yellow-600,
[data-theme="dark"] .text-yellow-700,
[data-theme="dark"] .text-yellow-800 {
  color: #fde047 !important;
}

.dark .text-green-600,
.dark .text-green-700,
.dark .text-green-800,
[data-theme="dark"] .text-green-600,
[data-theme="dark"] .text-green-700,
[data-theme="dark"] .text-green-800 {
  color: #86efac !important;
}

/* ---------------------------------------------------------------------------
   Button variants are matched on `data-variant`, which src/components/ui/button.tsx
   sets from the cva variant prop.

   They must NOT be matched on the class list. Every variant's classes contain
   `focus-visible:outline-none`, so `[class*="outline"]` matches EVERY button —
   including `variant="default"` ones carrying `bg-primary`. That is what used
   to strip the fill off primary buttons in light theme.
--------------------------------------------------------------------------- */

/* Dark theme buttons — plate (default) is black ink; secondary/destructive stay white */
.dark button[data-variant="secondary"],
.dark button[data-variant="destructive"],
.dark button[data-variant="link"],
.dark .button[data-variant="secondary"],
.dark .button[data-variant="destructive"],
.dark .btn[data-variant="secondary"],
.dark .btn[data-variant="destructive"],
[data-theme="dark"] button[data-variant="secondary"],
[data-theme="dark"] button[data-variant="destructive"],
[data-theme="dark"] button[data-variant="link"],
[data-theme="dark"] .button[data-variant="secondary"],
[data-theme="dark"] .button[data-variant="destructive"],
[data-theme="dark"] .btn[data-variant="secondary"],
[data-theme="dark"] .btn[data-variant="destructive"] {
  color: #ffffff !important;
}

.dark button[data-variant="default"],
.dark button[data-variant="default"] span,
.dark button[data-variant="default"] p,
.dark .button[data-variant="default"],
.dark .btn[data-variant="default"],
.dark .bg-primary,
.dark .bg-primary span,
.dark a.bg-primary,
[data-theme="dark"] button[data-variant="default"],
[data-theme="dark"] button[data-variant="default"] span,
[data-theme="dark"] button[data-variant="default"] p,
[data-theme="dark"] .button[data-variant="default"],
[data-theme="dark"] .btn[data-variant="default"],
[data-theme="dark"] .bg-primary,
[data-theme="dark"] .bg-primary span,
[data-theme="dark"] a.bg-primary {
  color: #000000 !important;
}

.dark button svg,
.dark .button svg,
.dark .btn svg,
.dark a svg,
[data-theme="dark"] button svg,
[data-theme="dark"] .button svg,
[data-theme="dark"] .btn svg,
[data-theme="dark"] a svg {
  color: #ffffff !important;
  stroke: #ffffff !important;
}

.dark button[data-variant="default"] svg,
.dark .button[data-variant="default"] svg,
.dark .btn[data-variant="default"] svg,
.dark .bg-primary svg,
.dark a.bg-primary svg,
[data-theme="dark"] button[data-variant="default"] svg,
[data-theme="dark"] .button[data-variant="default"] svg,
[data-theme="dark"] .btn[data-variant="default"] svg,
[data-theme="dark"] .bg-primary svg,
[data-theme="dark"] a.bg-primary svg {
  color: #000000 !important;
  stroke: #000000 !important;
}

.dark button[data-variant="outline"],
.dark button[data-variant="ghost"],
.dark .button[data-variant="outline"],
.dark .button[data-variant="ghost"],
[data-theme="dark"] button[data-variant="outline"],
[data-theme="dark"] button[data-variant="ghost"],
[data-theme="dark"] .button[data-variant="outline"],
[data-theme="dark"] .button[data-variant="ghost"] {
  color: #ffffff !important;
  border-color: hsl(var(--border)) !important;
}

.dark button[data-variant="outline"] svg,
.dark button[data-variant="ghost"] svg,
.dark .button[data-variant="outline"] svg,
.dark .button[data-variant="ghost"] svg,
[data-theme="dark"] button[data-variant="outline"] svg,
[data-theme="dark"] button[data-variant="ghost"] svg,
[data-theme="dark"] .button[data-variant="outline"] svg,
[data-theme="dark"] .button[data-variant="ghost"] svg {
  color: #ffffff !important;
  stroke: #ffffff !important;
}

/* Ghost/outline hover: Apple tertiary fill, white ink (not mid-grey) */
.dark button[data-variant="outline"]:hover,
.dark button[data-variant="ghost"]:hover,
.dark .button[data-variant="outline"]:hover,
.dark .button[data-variant="ghost"]:hover,
[data-theme="dark"] button[data-variant="outline"]:hover,
[data-theme="dark"] button[data-variant="ghost"]:hover,
[data-theme="dark"] .button[data-variant="outline"]:hover,
[data-theme="dark"] .button[data-variant="ghost"]:hover {
  background-color: rgba(120, 120, 128, 0.24) !important;
  color: #ffffff !important;
}

.dark button[data-variant="outline"]:hover svg,
.dark button[data-variant="ghost"]:hover svg,
.dark .button[data-variant="outline"]:hover svg,
.dark .button[data-variant="ghost"]:hover svg,
[data-theme="dark"] button[data-variant="outline"]:hover svg,
[data-theme="dark"] button[data-variant="ghost"]:hover svg,
[data-theme="dark"] .button[data-variant="outline"]:hover svg,
[data-theme="dark"] .button[data-variant="ghost"]:hover svg {
  color: #ffffff !important;
  stroke: #ffffff !important;
}

/* iOS dark field: filled card, separator hairline, tint focus */
.dark input,
.dark select,
.dark textarea,
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  color: #ffffff !important;
  background-color: hsl(var(--card)) !important;
  border-color: hsl(var(--border)) !important;
}

.dark input:focus,
.dark input:focus-visible,
.dark select:focus,
.dark select:focus-visible,
.dark textarea:focus,
.dark textarea:focus-visible,
[data-theme="dark"] input:focus,
[data-theme="dark"] input:focus-visible,
[data-theme="dark"] select:focus,
[data-theme="dark"] select:focus-visible,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] textarea:focus-visible {
  outline: 2px solid hsl(var(--tint)) !important;
  outline-offset: 2px !important;
  /* Beat Tailwind focus-visible:ring-* so the tint stays visible */
  box-shadow: 0 0 0 2px hsl(var(--background)), 0 0 0 4px hsl(var(--tint)) !important;
}

.dark input::placeholder,
.dark textarea::placeholder,
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
  color: rgba(235, 235, 245, 0.3) !important;
}

/* Theme-specific styles based on data-theme attribute */
[data-theme="dark"] .themed-card {
  box-shadow: none;
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
}

[data-theme="light"] .themed-card {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  background-color: hsl(var(--card));
  border: 1px solid rgba(0, 0, 0, 0.8); /* Darkened border */
}

/* Light theme (day) - blue primary for buttons, black nav highlight only, white text on black */
[data-theme="light"] {
  --primary: 221 83% 53%; /* blue for primary buttons (Check Availability, etc.) - no black fill */
  --primary-foreground: 0 0% 100%; /* white text on primary (when primary is dark) */
  --ring: 221 83% 53%; /* blue ring for focus */
  --menu-highlight: 210 25% 82%;
  --menu-highlight-foreground: 0 0% 9%;
}

/* Unstyled buttons - transparent with subtle border (no black fill).
   Anything that brings its own surface is left alone: the shadcn variants via
   `data-variant`, and hand-rolled buttons via `[class*="bg-"]`. */
[data-theme="light"] button:not(nav button):not(.nav-button):not(header button):not(footer button):not([data-variant="outline"]):not([data-variant="ghost"]):not([data-variant="link"]):not([data-variant="secondary"]):not([data-variant="destructive"]):not([class*="navbar"]):not([class*="header"]):not([class*="bg-"]):not([data-no-outline]),
[data-theme="light"] .button:not([data-variant="outline"]):not([data-variant="ghost"]):not([data-variant="link"]):not([data-variant="secondary"]):not([data-variant="destructive"]):not([class*="bg-"]):not([data-no-outline]),
[data-theme="light"] .btn:not([data-variant="outline"]):not([data-variant="ghost"]):not([data-variant="link"]):not([data-variant="secondary"]):not([data-variant="destructive"]):not([class*="bg-"]):not([data-no-outline]) {
  background-color: transparent !important;
  color: black !important;
  border: 1px solid hsl(var(--border)) !important;
}

/* No border for elements that opt out (e.g. reviews link, inline actions) */
[data-theme="light"] button[data-no-outline],
[data-theme="light"] .button[data-no-outline],
[data-theme="light"] [data-no-outline] {
  border: none !important;
  box-shadow: none !important;
}

[data-theme="light"] button:not(nav button):not(.nav-button):not(header button):not(footer button):not([data-variant="outline"]):not([data-variant="ghost"]):not([data-variant="link"]):not([data-variant="secondary"]):not([data-variant="destructive"]):not([class*="navbar"]):not([class*="header"]):not([class*="bg-"]):hover,
[data-theme="light"] .button:not([data-variant="outline"]):not([data-variant="ghost"]):not([data-variant="link"]):not([data-variant="secondary"]):not([data-variant="destructive"]):not([class*="bg-"]):hover,
[data-theme="light"] .btn:not([data-variant="outline"]):not([data-variant="ghost"]):not([data-variant="link"]):not([data-variant="secondary"]):not([data-variant="destructive"]):not([class*="bg-"]):hover {
  background-color: rgba(0, 0, 0, 0.05) !important;
  color: black !important;
  border: 1px solid hsl(var(--border)) !important;
}

/* Outline and ghost buttons - subtle border (no heavy black outline) */
[data-theme="light"] button[data-variant="outline"],
[data-theme="light"] .button[data-variant="outline"],
[data-theme="light"] button[data-variant="ghost"]:not(nav button):not(.navbar button):not(header button):not(footer button):not([data-no-outline]),
[data-theme="light"] .button[data-variant="ghost"]:not(nav .button):not(.navbar .button):not(header .button):not(footer .button):not([data-no-outline]) {
  border: 1px solid hsl(var(--border)) !important;
  color: black !important;
  background-color: transparent !important;
}

[data-theme="light"] button[data-variant="outline"]:hover,
[data-theme="light"] .button[data-variant="outline"]:hover,
[data-theme="light"] button[data-variant="ghost"]:not(nav button):not(.navbar button):not(header button):not(footer button):not([data-no-outline]):hover,
[data-theme="light"] .button[data-variant="ghost"]:not(nav .button):not(.navbar .button):not(header .button):not(footer .button):not([data-no-outline]):hover {
  background-color: rgba(0, 0, 0, 0.05) !important;
  color: black !important;
  border: 1px solid hsl(var(--border)) !important;
}

/* No outline: nav alert/notification, theme toggle, avatar/DP, footer About Us & Plans */
[data-theme="light"] nav button[data-variant="ghost"],
[data-theme="light"] nav .button[data-variant="ghost"],
[data-theme="light"] .navbar button[data-variant="ghost"],
[data-theme="light"] .navbar .button[data-variant="ghost"],
[data-theme="light"] header button[data-variant="ghost"],
[data-theme="light"] header .button[data-variant="ghost"],
[data-theme="light"] footer button,
[data-theme="light"] footer .button {
  border: none !important;
  box-shadow: none !important;
}

[data-theme="light"] nav button[data-variant="ghost"]:hover,
[data-theme="light"] nav .button[data-variant="ghost"]:hover,
[data-theme="light"] .navbar button[data-variant="ghost"]:hover,
[data-theme="light"] .navbar .button[data-variant="ghost"]:hover,
[data-theme="light"] header button[data-variant="ghost"]:hover,
[data-theme="light"] header .button[data-variant="ghost"]:hover,
[data-theme="light"] footer button:hover,
[data-theme="light"] footer .button:hover {
  border: none !important;
  box-shadow: none !important;
}

[data-theme="light"] a {
  color: black;
}

[data-theme="light"] a:hover {
  color: white;
  background-color: black;
}

[data-theme="light"] svg:not([class*="text-"]) {
  color: black;
}

/* Icons: black by default; white only when inside nav hover/active (black bg) */
[data-theme="light"] button:hover svg:not(nav button svg):not(.navbar button svg):not(.nav-button svg):not(.header button svg),
[data-theme="light"] .button:hover svg:not(nav .button svg):not(.navbar .button svg),
[data-theme="light"] .btn:hover svg:not(nav .btn svg):not(.navbar .btn svg),
[data-theme="light"] a:hover svg:not(nav a svg):not(.navbar a svg) {
  color: black !important;
}

/* Nav bar: black highlight with white text when hovered or selected */
[data-theme="light"] nav button,
[data-theme="light"] .navbar button,
[data-theme="light"] .nav-button,
[data-theme="light"] .header button,
[data-theme="light"] .logo,
[data-theme="light"] .brand,
[data-theme="light"] .my-pace,
[data-theme="light"] nav a,
[data-theme="light"] .navbar a {
  background-color: transparent;
  color: black;
  border: none;
  outline: none;
  box-shadow: none;
}

[data-theme="light"] nav button:hover,
[data-theme="light"] nav button[data-state="active"],
[data-theme="light"] nav a.bg-primary,
[data-theme="light"] .navbar button:hover,
[data-theme="light"] .navbar button[data-state="active"],
[data-theme="light"] .nav-button:hover,
[data-theme="light"] .header button:hover,
[data-theme="light"] nav a:hover,
[data-theme="light"] .navbar a:hover {
  background-color: black !important;
  color: white !important;
}

/* Icons and text white when nav item is hovered/active (black background) */
[data-theme="light"] nav button:hover svg,
[data-theme="light"] nav button[data-state="active"] svg,
[data-theme="light"] nav a.bg-primary svg,
[data-theme="light"] .navbar button:hover svg,
[data-theme="light"] .navbar button[data-state="active"] svg,
[data-theme="light"] .nav-button:hover svg,
[data-theme="light"] .header button:hover svg,
[data-theme="light"] nav a:hover svg,
[data-theme="light"] .navbar a:hover svg {
  color: white !important;
}

/* My Pace / Logo text white when nav button hovered (overrides text-foreground) */
[data-theme="light"] nav button:hover span,
[data-theme="light"] nav button:hover .text-foreground,
[data-theme="light"] nav button[data-state="active"] span,
[data-theme="light"] nav button[data-state="active"] .text-foreground,
[data-theme="light"] .navbar button:hover span,
[data-theme="light"] .navbar button:hover .text-foreground,
[data-theme="light"] .navbar button[data-state="active"] span,
[data-theme="light"] .navbar button[data-state="active"] .text-foreground {
  color: white !important;
}

/* shadcn Button default variant (used for selected nav) - black bg, white text when highlighted */
[data-theme="light"] nav .bg-primary,
[data-theme="light"] .navbar .bg-primary,
[data-theme="light"] nav a.bg-primary,
[data-theme="light"] .navbar a.bg-primary {
  background-color: black !important;
  color: white !important;
  border: none;
}

[data-theme="light"] nav .bg-primary svg,
[data-theme="light"] .navbar .bg-primary svg,
[data-theme="light"] nav a.bg-primary svg,
[data-theme="light"] .navbar a.bg-primary svg {
  color: white !important;
}

/* Dark nav: #F5F5F7 plate, black ink (mirror of light black pill) */
[data-theme="dark"] nav button:hover,
[data-theme="dark"] nav button[data-state="active"],
[data-theme="dark"] nav a.bg-primary,
[data-theme="dark"] .navbar button:hover,
[data-theme="dark"] .navbar button[data-state="active"],
[data-theme="dark"] .nav-button:hover,
[data-theme="dark"] .header button:hover,
[data-theme="dark"] nav a:hover,
[data-theme="dark"] .navbar a:hover {
  background-color: hsl(var(--primary)) !important;
  color: #000000 !important;
}

[data-theme="dark"] nav button:hover svg,
[data-theme="dark"] nav button[data-state="active"] svg,
[data-theme="dark"] nav a.bg-primary svg,
[data-theme="dark"] .navbar button:hover svg,
[data-theme="dark"] .navbar button[data-state="active"] svg,
[data-theme="dark"] .nav-button:hover svg,
[data-theme="dark"] .header button:hover svg,
[data-theme="dark"] nav a:hover svg,
[data-theme="dark"] .navbar a:hover svg {
  color: #000000 !important;
  stroke: #000000 !important;
}

[data-theme="dark"] nav button:hover span,
[data-theme="dark"] nav button:hover .text-foreground,
[data-theme="dark"] nav button[data-state="active"] span,
[data-theme="dark"] nav button[data-state="active"] .text-foreground,
[data-theme="dark"] .navbar button:hover span,
[data-theme="dark"] .navbar button:hover .text-foreground,
[data-theme="dark"] .navbar button[data-state="active"] span,
[data-theme="dark"] .navbar button[data-state="active"] .text-foreground {
  color: #000000 !important;
}

[data-theme="dark"] nav .bg-primary,
[data-theme="dark"] .navbar .bg-primary,
[data-theme="dark"] nav a.bg-primary,
[data-theme="dark"] .navbar a.bg-primary {
  background-color: hsl(var(--primary)) !important;
  color: #000000 !important;
  border: none;
}

[data-theme="dark"] nav .bg-primary svg,
[data-theme="dark"] .navbar .bg-primary svg,
[data-theme="dark"] nav a.bg-primary svg,
[data-theme="dark"] .navbar a.bg-primary svg {
  color: #000000 !important;
  stroke: #000000 !important;
}


[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
  border-color: hsl(var(--border));
}

[data-theme="light"] .highlight,
[data-theme="light"] ::selection {
  background-color: rgba(0, 0, 0, 0.15);
  color: inherit;
}

/* Mellow Yellow theme - refined HSL values for better shadcn UI compatibility */
.mellowYellow-theme, [data-theme="mellowYellow"] {
  --background: 60 100% 95%; /* pale yellow background */
  --foreground: 30 100% 15%;  /* dark brown for better contrast */
  --card: 55 80% 93%; /* warm cream surface — noticeably tinted for readability */
  --card-foreground: 30 100% 15%;  /* dark brown text */
  --popover: 55 80% 93%; /* warm cream surface */
  --popover-foreground: 30 100% 15%;  /* dark brown text */
  --primary: 49 100% 68%;  /* vibrant yellow primary */
  --primary-foreground: 30 100% 15%;  /* dark brown on primary */
  --secondary: 60 100% 85%; /* lighter yellow secondary */
  --secondary-foreground: 30 100% 15%;  /* dark brown text */
  --muted: 60 33% 96%; /* very light yellow muted */
  --muted-foreground: 30 50% 40%;  /* medium brown muted text */
  --accent: 43 100% 50%; /* orange accent */
  --accent-foreground: 60 100% 98%;  /* light text on accent */
  --destructive: 16 100% 44%;
  --destructive-foreground: 60 100% 98%;  /* light text on destructive */
  --border: 49 100% 68%; /* yellow border */
  --input: 49 100% 68%; /* yellow input border */
  --ring: 43 100% 50%; /* orange ring */
  --menu-highlight: 49 75% 68%;
  --menu-highlight-foreground: 30 100% 15%;
}

[data-theme="mellowYellow"] .themed-card, .mellowYellow-theme .themed-card {
  box-shadow: 0 2px 4px rgba(93, 64, 55, 0.2);
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--primary) / 0.3);
}

/* The `link` variant is `text-primary`, and this theme's --primary is a vibrant
   yellow (49 100% 68%) sitting on a pale yellow --background (60 100% 95%) —
   1.28:1, effectively invisible. --accent is no better (1.72:1), so --foreground
   is the only readable token this theme has. Matched on the bare attribute, not
   `button[data-variant]`: two of the link-variant call sites use `asChild`, so
   the attribute lands on an <a>, not a <button>. */
[data-theme="mellowYellow"] [data-variant="link"],
.mellowYellow-theme [data-variant="link"] {
  color: hsl(var(--foreground)) !important;
}

[data-theme="mellowYellow"] [data-variant="link"] svg,
.mellowYellow-theme [data-variant="link"] svg {
  color: hsl(var(--foreground)) !important;
  stroke: hsl(var(--foreground)) !important;
}

/* Ensure text is black in Mellow Yellow theme */
[data-theme="mellowYellow"] p, 
[data-theme="mellowYellow"] h1, 
[data-theme="mellowYellow"] h2, 
[data-theme="mellowYellow"] h3, 
[data-theme="mellowYellow"] h4, 
[data-theme="mellowYellow"] h5, 
[data-theme="mellowYellow"] h6, 
[data-theme="mellowYellow"] span, 
[data-theme="mellowYellow"] div, 
[data-theme="mellowYellow"] label, 
[data-theme="mellowYellow"] li, 
.mellowYellow-theme p, 
.mellowYellow-theme h1, 
.mellowYellow-theme h2, 
.mellowYellow-theme h3, 
.mellowYellow-theme h4, 
.mellowYellow-theme h5, 
.mellowYellow-theme h6, 
.mellowYellow-theme span, 
.mellowYellow-theme div, 
.mellowYellow-theme label, 
.mellowYellow-theme li {
  color: black !important;
}

/* Make all icons black in Mellow Yellow theme except for the theme icon */
[data-theme="mellowYellow"] svg:not(.text-\[#FFC107\]), 
.mellowYellow-theme svg:not(.text-\[#FFC107\]) {
  color: black !important;
}

/* The "Your Pace" span this styled was removed with the v2 hero headline
   (Phase 2, docs/LANDING_PAGE_V2_PLAN.md); `.your-pace-text` no longer exists
   anywhere in src/. */

/* Keep hero section text white in mellow yellow theme (landing page) */
[data-theme="mellowYellow"] .relative.bg-cover h1,
[data-theme="mellowYellow"] .relative.bg-cover p,
.mellowYellow-theme .relative.bg-cover h1,
.mellowYellow-theme .relative.bg-cover p {
  color: white !important;
}

/* Purple Rain theme - refined HSL values for better shadcn UI compatibility */
.purpleRain-theme, [data-theme="purpleRain"] {
  --background: 270 100% 95%; /* pale purple background */
  --foreground: 270 100% 20%; /* dark purple text */
  --card: 270 50% 93%; /* lavender surface — noticeably tinted for readability */
  --card-foreground: 270 100% 20%; /* dark purple text */
  --popover: 270 50% 93%; /* lavender surface */
  --popover-foreground: 270 100% 20%; /* dark purple text */
  --primary: 270 100% 25%; /* deep purple primary */
  --primary-foreground: 0 0% 100%; /* white text on primary (navbar selected state) */
  --secondary: 270 100% 85%; /* lighter purple secondary */
  --secondary-foreground: 270 100% 20%; /* dark text on secondary */
  --muted: 270 50% 95%; /* very light purple muted */
  --muted-foreground: 270 30% 50%; /* medium purple muted text */
  --accent: 291 76% 42%; /* bright purple accent */
  --accent-foreground: 270 100% 98%; /* light text on accent */
  --destructive: 0 84% 60%;
  --destructive-foreground: 270 100% 98%; /* light text on destructive */
  --border: 270 100% 85%; /* light purple border */
  --input: 270 100% 85%; /* light purple input border */
  --ring: 291 76% 42%; /* bright purple ring */
  --menu-highlight: 270 55% 72%;
  --menu-highlight-foreground: 270 100% 18%;
}

/* Make Purple Rain theme icon white when highlighted/hovered */
button:hover .text-\[#9C27B0\],
.button:hover .text-\[#9C27B0\],
.theme-selector:hover .text-\[#9C27B0\],
.theme-button:hover .text-\[#9C27B0\],
.active .text-\[#9C27B0\],
.selected .text-\[#9C27B0\] {
  color: white !important;
}

/* Additional selectors for Purple Rain icon */
button:hover svg[data-theme-value="purpleRain"],
.button:hover svg[data-theme-value="purpleRain"],
button:hover .purpleRain-icon,
.button:hover .purpleRain-icon,
.theme-selector:hover .purpleRain-icon,
.theme-button:hover .purpleRain-icon,
button:hover [data-theme-value="purpleRain"] svg,
button.active svg[data-theme-value="purpleRain"],
.active .purpleRain-icon,
.selected .purpleRain-icon,
button:hover svg.text-purple-600,
button:hover svg.text-purple-700,
button:hover svg.text-purple-800,
button:hover svg.purple-theme-icon,
[role="menuitem"]:hover svg[data-value="purpleRain"],
[role="option"]:hover svg[data-value="purpleRain"],
.theme-item:hover svg[data-theme="purpleRain"],
svg[data-theme="purpleRain"].active,
svg[data-theme="purpleRain"].selected {
  color: white !important;
  fill: white !important;
  stroke: white !important;
}

[data-theme="purpleRain"] .themed-card, .purpleRain-theme .themed-card {
  box-shadow: 0 2px 4px rgba(74, 20, 140, 0.2);
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--primary) / 0.3);
}

/* Blue Sky theme - refined HSL values for better shadcn UI compatibility */
.blueSky-theme, [data-theme="blueSky"] {
  --background: 200 100% 95%; /* pale blue background */
  --foreground: 200 100% 20%; /* dark blue text */
  --card: 200 50% 93%; /* soft sky surface — noticeably tinted for readability */
  --card-foreground: 200 100% 20%; /* dark blue text */
  --popover: 200 50% 93%; /* soft sky surface */
  --popover-foreground: 200 100% 20%; /* dark blue text */
  --primary: 200 100% 50%; /* bright blue primary */
  --primary-foreground: 200 100% 98%; /* light text on primary */
  --secondary: 200 100% 85%; /* lighter blue secondary */
  --secondary-foreground: 200 100% 20%; /* dark text on secondary */
  --muted: 200 50% 96%; /* very light blue muted */
  --muted-foreground: 200 30% 50%; /* medium blue muted text */
  --accent: 212 100% 53%; /* bright blue accent */
  /* Dark blue on accent hover/focus (outline, ghost, menus) — not white */
  --accent-foreground: 200 100% 18%;
  --destructive: 0 100% 65%;
  --destructive-foreground: 200 100% 98%; /* light text on destructive */
  --border: 200 100% 85%; /* light blue border */
  --input: 200 100% 85%; /* light blue input border */
  --ring: 212 100% 53%; /* bright blue ring */
  --menu-highlight: 200 55% 72%;
  --menu-highlight-foreground: 200 100% 18%;
}

[data-theme="blueSky"] .themed-card, .blueSky-theme .themed-card {
  box-shadow: 0 2px 4px rgba(13, 71, 161, 0.2);
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--primary) / 0.3);
}

/* Typography utility classes */
h1, .h1 {
  font-size: var(--font-size-h1);
  line-height: var(--line-height-h1);
  margin-bottom: var(--spacing-2);
  font-weight: 700;
}

h2, .h2 {
  font-size: var(--font-size-h2);
  line-height: var(--line-height-h2);
  margin-bottom: var(--spacing-1);
  font-weight: 600;
}

h3, .h3 {
  font-size: var(--font-size-h3);
  line-height: var(--line-height-h3);
  margin-bottom: var(--spacing-1);
  font-weight: 600;
}

h4, .h4 {
  font-size: var(--font-size-h4);
  line-height: var(--line-height-h4);
  margin-bottom: var(--spacing-1);
  font-weight: 600;
}

h5, .h5 {
  font-size: var(--font-size-h5);
  line-height: var(--line-height-h5);
  margin-bottom: var(--spacing-1);
  font-weight: 600;
}

p, .body-text {
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  margin-bottom: var(--spacing-2);
}

.small-text {
  font-size: var(--font-size-small);
  line-height: var(--line-height-body);
}

.xs-text {
  font-size: var(--font-size-xs);
  line-height: var(--line-height-body);
}

/* Text-specific spacing (won't affect buttons or icons) */
.text-mb-1 {
  margin-bottom: var(--spacing-1);
}

.text-mb-2 {
  margin-bottom: var(--spacing-2);
}

.text-mb-3 {
  margin-bottom: var(--spacing-3);
}

/* Tailwind utility classes for typography with proper spacing */
.text-h1 {
  font-size: var(--font-size-h1);
  line-height: var(--line-height-h1);
  margin-bottom: var(--spacing-2);
  font-weight: 700;
}

.text-h2 {
  font-size: var(--font-size-h2);
  line-height: var(--line-height-h2);
  margin-bottom: var(--spacing-1);
  font-weight: 600;
}

.text-h3 {
  font-size: var(--font-size-h3);
  line-height: var(--line-height-h3);
  margin-bottom: var(--spacing-1);
  font-weight: 600;
}

.text-h4 {
  font-size: var(--font-size-h4);
  line-height: var(--line-height-h4);
  margin-bottom: var(--spacing-1);
  font-weight: 600;
}

.text-h5 {
  font-size: var(--font-size-h5);
  line-height: var(--line-height-h5);
  margin-bottom: var(--spacing-1);
  font-weight: 600;
}

.text-body {
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  margin-bottom: var(--spacing-2);
}

/* Ensure card content has proper spacing to prevent overlap */
.card-content {
  padding: var(--spacing-2);
}

.card-content > *:last-child {
  margin-bottom: 0;
}

.card-title {
  margin-bottom: var(--spacing-1);
}

.card-description {
  margin-bottom: var(--spacing-2);
} 

/* Document and Slideshow Theme Styles */

/* ========================================== */
/* UNIVERSAL DOCUMENT/SLIDESHOW STYLES */
/* ========================================== */

/* Base document container styles */
.document-container,
.slideshow-container {
  background-color: var(--document-bg);
  color: var(--document-text);
  border: 1px solid var(--document-border);
  border-radius: var(--radius);
  transition: all 0.3s ease;
}

/* Document content area */
.document-content,
.slideshow-content {
  background-color: var(--document-card-bg);
  color: var(--document-card-text);
  padding: var(--spacing-4);
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Document text elements */
.document-content h1,
.document-content h2,
.document-content h3,
.document-content h4,
.document-content h5,
.document-content h6,
.slideshow-content h1,
.slideshow-content h2,
.slideshow-content h3,
.slideshow-content h4,
.slideshow-content h5,
.slideshow-content h6 {
  color: var(--document-text);
  margin-bottom: var(--spacing-2);
}

.document-content p,
.document-content span,
.document-content div,
.slideshow-content p,
.slideshow-content span,
.slideshow-content div {
  color: var(--document-text);
  line-height: var(--line-height-body);
}

/* Document links */
.document-content a,
.slideshow-content a {
  color: var(--document-primary);
  text-decoration: underline;
}

.document-content a:hover,
.slideshow-content a:hover {
  color: var(--document-accent);
}

/* Document code blocks */
.document-content pre,
.document-content code,
.slideshow-content pre,
.slideshow-content code {
  background-color: var(--document-muted);
  color: var(--document-text);
  border: 1px solid var(--document-border);
  border-radius: calc(var(--radius) / 2);
  padding: var(--spacing-2);
  font-family: 'Consolas', 'Monaco', 'Lucida Console', monospace;
}

/* Document tables */
.document-content table,
.slideshow-content table {
  border-collapse: collapse;
  width: 100%;
  margin: var(--spacing-3) 0;
}

.document-content th,
.document-content td,
.slideshow-content th,
.slideshow-content td {
  border: 1px solid var(--document-border);
  padding: var(--spacing-2);
  text-align: left;
}

.document-content th,
.slideshow-content th {
  background-color: var(--document-muted);
  font-weight: 600;
  color: var(--document-text);
}

/* Document lists */
.document-content ul,
.document-content ol,
.slideshow-content ul,
.slideshow-content ol {
  color: var(--document-text);
  margin: var(--spacing-2) 0;
  padding-left: var(--spacing-4);
}

.document-content li,
.slideshow-content li {
  color: var(--document-text);
  margin-bottom: var(--spacing-1);
}

/* Document blockquotes */
.document-content blockquote,
.slideshow-content blockquote {
  border-left: 4px solid var(--document-primary);
  background-color: var(--document-muted);
  padding: var(--spacing-3);
  margin: var(--spacing-3) 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* ========================================== */
/* THEME-SPECIFIC DOCUMENT/SLIDESHOW STYLES */
/* ========================================== */

/* Light theme documents */
[data-theme="light"] .document-container,
[data-theme="light"] .slideshow-container {
  --document-bg: #f7f7f7;
  --document-text: #000000;
  --document-border: #e5e7eb;
  --document-primary: #000000;
  --document-secondary: #6b7280;
  --document-muted: #f3f4f6;
  --document-muted-text: #6b7280;
  --document-card-bg: #f7f7f7;
  --document-card-text: #000000;
  --document-accent: #3b82f6;
  --document-accent-text: #f7f7f7;
}

/* Dark theme documents */
[data-theme="dark"] .document-container,
[data-theme="dark"] .slideshow-container {
  --document-bg: #1f2937;
  --document-text: #f9fafb;
  --document-border: #374151;
  --document-primary: #60a5fa;
  --document-secondary: #9ca3af;
  --document-muted: #374151;
  --document-muted-text: #9ca3af;
  --document-card-bg: #111827;
  --document-card-text: #f9fafb;
  --document-accent: #3b82f6;
  --document-accent-text: #f9fafb;
}

/* Mellow Yellow theme documents */
[data-theme="mellowYellow"] .document-container,
[data-theme="mellowYellow"] .slideshow-container {
  --document-bg: #fffde7;
  --document-text: #000000;
  --document-border: #ffc107;
  --document-primary: #ffc107;
  --document-secondary: #ff9800;
  --document-muted: #fff8e1;
  --document-muted-text: #795548;
  --document-card-bg: #fff9c4;
  --document-card-text: #000000;
  --document-accent: #ff9800;
  --document-accent-text: #000000;
}

/* Purple Rain theme documents */
[data-theme="purpleRain"] .document-container,
[data-theme="purpleRain"] .slideshow-container {
  --document-bg: #f3e5f5;
  --document-text: #4a148c;
  --document-border: #9c27b0;
  --document-primary: #9c27b0;
  --document-secondary: #7b1fa2;
  --document-muted: #e1bee7;
  --document-muted-text: #6a1b9a;
  --document-card-bg: #f8f0f8;
  --document-card-text: #4a148c;
  --document-accent: #7b1fa2;
  --document-accent-text: #f8f0f8;
}

/* Blue Sky theme documents */
[data-theme="blueSky"] .document-container,
[data-theme="blueSky"] .slideshow-container {
  --document-bg: #e3f2fd;
  --document-text: #0d47a1;
  --document-border: #2196f3;
  --document-primary: #2196f3;
  --document-secondary: #03a9f4;
  --document-muted: #bbdefb;
  --document-muted-text: #1976d2;
  --document-card-bg: #eaf3ff;
  --document-card-text: #0d47a1;
  --document-accent: #1976d2;
  --document-accent-text: #e3f2fd;
}

/* ========================================== */
/* SLIDESHOW SPECIFIC STYLES */
/* ========================================== */

/* Slide container */
.slide-container {
  background: linear-gradient(135deg, var(--document-card-bg) 0%, var(--document-muted) 100%);
  border: 1px solid var(--document-border);
  border-radius: var(--radius);
  padding: var(--spacing-4);
  margin: var(--spacing-3) 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.slide-container:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

/* Slide title */
.slide-title {
  color: var(--document-primary);
  font-size: var(--font-size-h2);
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--spacing-3);
  border-bottom: 2px solid var(--document-primary);
  padding-bottom: var(--spacing-2);
}

/* Slide content */
.slide-content {
  color: var(--document-text);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  text-align: center;
}

/* Slide navigation */
.slide-navigation {
  background-color: var(--document-muted);
  border: 1px solid var(--document-border);
  border-radius: var(--radius);
  padding: var(--spacing-3);
  margin: var(--spacing-3) 0;
}

/* Slide thumbnails */
.slide-thumbnail {
  background: linear-gradient(135deg, var(--document-card-bg) 0%, var(--document-muted) 100%);
  border: 1px solid var(--document-border);
  border-radius: calc(var(--radius) / 2);
  padding: var(--spacing-2);
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
  height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.slide-thumbnail:hover {
  border-color: var(--document-primary);
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.slide-thumbnail.active {
  border-color: var(--document-primary);
  border-width: 2px;
  box-shadow: 0 4px 12px var(--document-primary);
  transform: scale(1.1);
}

/* ========================================== */
/* EDITOR SPECIFIC STYLES */
/* ========================================== */

/* Tiptap editor container */
.tiptap-editor {
  background-color: var(--document-card-bg);
  border: 1px solid var(--document-border);
  border-radius: var(--radius);
  color: var(--document-text);
}

/* Tiptap toolbar */
.tiptap-toolbar {
  background-color: var(--document-muted);
  border-bottom: 1px solid var(--document-border);
  padding: var(--spacing-2);
}

/* Tiptap content area */
.tiptap-content {
  background-color: var(--document-card-bg);
  color: var(--document-text);
  padding: var(--spacing-3);
  min-height: 200px;
}

/* Tiptap placeholder */
.tiptap-placeholder {
  color: var(--document-muted-text);
}

/* ========================================== */
/* RESPONSIVE DESIGN */
/* ========================================== */

@media (max-width: 768px) {
  .document-container,
  .slideshow-container {
    padding: var(--spacing-2);
  }
  
  .document-content,
  .slideshow-content {
    padding: var(--spacing-2);
  }
  
  .slide-container {
    padding: var(--spacing-2);
    margin: var(--spacing-2) 0;
  }
  
  .slide-title {
    font-size: var(--font-size-h3);
  }
  
  .slide-thumbnail {
    min-width: 100px;
    height: 60px;
    padding: var(--spacing-1);
  }
}

/* ========================================== */
/* ANIMATIONS AND TRANSITIONS */
/* ========================================== */

.document-container,
.slideshow-container,
.slide-container,
.slide-thumbnail {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.document-container:hover,
.slideshow-container:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* ========================================== */
/* ACCESSIBILITY */
/* ========================================== */

/* Focus states for keyboard navigation */
.document-container:focus,
.slideshow-container:focus,
.slide-container:focus,
.slide-thumbnail:focus,
button:focus,
.button:focus,
.btn:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .document-container,
  .slideshow-container {
    border-width: 2px;
  }
  
  .slide-container {
    border-width: 2px;
  }
  
  .slide-thumbnail {
    border-width: 2px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .document-container,
  .slideshow-container,
  .slide-container,
  .slide-thumbnail,
  button,
  .button,
  .btn,
  .card,
  .dialog-content,
  .modal-content {
    transition: none;
  }
  
  .slide-thumbnail:hover,
  button:active,
  .button:active,
  .btn:active {
    transform: none;
  }
  
  html * {
    transition: none !important;
  }
} 

/* Dialog positioning and scrolling fixes - Updated for new DialogBody structure */
.dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background-color: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* The new DialogContent uses flexbox layout internally */
.dialog-content {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  width: 90vw; /* Consider adding a max-width for larger screens */
  max-width: 1000px;
  height: 80vh;
  min-height: 400px;
  max-height: 80vh;
  overflow-y: auto; 
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Override dialog-content positioning for native dialogs */
dialog .dialog-content {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  width: auto !important;
  height: auto !important;
  max-width: none !important;
  max-height: none !important;
}

/* DialogBody handles scrolling internally - these styles are now handled by the component */
/* Custom scrollbar styles for DialogBody content */
[data-radix-dialog-content] .overflow-y-auto::-webkit-scrollbar {
  width: 6px;
}

[data-radix-dialog-content] .overflow-y-auto::-webkit-scrollbar-track {
  background: transparent;
}

[data-radix-dialog-content] .overflow-y-auto::-webkit-scrollbar-thumb {
  background: hsl(var(--muted-foreground) / 0.3);
  border-radius: 3px;
}

[data-radix-dialog-content] .overflow-y-auto::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--muted-foreground) / 0.5);
}

/* DialogFooter is now positioned by flexbox, no need for sticky positioning */
.dialog-footer {
  background: hsl(var(--popover));
  border-top: 1px solid hsl(var(--border));
  padding-top: 1rem;
  margin-top: 1rem;
}

/* Floating feedback widget - ensure it stays on top */
.feedback-floating-button {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  z-index: 99999 !important;
  transform: none !important;
  will-change: auto !important;
}

/* Ensure floating button is not affected by any parent transforms */
.feedback-floating-button * {
  transform: none !important;
}

/* Mobile-specific fixes */
@media (max-width: 640px) {
  .dialog-content {
    width: 95vw;
    max-height: 90vh;
    margin: 1rem;
  }
} 
/* ---------------------------------------------------------------------------
   Marketing header while it is transparent over the hero artwork.

   The landing hero runs up behind the header, and that artwork is dark in every
   theme — so the controls sitting on it are pinned to a light-on-dark treatment
   rather than following the theme.

   This has to live here, with !important and a deliberately heavier selector,
   because the per-theme blocks above set button colour with !important and
   utility classes on the buttons cannot outrank them.
   `html[data-theme] header[data-header-transparent] …` is 0,2,3, which clears
   the 0,2,1–0,2,2 of those blocks.

   Originally written to beat `[data-theme="light"] button[class*="outline"]`,
   which matched EVERY button — `focus-visible:outline-none` contains the
   substring "outline" — and so rendered the header CTAs black on the artwork.
   Those selectors now key off `data-variant` instead, but this block is still
   required: it is what makes the controls light-on-dark in *every* theme,
   not just light.
--------------------------------------------------------------------------- */
html[data-theme] header[data-header-transparent="true"] button,
html[data-theme] header[data-header-transparent="true"] a,
html[data-theme] header[data-header-transparent="true"] svg {
  color: #ffffff !important;
  background-color: transparent !important;
  border-color: transparent !important;
}

/* Labels are their own elements — the logo is a `text-foreground` span inside
   its button, so colouring the button alone leaves it dark on the artwork. */
html[data-theme] header[data-header-transparent="true"] button span {
  color: #ffffff !important;
}

html[data-theme] header[data-header-transparent="true"] button:hover {
  background-color: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
}

/* The one dominant CTA keeps a solid surface so it still reads as a button. */
html[data-theme] header[data-header-transparent="true"] button[data-header-cta="primary"] {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #ffffff !important;
}

html[data-theme] header[data-header-transparent="true"] button[data-header-cta="primary"]:hover {
  background-color: rgba(255, 255, 255, 0.9) !important;
  color: #0f172a !important;
}

html[data-theme] header[data-header-transparent="true"] button[data-header-cta="primary"] svg,
html[data-theme] header[data-header-transparent="true"] button[data-header-cta="primary"] span {
  color: #0f172a !important;
}

/* Enhanced Validation Styles - shadcn/ui Compatible */

/* Form Field Container */
.validation-field > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(8px * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(8px * var(--tw-space-y-reverse));
}

/* Label Styles - using shadcn/ui label patterns */
.validation-label {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  line-height: 1;
}
.peer:disabled ~ .validation-label {
  cursor: not-allowed;
  opacity: 0.7;
}

.validation-label.required::after {
  content: ' *';
  color: hsl(var(--destructive));
}

/* Input Field Styles - compatible with shadcn/ui Input */
.validation-input {
  display: flex;
  height: 40px;
  width: 100%;
  border-radius: calc(var(--radius) - 2px);
  border-width: 1px;
  border-color: hsl(var(--input));
  background-color: hsl(var(--background));
  padding-left: 12px;
  padding-right: 12px;
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 0.875rem;
  line-height: 1.25rem;
  --tw-ring-offset-color: hsl(var(--background));
}
.validation-input::file-selector-button {
  border-width: 0px;
  background-color: transparent;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
}
.validation-input::placeholder {
  color: hsl(var(--muted-foreground));
}
.validation-input:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
  --tw-ring-color: hsl(var(--ring));
  --tw-ring-offset-width: 2px;
}
.validation-input:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* Validation State Classes */
.validation-input.error {
  border-color: hsl(var(--destructive));
}
.validation-input.error:focus-visible {
  --tw-ring-color: hsl(var(--destructive));
}

.validation-input.warning {
  --tw-border-opacity: 1;
  border-color: rgb(234 179 8 / var(--tw-border-opacity, 1));
}

.validation-input.warning:focus-visible {
  --tw-ring-opacity: 1;
  --tw-ring-color: rgb(234 179 8 / var(--tw-ring-opacity, 1));
}

.validation-input.success {
  --tw-border-opacity: 1;
  border-color: rgb(34 197 94 / var(--tw-border-opacity, 1));
}

.validation-input.success:focus-visible {
  --tw-ring-opacity: 1;
  --tw-ring-color: rgb(34 197 94 / var(--tw-ring-opacity, 1));
}

/* Error Message Styles - using shadcn/ui error patterns */
.validation-error {
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: hsl(var(--destructive));
}

.validation-warning {
  font-size: 0.875rem;
  line-height: 1.25rem;
  --tw-text-opacity: 1;
  color: rgb(202 138 4 / var(--tw-text-opacity, 1));
}

.validation-warning:is(.dark *) {
  --tw-text-opacity: 1;
  color: rgb(250 204 21 / var(--tw-text-opacity, 1));
}

.validation-success {
  font-size: 0.875rem;
  line-height: 1.25rem;
  --tw-text-opacity: 1;
  color: rgb(22 163 74 / var(--tw-text-opacity, 1));
}

.validation-success:is(.dark *) {
  --tw-text-opacity: 1;
  color: rgb(74 222 128 / var(--tw-text-opacity, 1));
}

/* Help Text */
.validation-help {
  font-size: 0.75rem;
  line-height: 1.5;
  color: hsl(var(--muted-foreground));
}

/* Form Container */
.validated-form > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(24px * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(24px * var(--tw-space-y-reverse));
}

.validated-form .form-section > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(16px * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(16px * var(--tw-space-y-reverse));
}

.validated-form .form-row {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 16px;
}

@media (min-width: 768px) {
  .validated-form .form-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Field Group Styles */
.validation-field-group > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(16px * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(16px * var(--tw-space-y-reverse));
}
.validation-field-group {
  border-radius: var(--radius);
  border-width: 1px;
  border-color: hsl(var(--border));
  background-color: hsl(var(--card));
  padding: 16px;
}

.validation-field-group .group-title {
  font-size: 1.125rem;
  line-height: 1.75rem;
  font-weight: 600;
  color: hsl(var(--card-foreground));
}

.validation-field-group .group-description {
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: hsl(var(--muted-foreground));
}

/* Real-time Validation Indicators */
.validation-indicator {
  position: absolute;
  right: 12px;
  top: 50%;
  height: 16px;
  width: 16px;
  --tw-translate-y: -50%;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.validation-indicator.loading {
  animation: spin 1s linear infinite;
  color: hsl(var(--muted-foreground));
}

.validation-indicator.error {
  color: hsl(var(--destructive));
}

.validation-indicator.warning {
  --tw-text-opacity: 1;
  color: rgb(234 179 8 / var(--tw-text-opacity, 1));
}

.validation-indicator.success {
  --tw-text-opacity: 1;
  color: rgb(34 197 94 / var(--tw-text-opacity, 1));
}

/* Form Button Styles - using shadcn/ui button patterns */
.validation-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  --tw-ring-offset-color: hsl(var(--background));
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.validation-submit:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
  --tw-ring-color: hsl(var(--ring));
  --tw-ring-offset-width: 2px;
}
.validation-submit:disabled {
  pointer-events: none;
  opacity: 0.5;
}

.validation-submit.primary {
  height: 40px;
  background-color: hsl(var(--primary));
  padding-left: 16px;
  padding-right: 16px;
  padding-top: 8px;
  padding-bottom: 8px;
  color: hsl(var(--primary-foreground));
}

.validation-submit.primary:hover {
  background-color: hsl(var(--primary) / 0.9);
}

.validation-submit.secondary {
  height: 40px;
  background-color: hsl(var(--secondary));
  padding-left: 16px;
  padding-right: 16px;
  padding-top: 8px;
  padding-bottom: 8px;
  color: hsl(var(--secondary-foreground));
}

.validation-submit.secondary:hover {
  background-color: hsl(var(--secondary) / 0.8);
}

/* Responsive Design */
@media (max-width: 640px) {
  .validated-form .form-row {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
  
  .validation-field-group {
    padding: 12px;
  }
}

/* Dark Mode Support - handled by shadcn/ui CSS variables */
@media (prefers-color-scheme: dark) {
  /* Additional dark mode adjustments if needed */
  .validation-field-group {
    border-color: hsl(var(--border));
    background-color: hsl(var(--card));
  }
}

/* Animation Classes */
.validation-fade-in {
  transition-duration: 300ms;
  animation-name: enter;
  --tw-enter-opacity: initial;
  --tw-enter-scale: initial;
  --tw-enter-rotate: initial;
  --tw-enter-translate-x: initial;
  --tw-enter-translate-y: initial;
  --tw-enter-opacity: 0;
  animation-duration: 300ms;
}

.validation-fade-out {
  transition-duration: 300ms;
  animation-name: exit;
  --tw-exit-opacity: initial;
  --tw-exit-scale: initial;
  --tw-exit-rotate: initial;
  --tw-exit-translate-x: initial;
  --tw-exit-translate-y: initial;
  --tw-exit-opacity: 0;
  animation-duration: 300ms;
}

.validation-slide-down {
  transition-duration: 300ms;
  animation-name: enter;
  --tw-enter-opacity: initial;
  --tw-enter-scale: initial;
  --tw-enter-rotate: initial;
  --tw-enter-translate-x: initial;
  --tw-enter-translate-y: initial;
  --tw-enter-translate-y: -8px;
  animation-duration: 300ms;
}

/* Accessibility Enhancements */
.validation-error[role="alert"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.validation-error.visible {
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Focus Management */
.validation-input:focus + .validation-indicator {
  opacity: 1;
}

.validation-input:not(:focus) + .validation-indicator {
  opacity: 0.7;
}

/* Loading States */
.validation-loading {
  pointer-events: none;
  opacity: 0.5;
}

.validation-loading::after {
  content: '';
  position: absolute;
  inset: 0px;
  border-radius: calc(var(--radius) - 2px);
  background-color: hsl(var(--background) / 0.5);
} 

/*# sourceMappingURL=main-ef7d455c.791952ddb9939edb60b9.css.map*/