/* KubeGraf Documentation Theme System */

/* Dark Theme (Default) - Matches landing page */
:root,
:root[data-theme="dark"] {
  --primary: #06b6d4;         /* Cyan - main brand color */
  --primary-light: #22d3ee;   /* Lighter cyan for gradients */
  --primary-dark: #0891b2;    /* Darker cyan */
  --text: #f9fafb;
  --text-muted: #9ca3af;
  --bg: #09090b;
  --bg-secondary: #020617;
  --bg-tertiary: #111827;
  --border: rgba(148, 163, 184, 0.25);
  --border-hover: rgba(6, 182, 212, 0.55);
  --code-bg: #111827;
  --code-text: #06b6d4;

  /* RGB versions for rgba() usage */
  --border-rgb: 148, 163, 184;
  --muted-rgb: 17, 24, 39;
}

/* Light Theme - Matches landing page Anthropic-inspired Rich Cream */
:root[data-theme="light"] {
  --primary: #0891b2;         /* Darker cyan for light mode */
  --primary-light: #06b6d4;
  --primary-dark: #0e7490;
  --text: #131314;            /* Anthropic near-black */
  --text-muted: #666666;      /* Darker gray for better contrast on cream */
  --bg: #faf6e9;              /* Rich warm cream - HSL(45, 65%, 95%) - EXACT match to landing page */
  --bg-secondary: #ffffff;    /* Pure white cards for contrast */
  --bg-tertiary: #f3efe3;     /* Warm cream tint - HSL(45, 60%, 93%) */
  --border: rgba(64, 60, 48, 0.15);  /* Warm border */
  --border-hover: rgba(8, 145, 178, 0.3);
  --code-bg: #f3efe3;         /* Warm cream for code blocks */
  --code-text: #0e7490;

  /* RGB versions for rgba() usage */
  --border-rgb: 64, 60, 48;
  --muted-rgb: 243, 239, 227;  /* Warm cream tint RGB */
}

/* Smooth transitions for theme changes */
/* Body background - matches landing page exactly */
body {
  background-color: var(--bg);
  color: var(--text);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.sidebar,
.docs-content,
.glass-card,
.feature-card,
.docs-card,
.install-method,
.keybind-table,
.callout {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Theme Toggle Button */
.theme-toggle {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.25rem;
  z-index: 1000;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.theme-toggle:hover {
  transform: scale(1.1);
  border-color: var(--primary);
  box-shadow: 0 6px 16px rgba(6, 182, 212, 0.3);
}

/* Light theme specific adjustments */
:root[data-theme="light"] .floating-orbs {
  opacity: 0.3;
}

:root[data-theme="light"] .orb {
  opacity: 0.04;
}

:root[data-theme="light"] .glass-card,
:root[data-theme="light"] .feature-card,
:root[data-theme="light"] .docs-card,
:root[data-theme="light"] .install-method {
  background: var(--bg-secondary);
  backdrop-filter: none;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border-radius: 0.75rem;
}

:root[data-theme="light"] .sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.03);
}

:root[data-theme="light"] .sidebar-section {
  margin-bottom: 1.5rem;
}

:root[data-theme="light"] .sidebar-section h3 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
  margin-bottom: 0.75rem;
}

:root[data-theme="light"] .sidebar-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

:root[data-theme="light"] .sidebar-section li {
  margin: 0;
  padding: 0;
}

:root[data-theme="light"] .sidebar-section a {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--text-muted);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

:root[data-theme="light"] .sidebar-section a:hover {
  background: var(--bg-tertiary);
  color: var(--text);
  transform: translateX(2px);
}

:root[data-theme="light"] .sidebar-section a.active {
  background: rgba(8, 145, 178, 0.12);
  color: var(--primary-dark);
  font-weight: 600;
  border-left: 3px solid var(--primary);
  padding-left: calc(0.75rem - 3px);
}

:root[data-theme="light"] code {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
  border: 1px solid var(--border);
}

:root[data-theme="light"] pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  white-space: pre;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

:root[data-theme="light"] pre code {
  background: transparent;
  color: var(--text);
  border: none;
  padding: 0;
  white-space: pre;
  display: inline-block;
  min-width: 100%;
}

:root[data-theme="light"] .docs-hero::before {
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(8, 145, 178, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 80% 50%, rgba(6, 182, 212, 0.05), transparent);
}

:root[data-theme="light"] .docs-hero .grid-pattern {
  background-image:
    linear-gradient(rgba(8, 145, 178, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8, 145, 178, 0.05) 1px, transparent 1px);
}

:root[data-theme="light"] .keybind-table th {
  background: var(--bg-tertiary);
  color: var(--text);
  border: 1px solid var(--border);
}

:root[data-theme="light"] .keybind-table td {
  border: 1px solid var(--border);
  color: var(--text);
}

:root[data-theme="light"] kbd {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text);
}

:root[data-theme="light"] .callout {
  background: rgba(8, 145, 178, 0.08);
  border: 1px solid rgba(8, 145, 178, 0.25);
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

:root[data-theme="light"] .tip,
:root[data-theme="light"] .note {
  background: rgba(8, 145, 178, 0.08);
  border-left: 3px solid var(--primary);
  border-radius: 0.375rem;
  padding: 0.75rem 1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Additional light theme improvements */
:root[data-theme="light"] h1,
:root[data-theme="light"] h2,
:root[data-theme="light"] h3,
:root[data-theme="light"] h4,
:root[data-theme="light"] h5,
:root[data-theme="light"] h6 {
  color: var(--text);
}

:root[data-theme="light"] p,
:root[data-theme="light"] li,
:root[data-theme="light"] td {
  color: var(--text-muted);
}

:root[data-theme="light"] a {
  color: var(--primary);
}

:root[data-theme="light"] a:hover {
  color: var(--primary-dark);
}

:root[data-theme="light"] .theme-toggle {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

:root[data-theme="light"] .theme-toggle:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 16px rgba(8, 145, 178, 0.2);
}

/* Mobile responsiveness */
@media (max-width: 900px) {
  .theme-toggle {
    bottom: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
  }
}

/* ========================================
   NAVBAR LOGO - EXACTLY MATCHING LANDING PAGE
   ======================================== */

/* Center navbar content on mobile */
@media (max-width: 767px) {
  .docs-navbar-content {
    display: flex !important;
    justify-content: center !important;
  }
}

/* Navbar logo - matches landing page Navbar.tsx exactly */
.docs-navbar-logo-icon {
  width: auto !important;
  height: 40px !important;
  transition: transform 0.5s ease;
  transform-style: preserve-3d;
}

@media (min-width: 640px) {
  .docs-navbar-logo-icon {
    height: 48px !important;
  }
}

@media (min-width: 768px) {
  .docs-navbar-logo-icon {
    height: 56px !important;
  }
}

@media (min-width: 1024px) {
  .docs-navbar-logo-icon {
    height: 64px !important;
  }
}

/* Navbar logo hover - 360deg rotation like landing page */
.docs-navbar-logo-icon:hover {
  transform: rotate(360deg);
  filter: drop-shadow(0 4px 12px rgba(6, 182, 212, 0.4));
}

/* Navbar text styling - matches landing page exactly (gap-2 sm:gap-3 md:gap-3) */
.docs-navbar-logo span {
  transition: color 0.3s ease;
  /* Dark theme: text-gray-400 */
  color: #9ca3af;
  font-weight: 700;
}

/* Light theme text color - matches landing page text-gray-600 */
:root[data-theme="light"] .docs-navbar-logo span {
  color: #4b5563;
}

/* Navbar text hover - matches landing page group-hover:text-orange-500 */
.docs-navbar-logo:hover span {
  color: #f97316 !important; /* orange-500 */
}

/* Light theme logo - same sizes as dark theme */
:root[data-theme="light"] .docs-navbar-logo-icon {
  width: auto !important;
  height: 40px !important;
}

@media (min-width: 640px) {
  :root[data-theme="light"] .docs-navbar-logo-icon {
    height: 48px !important;
  }
}

@media (min-width: 768px) {
  :root[data-theme="light"] .docs-navbar-logo-icon {
    height: 56px !important;
  }
}

@media (min-width: 1024px) {
  :root[data-theme="light"] .docs-navbar-logo-icon {
    height: 64px !important;
  }
}

/* Sidebar logo (hidden by default) */
.sidebar-logo-icon {
  width: 48px !important;
  height: 48px !important;
}

/* Footer logo - match main page sizes exactly (h-10 sm:h-12 md:h-14) */
.docs-footer-logo img {
  width: auto !important;
  height: 40px !important;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  filter: drop-shadow(0 2px 8px rgba(34, 211, 238, 0.2));
}

.docs-footer-logo img:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 4px 16px rgba(6, 182, 212, 0.5));
}

@media (min-width: 640px) {
  .docs-footer-logo img {
    height: 48px !important;
  }
}

@media (min-width: 768px) {
  .docs-footer-logo img {
    height: 56px !important;
  }
}

/* Light theme footer logo - same sizes as dark theme */
:root[data-theme="light"] .docs-footer-logo img {
  width: auto !important;
  height: 40px !important;
}

@media (min-width: 640px) {
  :root[data-theme="light"] .docs-footer-logo img {
    height: 48px !important;
  }
}

@media (min-width: 768px) {
  :root[data-theme="light"] .docs-footer-logo img {
    height: 56px !important;
  }
}

/* Hide sidebar logo - industry best practice (logo in navbar only) */
.sidebar-logo {
  display: none !important;
}

.sidebar {
  padding-top: 74px !important; /* Navbar (64px) + small gap (10px) */
  padding-bottom: 4rem !important; /* Space for last items to be visible */
}

.sidebar-section:first-of-type {
  margin-top: 0 !important;
}

/* Collapsible Sidebar Sections */
.sidebar-section h3 {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  transition: color 0.2s;
}

.sidebar-section h3:hover {
  color: var(--primary);
}

.sidebar-section h3::after {
  content: '▼';
  font-size: 0.6rem;
  transition: transform 0.3s ease;
  opacity: 0.6;
}

.sidebar-section.collapsed h3::after {
  transform: rotate(-90deg);
}

.sidebar-section ul {
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  max-height: 500px;
  opacity: 1;
}

.sidebar-section.collapsed ul {
  max-height: 0;
  opacity: 0;
}

/* ========================================
   MOBILE COMPATIBILITY
   ======================================== */

/* Mobile-First Base Styles */
@media (max-width: 768px) {
  /* Ensure no horizontal overflow */
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  /* Sidebar - slide-in on mobile */
  .sidebar {
    position: fixed;
    left: -280px;
    top: 64px;
    height: calc(100vh - 64px);
    width: 280px !important;
    z-index: 100;
    transition: left 0.3s ease;
    overflow-y: auto;
    padding: 1rem !important;
  }

  .sidebar.mobile-open {
    left: 0;
  }

  /* Main content full width on mobile */
  .docs-content {
    margin-left: 0 !important;
    padding: 1rem !important;
    width: 100% !important;
  }

  /* Headings responsive sizing */
  h1 {
    font-size: 1.875rem !important; /* 30px */
    line-height: 1.2;
  }

  h2 {
    font-size: 1.5rem !important; /* 24px */
  }

  h3 {
    font-size: 1.25rem !important; /* 20px */
  }

  /* Code blocks - prevent overflow */
  pre {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    max-width: 100% !important;
  }

  pre code {
    white-space: pre !important;
    word-wrap: normal !important;
  }

  /* Tables - responsive scroll */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  /* Cards and features */
  .feature-card,
  .glass-card,
  .docs-card,
  .install-method {
    margin-bottom: 1rem;
    padding: 1rem !important;
  }

  /* Navigation buttons */
  .docs-navigation {
    flex-direction: column !important;
    gap: 0.75rem !important;
  }

  .docs-navigation a {
    width: 100% !important;
    text-align: center;
  }

  /* Footer - stack on mobile */
  .docs-footer .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }

  /* Theme toggle - smaller on mobile */
  .theme-toggle {
    width: 2.5rem !important;
    height: 2.5rem !important;
    bottom: 1rem !important;
    right: 1rem !important;
  }
}

/* Small phones (320px - 375px) */
@media (max-width: 375px) {
  h1 {
    font-size: 1.5rem !important; /* 24px */
  }

  h2 {
    font-size: 1.25rem !important; /* 20px */
  }

  .docs-content {
    padding: 0.75rem !important;
  }

  /* Smaller code font on tiny screens */
  code, pre code {
    font-size: 0.75rem !important;
  }
}

/* Tablet (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  .sidebar {
    width: 220px !important;
  }

  .docs-content {
    margin-left: 220px !important;
    padding: 2rem !important;
  }
}

/* Mobile menu hamburger button (add to navbar) */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block !important;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 200;
    width: 40px;
    height: 40px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-menu-btn:hover {
    border-color: var(--primary);
  }
}

/* Mobile overlay when sidebar is open */
.mobile-overlay {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
  backdrop-filter: blur(2px);
}

@media (max-width: 768px) {
  .mobile-overlay.active {
    display: block;
  }
}

/* Touch-friendly interactive elements */
@media (hover: none) and (pointer: coarse) {
  /* Increase touch targets */
  button, a, .sidebar-section h3 {
    min-height: 44px !important;
    min-width: 44px !important;
  }

  /* Remove hover effects on touch devices */
  .feature-card:hover,
  .glass-card:hover {
    transform: none;
  }
}

/* Print styles */
@media print {
  .sidebar,
  .theme-toggle,
  .mobile-menu-btn,
  .docs-navigation {
    display: none !important;
  }

  .docs-content {
    margin-left: 0 !important;
    max-width: 100% !important;
  }
}

/* ========================================
   FOOTER LAYOUT - EXACTLY MATCHING LANDING PAGE
   ======================================== */

/* Footer Container - matches Tailwind: border-t border-border/50 bg-muted/20 */
/* Footer is full-width like landing page, NOT offset by sidebar */
/* Footer - Light theme */
.docs-footer {
  border-top: 1px solid #e5e5e5;
  background: #f5e8d5; /* brighter oat/biscuit blend - warm golden beige */
  margin-left: 0;
  width: 100%;
}

/* Footer - Dark theme */
:root[data-theme="dark"] .docs-footer {
  border-top: 1px solid hsl(240, 10%, 15%);
  background: hsl(240, 10%, 8%); /* darker graphite background */
}

/* Container - exactly matches landing page: container mx-auto px-4 sm:px-6 lg:px-8 */
.docs-footer-content {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .docs-footer-content {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .docs-footer-content {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Main Footer Grid - matches: py-12 lg:py-16 */
.docs-footer-main {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

@media (min-width: 1024px) {
  .docs-footer-main {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}

/* Grid Layout - matches: grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-8 lg:gap-12 */
.docs-footer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem; /* gap-8 = 2rem */
}

@media (min-width: 768px) {
  .docs-footer-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

@media (min-width: 1024px) {
  .docs-footer-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 3rem; /* lg:gap-12 = 3rem */
  }
}

/* Brand Column - matches: col-span-2 md:col-span-3 lg:col-span-2 */
.docs-footer-brand {
  grid-column: span 2;
  padding-right: 1rem;
  padding-left: 0 !important;
  margin-left: 0 !important;
}

@media (min-width: 768px) {
  .docs-footer-brand {
    grid-column: span 3;
    padding-right: 2rem;
    padding-left: 0 !important;
    margin-left: 0 !important;
  }
}

@media (min-width: 1024px) {
  .docs-footer-brand {
    grid-column: span 2;
    padding-right: 3rem; /* Extra space between brand and Product columns */
    padding-left: 0 !important;
    margin-left: 0 !important;
  }
}

/* Logo Link - matches landing page Footer.tsx: flex items-center gap-2 mb-4 group */
.docs-footer-logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  text-decoration: none;
}

/* Logo Text - matches landing page Footer.tsx: text-base sm:text-lg md:text-xl font-bold */
.docs-footer-logo-text {
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
  transition: color 0.3s;
  /* Dark theme: text-gray-400 */
  color: #9ca3af;
}

@media (min-width: 640px) {
  .docs-footer-logo-text {
    font-size: 1.125rem;
  }
}

@media (min-width: 768px) {
  .docs-footer-logo-text {
    font-size: 1.25rem;
  }
}

/* Light theme text color - matches landing page text-gray-600 */
:root[data-theme="light"] .docs-footer-logo-text {
  color: #4b5563;
}

/* Footer text hover - matches landing page group-hover:text-orange-500 */
.docs-footer-logo-link:hover .docs-footer-logo-text {
  color: #f97316 !important; /* orange-500 */
}

/* Description - matches: text-sm text-muted-foreground mb-4 max-w-sm */
.docs-footer-description {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  max-width: 24rem;
}

/* Brand Clarity Box - matches: mb-4 p-3 bg-muted/30 border border-border/50 rounded-lg max-w-sm */
.docs-footer-brand-clarity {
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: rgba(var(--muted-rgb), 0.3);
  border: 1px solid rgba(var(--border-rgb), 0.5);
  border-radius: 0.5rem;
  max-width: 24rem;
}

.docs-footer-brand-clarity strong {
  color: var(--text);
}

.docs-footer-brand-clarity {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* GitHub Link - matches: inline-flex items-center gap-2 text-sm text-muted-foreground hover:text-primary */
.docs-footer-github {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.docs-footer-github a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.docs-footer-github a:hover {
  color: var(--primary);
}

/* Footer Columns - matches: col-span-1 */
.docs-footer-column {
  grid-column: span 1;
}

/* Column Headings - matches: font-semibold text-sm mb-4 */
.docs-footer-column h3 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
}

/* Column Lists - matches: space-y-3 text-sm */
.docs-footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.docs-footer-column li {
  margin-bottom: 0.75rem;
}

.docs-footer-column a {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.docs-footer-column a:hover {
  color: var(--primary);
}

/* Bottom Bar - matches: py-6 border-t border-border/50 flex flex-col md:flex-row justify-between items-center gap-4 */
.docs-footer-bottom {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  border-top: 1px solid rgba(var(--border-rgb), 0.5);
  gap: 1rem;
}

@media (min-width: 768px) {
  .docs-footer-bottom {
    flex-direction: row;
  }
}

/* Copyright - matches: flex flex-wrap items-center justify-center md:justify-start gap-x-6 gap-y-2 text-xs text-muted-foreground */
.docs-footer-copyright {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.5rem 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

@media (min-width: 768px) {
  .docs-footer-copyright {
    justify-content: flex-start;
    gap: 1.5rem;
  }
}

.docs-footer-separator {
  display: none;
}

@media (min-width: 768px) {
  .docs-footer-separator {
    display: inline;
  }
}

.docs-footer-copyright a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.docs-footer-copyright a:hover {
  color: var(--primary);
}

/* Theme Toggle Button - SVG sun icon */
#theme-toggle-btn {
  color: var(--text);
}

#theme-toggle-btn:hover {
  transform: scale(1.1);
  background: rgba(var(--muted-rgb), 0.3);
}

#theme-toggle-btn svg {
  stroke: var(--text);
}

/* Theme Selector - matches: inline-flex items-center gap-1 p-1 rounded-md bg-muted/20 border border-border/50 */
.theme-selector {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: 0.375rem;
  background: rgba(var(--muted-rgb), 0.2);
  border: 1px solid rgba(var(--border-rgb), 0.5);
}

.theme-selector button {
  padding: 0.25rem 0.5rem;
  background: none;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  opacity: 0.4;
  transition: all 0.2s;
  font-size: 0.875rem;
}

.theme-selector button:hover {
  opacity: 0.6;
}

.theme-selector button.active {
  opacity: 1;
  transform: scale(1.1);
}

/* Light theme - make theme buttons more visible */
:root[data-theme="light"] .theme-selector {
  background: rgba(64, 60, 48, 0.08);
  border: 1px solid rgba(64, 60, 48, 0.2);
}

:root[data-theme="light"] .theme-selector button {
  opacity: 0.5;
  filter: grayscale(0.3) brightness(0.8);
}

:root[data-theme="light"] .theme-selector button:hover {
  opacity: 0.8;
  filter: grayscale(0) brightness(1);
}

:root[data-theme="light"] .theme-selector button.active {
  opacity: 1;
  filter: grayscale(0) brightness(1) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
  background: rgba(64, 60, 48, 0.1);
}

/* Footer Logo Sizing - Matches landing page Footer.tsx (h-10 sm:h-12 md:h-14) */
footer .kubegraf-logo {
  width: auto !important;
  height: 40px !important;
  transition: transform 0.5s ease;
  transform-style: preserve-3d;
}

@media (min-width: 640px) {
  footer .kubegraf-logo {
    height: 48px !important;
  }
}

@media (min-width: 768px) {
  footer .kubegraf-logo {
    height: 56px !important;
  }
}

/* Simple rotate on hover for footer logo */
footer .kubegraf-logo:hover {
  transform: rotate(360deg);
  filter: drop-shadow(0 4px 12px rgba(6, 182, 212, 0.4));
}

/* Light theme footer logo - same sizes as dark theme */
[data-theme="light"] footer .kubegraf-logo {
  width: auto !important;
  height: 40px !important;
}

@media (min-width: 640px) {
  [data-theme="light"] footer .kubegraf-logo {
    height: 48px !important;
  }
}

@media (min-width: 768px) {
  [data-theme="light"] footer .kubegraf-logo {
    height: 56px !important;
  }
}

/* ========================================
   COMPREHENSIVE MOBILE OPTIMIZATIONS
   ======================================== */

/* Mobile-specific footer improvements */
@media (max-width: 640px) {
  /* Footer - reduce padding on mobile */
  .docs-footer-content {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .docs-footer-main {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }

  /* Footer grid - single column on mobile */
  .docs-footer-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  /* Footer brand - full width */
  .docs-footer-brand {
    grid-column: span 1 !important;
    padding-right: 0 !important;
    margin-bottom: 1rem;
  }

  /* Footer columns - compact spacing */
  .docs-footer-column {
    margin-bottom: 1rem;
  }

  .docs-footer-column h3 {
    font-size: 0.875rem !important;
    margin-bottom: 0.75rem !important;
  }

  .docs-footer-column ul {
    gap: 0.5rem !important;
  }

  .docs-footer-column a {
    font-size: 0.875rem !important;
    padding: 0.5rem 0 !important;
  }

  /* Footer bottom - stack vertically */
  .docs-footer-bottom {
    flex-direction: column !important;
    gap: 1rem !important;
    text-align: center;
  }

  .docs-footer-copyright {
    flex-direction: column !important;
    gap: 0.5rem !important;
    font-size: 0.75rem !important;
  }

  .docs-footer-separator {
    display: none !important;
  }

  /* Logo sizes on mobile */
  .kubegraf-logo,
  footer .kubegraf-logo {
    height: 36px !important;
  }

  .docs-footer-logo-text {
    font-size: 1.125rem !important;
    margin-left: 0.25rem !important; /* Add extra spacing between logo and text on mobile */
  }

  /* Increase gap between logo and text on mobile */
  .docs-footer-logo-link {
    gap: 0.75rem !important; /* Increase from 0.5rem to 0.75rem (12px) */
  }
}

/* Tablet improvements (641px - 768px) */
@media (min-width: 641px) and (max-width: 768px) {
  .docs-footer-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .docs-footer-brand {
    grid-column: span 2 !important;
  }
}

/* Additional mobile navigation improvements */
@media (max-width: 768px) {
  /* Page navigation buttons */
  .docs-page-nav {
    margin-top: 2rem !important;
    padding-top: 1.5rem !important;
  }

  .docs-nav-btn {
    padding: 0.75rem 1rem !important;
    font-size: 0.875rem !important;
  }

  /* Navbar improvements */
  .docs-navbar {
    padding: 0 1rem !important;
  }

  .docs-navbar-logo {
    font-size: 1.125rem !important;
  }

  /* Content spacing */
  .docs-hero {
    padding: 1rem 0 !important;
  }

  /* Callouts and cards */
  .callout {
    padding: 0.75rem !important;
    margin: 1rem 0 !important;
  }

  /* Lists */
  ul, ol {
    padding-left: 1.25rem !important;
  }

  /* Images */
  img {
    max-width: 100% !important;
    height: auto !important;
  }
}

/* Very small screens (< 360px) */
@media (max-width: 360px) {
  .docs-content {
    padding: 0.5rem !important;
  }

  .docs-footer-content {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  .docs-footer-main {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }

  h1 {
    font-size: 1.375rem !important;
  }

  h2 {
    font-size: 1.125rem !important;
  }

  .kubegraf-logo,
  footer .kubegraf-logo {
    height: 32px !important;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Increase tap targets */
  .docs-footer-column a,
  .sidebar-section a,
  .docs-nav-btn {
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
  }

  /* Remove hover effects on touch devices */
  .docs-footer-column a:hover,
  .sidebar-section a:hover {
    transform: none !important;
  }

  /* Better touch scrolling */
  .sidebar,
  .docs-content,
  pre {
    -webkit-overflow-scrolling: touch !important;
  }
}

/* Landscape mobile phones */
@media (max-width: 768px) and (orientation: landscape) {
  .sidebar {
    height: calc(100vh - 64px) !important;
  }

  .docs-content {
    padding-top: 1rem !important;
  }

  .docs-footer-main {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }
}
