/*
Theme Name: CalcHub
Theme URI: https://calchub.com
Author: CalcHub Team
Author URI: https://calchub.com
Description: A modern calculator theme for WordPress with age calculators, step converters, and more.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: calchub
Tags: calculator, tools, modern, responsive
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --background: 210 20% 98%;
  --foreground: 220 20% 10%;

  --card: 0 0% 100%;
  --card-foreground: 220 20% 10%;

  --popover: 0 0% 100%;
  --popover-foreground: 220 20% 10%;

  --primary: 270 70% 50%;
  --primary-foreground: 0 0% 100%;

  --secondary: 210 20% 96%;
  --secondary-foreground: 220 20% 20%;

  --muted: 210 15% 93%;
  --muted-foreground: 220 10% 45%;

  --accent: 270 60% 94%;
  --accent-foreground: 270 70% 30%;

  --destructive: 0 84% 60%;
  --destructive-foreground: 0 0% 100%;

  --border: 270 30% 75%;
  --input: 210 20% 90%;
  --ring: 270 70% 50%;

  --radius: 0.75rem;

  /* Custom tokens */
  --gradient-primary: linear-gradient(135deg, hsl(270 70% 50%), hsl(280 70% 55%));
  --gradient-hero: linear-gradient(180deg, hsl(210 20% 98%) 0%, hsl(270 30% 95%) 100%);
  --gradient-card: linear-gradient(145deg, hsl(0 0% 100%) 0%, hsl(210 20% 98%) 100%);
  --shadow-soft: 0 4px 20px -4px hsl(220 20% 10% / 0.08);
  --shadow-medium: 0 8px 30px -8px hsl(220 20% 10% / 0.12);
  --shadow-glow: 0 0 40px -10px hsl(270 70% 50% / 0.3);
}

.dark {
  --background: 220 25% 8%;
  --foreground: 210 20% 98%;

  --card: 220 25% 12%;
  --card-foreground: 210 20% 98%;

  --popover: 220 25% 12%;
  --popover-foreground: 210 20% 98%;

  --primary: 270 75% 55%;
  --primary-foreground: 0 0% 100%;

  --secondary: 220 20% 18%;
  --secondary-foreground: 210 20% 90%;

  --muted: 220 20% 18%;
  --muted-foreground: 210 15% 60%;

  --accent: 270 50% 25%;
  --accent-foreground: 270 70% 75%;

  --destructive: 0 70% 50%;
  --destructive-foreground: 0 0% 100%;

  --border: 270 50% 50%;
  --input: 220 20% 20%;
  --ring: 270 75% 55%;

  --gradient-primary: linear-gradient(135deg, hsl(270 75% 55%), hsl(280 75% 60%));
  --gradient-hero: linear-gradient(180deg, hsl(220 25% 8%) 0%, hsl(220 30% 12%) 100%);
  --gradient-card: linear-gradient(145deg, hsl(220 25% 14%) 0%, hsl(220 25% 10%) 100%);
  --shadow-soft: 0 4px 20px -4px hsl(0 0% 0% / 0.3);
  --shadow-medium: 0 8px 30px -8px hsl(0 0% 0% / 0.4);
  --shadow-glow: 0 0 40px -10px hsl(270 75% 55% / 0.4);
}

* {
  border-color: hsl(var(--border));
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', sans-serif;
}

.gradient-text {
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  background-image: var(--gradient-primary);
}

.gradient-bg {
  background: var(--gradient-primary);
}

.hero-gradient {
  background: var(--gradient-hero);
}

.card-gradient {
  background: var(--gradient-card);
}

.shadow-soft {
  box-shadow: var(--shadow-soft);
}

.shadow-medium {
  box-shadow: var(--shadow-medium);
}

.shadow-glow {
  box-shadow: var(--shadow-glow);
}

.glass-card {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid hsl(var(--border) / 0.5);
  background: hsl(var(--card) / 0.8);
}

.calculator-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1.125rem;
  border-radius: 0.5rem;
  border: 2px solid hsl(var(--border));
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  transition: all 0.2s;
  outline: none;
}

@media (max-width: 768px) {
  .calculator-input {
    font-size: 0.875rem;
    padding: 0.625rem 0.75rem;
  }
}

.calculator-input:focus {
  border-color: hsl(var(--primary));
  ring: 2px;
  ring-color: hsl(var(--primary) / 0.2);
}

.calculator-result {
  padding: 1.5rem;
  border-radius: 0.75rem;
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.animate-fade-up {
  animation: fadeUp 0.5s ease-out forwards;
}

.animate-scale-in {
  animation: scaleIn 0.3s ease-out forwards;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.delay-100 {
  animation-delay: 100ms;
}

.delay-200 {
  animation-delay: 200ms;
}

.delay-300 {
  animation-delay: 300ms;
}

.delay-400 {
  animation-delay: 400ms;
}

/* Utility classes for Tailwind compatibility */
.container {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 1rem !important;
  padding-right: 1rem !important;
  box-sizing: border-box !important;
}

@media (min-width: 640px) {
  .container {
    max-width: 640px !important;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 768px !important;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 1152px !important;
  }
  
  /* Sticky sidebar fix */
  #mainGrid {
    align-items: start !important;
    display: grid !important;
  }
  
  #sidebarAside {
    position: relative !important;
    height: fit-content !important;
    align-self: start !important;
    display: block !important;
    overflow: visible !important;
  }
  
  #stickySidebar {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 6rem !important;
    align-self: flex-start !important;
    will-change: transform;
    z-index: 10;
    display: block !important;
    overflow: visible !important;
  }
  
  main.flex-1 {
    position: relative;
    overflow: visible;
  }
  
  .container {
    position: relative;
    overflow: visible;
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: 1152px !important;
  }
}

.bg-card {
  background-color: hsl(var(--card));
  border-color: hsl(var(--border)) !important;
}

.border {
  border-color: hsl(var(--border)) !important;
}

.bg-secondary {
  background-color: hsl(var(--secondary));
}

.bg-background {
  background-color: hsl(var(--background));
}

.bg-accent {
  background-color: hsl(var(--accent));
}

.bg-muted {
  background-color: hsl(var(--muted));
}

.text-foreground {
  color: hsl(var(--foreground));
}

.text-muted-foreground {
  color: hsl(var(--muted-foreground));
}

.text-primary {
  color: hsl(var(--primary));
}

.text-primary-foreground {
  color: hsl(var(--primary-foreground));
}

/* Fix white text visibility in light mode */
body:not(.dark) .text-primary-foreground {
  color: hsl(0 0% 100%) !important;
}

/* Ensure text on gradient backgrounds is visible */
body:not(.dark) .gradient-bg .text-primary-foreground,
body:not(.dark) .gradient-bg * {
  color: hsl(0 0% 100%) !important;
}

.text-accent-foreground {
  color: hsl(var(--accent-foreground));
}

.border {
  border-width: 1px;
  border-color: hsl(var(--border));
}

.border-b {
  border-bottom-width: 1px;
  border-color: hsl(var(--border));
}

.border-t {
  border-top-width: 1px;
  border-color: hsl(var(--border));
}

/* Result boxes - Purple background with white text in light mode */
body:not(.dark) .bg-primary\/20 {
  background-color: hsl(270 70% 50%) !important;
  color: hsl(0 0% 100%) !important;
}

body:not(.dark) .bg-primary\/20 * {
  color: hsl(0 0% 100%) !important;
}

.dark .bg-primary\/20 {
  background-color: hsl(270 70% 18% / 0.95) !important;
  color: hsl(270 70% 75%) !important;
}

.dark .bg-primary\/20 * {
  color: hsl(270 70% 75%) !important;
}

/* Age Difference page specific - Purple button and results in light mode */
body:not(.dark) #calculateBtn.bg-primary,
body:not(.dark) button#calculateBtn {
  background-color: hsl(270 70% 50%) !important;
  color: hsl(0 0% 100%) !important;
}

body:not(.dark) #calculateBtn.bg-primary:hover,
body:not(.dark) button#calculateBtn:hover {
  background-color: hsl(270 70% 45%) !important;
  color: hsl(0 0% 100%) !important;
}

body:not(.dark) #calculateBtn.bg-primary *,
body:not(.dark) button#calculateBtn * {
  color: hsl(0 0% 100%) !important;
}

/* Age Difference results box - Purple in light mode */
body:not(.dark) #resultContainer .calculator-result {
  background-color: hsl(270 70% 35%) !important;
  color: hsl(0 0% 100%) !important;
}

body:not(.dark) #resultContainer .calculator-result * {
  color: hsl(0 0% 100%) !important;
}

/* Hero Carousel Styles */
#heroCarousel {
  position: relative;
  padding: 0 3rem;
  overflow: hidden;
}

#heroCarouselTrack {
  display: flex;
  gap: 0;
  width: 100%;
}

#heroCarouselTrack > div {
  min-width: 100%;
  width: 100%;
  flex-shrink: 0;
}

#heroCarousel button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

@media (max-width: 768px) {
  #heroCarousel {
    padding: 0 2.5rem;
  }
  
  #heroCarouselPrev {
    left: -1rem;
  }
  
  #heroCarouselNext {
    right: -1rem;
  }
}

/* Blog Carousel Styles */
#blogCarousel {
  position: relative;
  padding: 0 3rem;
}

#blogCarouselTrack {
  display: flex;
  gap: 1.5rem;
}

#blogCarousel button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

@media (max-width: 768px) {
  #blogCarousel {
    padding: 0 2.5rem;
  }
  
  #blogCarouselPrev {
    left: -1rem;
  }
  
  #blogCarouselNext {
    right: -1rem;
  }
}

/* Toggle Switch Styles */
.toggle-btn {
  position: relative;
  display: inline-flex;
  height: 1.5rem;
  width: 2.75rem;
  align-items: center;
  border-radius: 9999px;
  background-color: hsl(var(--muted));
  transition: background-color 0.2s;
}

.toggle-btn.bg-primary {
  background-color: hsl(var(--primary));
}

.toggle-btn span {
  position: absolute;
  height: 1rem;
  width: 1rem;
  border-radius: 9999px;
  background-color: hsl(var(--background));
  transition: transform 0.2s;
}

.toggle-btn span.translate-x-1 {
  transform: translateX(0.25rem);
}

.toggle-btn span.translate-x-6 {
  transform: translateX(1.5rem);
}

/* Dropdown Menu Styles - WORK ON HOVER */
.dropdown-group {
  position: relative;
}

.dropdown-group .sub-menu {
  pointer-events: none;
  transition: opacity 0.2s, visibility 0.2s;
  display: block !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.dropdown-group .sub-menu li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Hover state - MUST WORK */
.dropdown-group:hover .sub-menu,
.dropdown-group.active .sub-menu {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  display: block !important;
}

/* Ensure dropdown is visible when parent is hovered */
nav .dropdown-group:hover .sub-menu,
nav .dropdown-group:hover .absolute {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* Submenu item styling */
nav .sub-menu a {
  display: block !important;
  width: 100% !important;
}

/* Legacy support for old dropdown IDs (if still used) */
.dropdown-group #miscDropdown,
.dropdown-group #healthDropdown {
  pointer-events: none;
  transition: opacity 0.2s, visibility 0.2s;
  display: block !important;
}

.dropdown-group:hover #miscDropdown,
.dropdown-group:hover #healthDropdown,
.dropdown-group.active #miscDropdown,
.dropdown-group.active #healthDropdown {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  display: block !important;
}

/* Tab Pills - Active state with purple background - FORCE PURPLE */
/* Calculator Navigation Tabs - Active state (all calculator tabs) */
body:not(.dark) a.bg-primary.text-primary-foreground,
body:not(.dark) a.bg-primary,
body:not(.dark) .bg-primary.text-primary-foreground,
body:not(.dark) .rounded-full.bg-primary,
body:not(.dark) .rounded-full.bg-primary.text-primary-foreground {
  background-color: hsl(270 70% 50%) !important;
  background: hsl(270 70% 50%) !important;
  color: hsl(0 0% 100%) !important;
}

body:not(.dark) a.bg-primary.text-primary-foreground *,
body:not(.dark) a.bg-primary *,
body:not(.dark) .bg-primary.text-primary-foreground *,
body:not(.dark) .rounded-full.bg-primary *,
body:not(.dark) .rounded-full.bg-primary.text-primary-foreground * {
  color: hsl(0 0% 100%) !important;
}

button.steps-tab.bg-primary,
.steps-tab.bg-primary,
button.steps-tab.active,
.steps-tab.active,
button.sex-btn.bg-primary,
.sex-btn.bg-primary,
button.sex-btn-miles.bg-primary,
.sex-btn-miles.bg-primary,
button.sex-btn-km.bg-primary,
.sex-btn-km.bg-primary,
button.height-unit-btn.bg-primary,
.height-unit-btn.bg-primary,
button.height-unit-btn-km.bg-primary,
.height-unit-btn-km.bg-primary,
button.weight-unit-btn.bg-primary,
.weight-unit-btn.bg-primary {
  background-color: hsl(270 70% 50%) !important;
  background: hsl(270 70% 50%) !important;
  background-image: none !important;
  color: hsl(0 0% 100%) !important;
  border-color: hsl(270 70% 50%) !important;
}

.dark button.steps-tab.bg-primary,
.dark .steps-tab.bg-primary,
.dark button.steps-tab.active,
.dark .steps-tab.active,
.dark button.sex-btn.bg-primary,
.dark .sex-btn.bg-primary,
.dark button.sex-btn-miles.bg-primary,
.dark .sex-btn-miles.bg-primary,
.dark button.sex-btn-km.bg-primary,
.dark .sex-btn-km.bg-primary,
.dark button.height-unit-btn.bg-primary,
.dark .height-unit-btn.bg-primary,
.dark button.height-unit-btn-km.bg-primary,
.dark .height-unit-btn-km.bg-primary,
.dark button.weight-unit-btn.bg-primary,
.dark .weight-unit-btn.bg-primary {
  background-color: hsl(270 75% 55%) !important;
  background: hsl(270 75% 55%) !important;
  background-image: none !important;
  color: hsl(0 0% 100%) !important;
  border-color: hsl(270 75% 55%) !important;
}

/* Inactive tab/button pills - visible background on light mode */
.steps-tab:not(.bg-primary),
.sex-btn:not(.bg-primary),
.sex-btn-miles:not(.bg-primary),
.sex-btn-km:not(.bg-primary),
.height-unit-btn:not(.bg-primary),
.height-unit-btn-km:not(.bg-primary),
.weight-unit-btn:not(.bg-primary) {
  background-color: hsl(var(--muted)) !important;
  color: hsl(var(--muted-foreground)) !important;
}

body:not(.dark) .steps-tab:not(.bg-primary),
body:not(.dark) .sex-btn:not(.bg-primary),
body:not(.dark) .sex-btn-miles:not(.bg-primary),
body:not(.dark) .sex-btn-km:not(.bg-primary),
body:not(.dark) .height-unit-btn:not(.bg-primary),
body:not(.dark) .height-unit-btn-km:not(.bg-primary),
body:not(.dark) .weight-unit-btn:not(.bg-primary) {
  background-color: hsl(210 20% 96%) !important;
  color: hsl(220 20% 20%) !important;
}

/* Tab Pills - Responsive font size on small screens */
@media (max-width: 640px) {
  .age-diff-tab,
  .steps-tab,
  .health-tab,
  .rounded-full.px-4.py-2,
  .inline-flex.rounded-full.border a {
    font-size: 0.75rem !important; /* 12px */
    padding: 0.5rem 0.75rem !important; /* py-2 px-3 */
  }
  
  .age-diff-tab,
  .steps-tab,
  .health-tab {
    gap: 0.25rem !important;
  }
  
  /* Calculator navigation tabs - round pills */
  .inline-flex.rounded-full.border.bg-background.p-1 a,
  .inline-flex.rounded-full.border.bg-background.p-1 button {
    font-size: 0.7rem !important; /* 11.2px - smaller for navigation tabs */
    padding: 0.375rem 0.625rem !important; /* py-1.5 px-2.5 */
  }
}

/* Mobile Menu Overlay */
#mobileMenuOverlay {
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
  opacity: 0;
}

#mobileMenuOverlay.hidden {
  opacity: 0;
  visibility: hidden;
}

/* Mobile Navigation - Sidebar from left */
#mobileNav {
  transform: translateX(-100%);
  will-change: transform;
}

#mobileNav.show {
  transform: translateX(0);
}

#mobileNav {
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

#mobileNav.hidden {
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -50%) scale(0.95);
}

/* Expanding Search Bar */
#searchBar {
  width: 0;
  opacity: 0;
  visibility: hidden;
  z-index: 100;
  transition: width 0.3s ease-in-out, opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

#searchBar form {
  white-space: nowrap;
}

#searchInput {
  min-width: 0;
}

/* Mobile responsive */
@media (max-width: 640px) {
  #searchBar {
    right: auto !important;
    left: 0 !important;
    width: calc(100vw - 2rem) !important;
    max-width: 400px;
  }
  
  /* Swiper.js customizations */
  .swiper {
    width: 100%;
    position: relative;
  }
  
  .swiper-slide {
    display: flex;
    align-items: stretch;
    justify-content: center;
  }
  
  /* Hero Swiper */
  .heroSwiper .swiper-slide {
    height: auto;
  }
  
  /* Blog Swiper */
  .blogSwiper .swiper-slide {
    height: auto;
  }
  
  .blogSwiper .swiper-slide > article {
    height: 100%;
  }
  
  /* Swiper Navigation Buttons - Better styling on desktop */
  /* Override all possible Swiper button selectors */
  .swiper-button-next,
  .swiper-button-prev,
  .swiper .swiper-button-next,
  .swiper .swiper-button-prev,
  .heroSwiper .swiper-button-next,
  .heroSwiper .swiper-button-prev,
  .blogSwiper .swiper-button-next,
  .blogSwiper .swiper-button-prev {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    background: hsl(var(--card)) !important;
    border: 1px solid hsl(var(--border)) !important;
    border-radius: 9999px !important;
    box-shadow: var(--shadow-soft) !important;
    color: hsl(var(--foreground)) !important;
    transition: all 0.2s ease !important;
    margin-top: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
  }
  
  .swiper-button-next:after,
  .swiper-button-prev:after,
  .swiper .swiper-button-next:after,
  .swiper .swiper-button-prev:after,
  .heroSwiper .swiper-button-next:after,
  .heroSwiper .swiper-button-prev:after,
  .blogSwiper .swiper-button-next:after,
  .blogSwiper .swiper-button-prev:after {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: hsl(var(--foreground)) !important;
    text-shadow: none !important;
  }
  
  /* Desktop - Larger, more visible arrows */
  @media (min-width: 768px) {
    .swiper-button-next,
    .swiper-button-prev,
    .hero-swiper-button-next,
    .hero-swiper-button-prev,
    .blog-swiper-button-next,
    .blog-swiper-button-prev {
      width: 44px !important;
      height: 44px !important;
      border-radius: 9999px !important;
      box-shadow: var(--shadow-medium) !important;
    }
    
    .swiper-button-next:after,
    .swiper-button-prev:after,
    .hero-swiper-button-next:after,
    .hero-swiper-button-prev:after,
    .blog-swiper-button-next:after,
    .blog-swiper-button-prev:after {
      font-size: 18px !important;
    }
  }
  
  @media (min-width: 1024px) {
    .swiper-button-next,
    .swiper-button-prev,
    .hero-swiper-button-next,
    .hero-swiper-button-prev,
    .blog-swiper-button-next,
    .blog-swiper-button-prev {
      width: 48px !important;
      height: 48px !important;
      border-radius: 9999px !important;
    }
    
    .swiper-button-next:after,
    .swiper-button-prev:after,
    .hero-swiper-button-next:after,
    .hero-swiper-button-prev:after,
    .blog-swiper-button-next:after,
    .blog-swiper-button-prev:after {
      font-size: 20px !important;
    }
  }
  
  .swiper-button-next:hover,
  .swiper-button-prev:hover {
    background: hsl(var(--accent)) !important;
    border-color: hsl(var(--border)) !important;
    color: hsl(var(--accent-foreground)) !important;
  }
  
  .swiper-button-disabled {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
  }
  
  /* Override Swiper default blue colors completely */
  .swiper-button-next.swiper-button-lock,
  .swiper-button-prev.swiper-button-lock {
    display: none;
  }
  
  /* Force white background and remove any blue */
  .swiper-button-next,
  .swiper-button-prev,
  .hero-swiper-button-next,
  .hero-swiper-button-prev,
  .blog-swiper-button-next,
  .blog-swiper-button-prev {
    background-color: hsl(var(--card)) !important;
    background-image: none !important;
  }
  
  
  /* Mobile button positioning */
  @media (max-width: 640px) {
    .swiper-button-next,
    .swiper-button-prev {
      width: 20px !important;
      height: 20px !important;
      border-radius: 9999px !important;
    }
    
    .swiper-button-next:after,
    .swiper-button-prev:after {
      font-size: 8px !important;
    }
    
    .hero-swiper-button-next {
      right: 0.5rem !important;
    }
    
    .hero-swiper-button-prev {
      left: 0.5rem !important;
    }
    
    .blog-swiper-button-next {
      right: 0.5rem !important;
    }
    
    .blog-swiper-button-prev {
      left: 0.5rem !important;
    }
  }
  
  /* Swiper Pagination */
  .swiper-pagination {
    position: relative !important;
    margin-top: 2rem !important;
    padding-top: 1rem !important;
  }
  
  .hero-swiper-pagination {
    margin-top: 3rem !important;
    padding-top: 1.5rem !important;
  }
  
  .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: hsl(var(--muted-foreground));
    opacity: 0.5;
    border-radius: 9999px;
    transition: all 0.2s ease;
    margin: 0 4px !important;
  }
  
  .swiper-pagination-bullet-active {
    width: 32px;
    background: hsl(var(--primary));
    opacity: 1;
    border-radius: 9999px;
  }
  
  /* Container padding for mobile */
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  @media (min-width: 768px) {
    .container {
      padding-left: 1rem;
      padding-right: 1rem;
    }
  }
}

/* WordPress specific styles */
.wp-block-group {
  margin: 0;
}

.wp-block-post-content {
  max-width: 100%;
}

/* Table of Contents Styles */
.table-of-contents {
  position: sticky;
  top: 6rem;
  max-height: calc(100vh - 8rem);
}

/* TOC Toggle Button */
.toc-toggle {
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  padding: 0;
  color: hsl(var(--foreground));
}

.toc-toggle:focus {
  outline: none;
}

.toc-toggle:focus-visible {
  outline: none;
}

.toc-icon {
  flex-shrink: 0;
  color: hsl(var(--muted-foreground));
  transition: transform 0.2s ease, color 0.2s ease;
}

.toc-toggle:hover .toc-icon {
  color: hsl(var(--primary));
}

.toc-icon-down,
.toc-icon-up {
  transition: opacity 0.2s ease;
}

.toc-content {
  transition: max-height 0.3s ease, opacity 0.3s ease;
  overflow: hidden;
}

.toc-content.hidden {
  max-height: 0;
  opacity: 0;
  margin: 0;
  padding: 0;
}

.toc-nav {
  scrollbar-width: thin;
  scrollbar-color: hsl(var(--muted-foreground)) hsl(var(--muted));
}

.toc-nav::-webkit-scrollbar {
  width: 6px;
}

.toc-nav::-webkit-scrollbar-track {
  background: hsl(var(--muted));
  border-radius: 3px;
}

.toc-nav::-webkit-scrollbar-thumb {
  background: hsl(var(--muted-foreground));
  border-radius: 3px;
}

.toc-nav::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--primary));
}

.toc-link {
  display: block;
  padding: 0.5rem 0;
  transition: all 0.2s ease;
  line-height: 1.5;
  text-decoration: none;
}

.toc-link:hover {
  color: hsl(var(--primary)) !important;
}

.toc-link.text-primary {
  color: hsl(var(--primary)) !important;
  font-weight: 600;
}

/* Sub-items (h3) - indented from left */
.toc-sub-item {
  margin-left: 1.5rem;
}

/* Sub-sub-items (h4) - more indented from left */
.toc-sub-sub-item {
  margin-left: 2.5rem;
}

/* Smooth scroll offset for headings */
h2[id^="toc-"],
h3[id^="toc-"],
h4[id^="toc-"] {
  scroll-margin-top: 100px;
}

/* TOC responsive */
@media (max-width: 1024px) {
  .table-of-contents {
    position: relative;
    top: 0;
    max-height: none;
  }
}

/* Post Content Styling - Lists, Bullets, and Tables */
.prose,
.prose-lg,
article .entry-content,
.single-post .entry-content,
.post-content {
  color: hsl(var(--foreground));
}

/* Lists and Bullets */
.prose ul,
.prose ol,
article .entry-content ul,
article .entry-content ol,
.single-post .entry-content ul,
.single-post .entry-content ol {
  margin: 1rem 0;
  padding-left: 2rem;
  color: hsl(var(--foreground));
}

.prose ul li,
.prose ol li,
article .entry-content ul li,
article .entry-content ol li,
.single-post .entry-content ul li,
.single-post .entry-content ol li {
  margin: 0.5rem 0;
  color: hsl(var(--foreground));
  line-height: 1.75;
}

/* Unordered list bullets */
.prose ul li::marker,
article .entry-content ul li::marker,
.single-post .entry-content ul li::marker {
  color: hsl(var(--primary));
}

.prose ul li::before,
article .entry-content ul li::before,
.single-post .entry-content ul li::before {
  content: "•";
  color: hsl(var(--primary));
  font-weight: bold;
  display: inline-block;
  width: 1em;
  margin-left: -1em;
}

/* Light mode list bullets */
body:not(.dark) .prose ul li::marker,
body:not(.dark) article .entry-content ul li::marker,
body:not(.dark) .single-post .entry-content ul li::marker,
body:not(.dark) .prose ul li::before,
body:not(.dark) article .entry-content ul li::before,
body:not(.dark) .single-post .entry-content ul li::before {
  color: hsl(270 70% 50%);
}

/* Dark mode list bullets */
.dark .prose ul li::marker,
.dark article .entry-content ul li::marker,
.dark .single-post .entry-content ul li::marker,
.dark .prose ul li::before,
.dark article .entry-content ul li::before,
.dark .single-post .entry-content ul li::before {
  color: hsl(270 75% 55%);
}

/* Ordered list numbers */
.prose ol li::marker,
article .entry-content ol li::marker,
.single-post .entry-content ol li::marker {
  color: hsl(var(--primary));
  font-weight: 600;
}

body:not(.dark) .prose ol li::marker,
body:not(.dark) article .entry-content ol li::marker,
body:not(.dark) .single-post .entry-content ol li::marker {
  color: hsl(270 70% 50%);
}

.dark .prose ol li::marker,
.dark article .entry-content ol li::marker,
.dark .single-post .entry-content ol li::marker {
  color: hsl(270 75% 55%);
}

/* Tables */
.prose table,
article .entry-content table,
.single-post .entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  overflow-x: auto;
  display: table !important;
  color: hsl(var(--foreground));
  border-radius: 0.5rem;
  overflow: hidden;
}

.prose table thead,
article .entry-content table thead,
.single-post .entry-content table thead {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.prose table th,
article .entry-content table th,
.single-post .entry-content table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.prose table td,
article .entry-content table td,
.single-post .entry-content table td {
  padding: 0.75rem 1rem;
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--card));
  color: hsl(var(--card-foreground));
}

.prose table tbody tr:nth-child(even) td,
article .entry-content table tbody tr:nth-child(even) td,
.single-post .entry-content table tbody tr:nth-child(even) td {
  background-color: hsl(var(--muted));
}

/* Light mode table styling - Clean and readable */
body:not(.dark) .prose table,
body:not(.dark) article .entry-content table,
body:not(.dark) .single-post .entry-content table {
  background-color: hsl(0 0% 100%);
  border: 1px solid hsl(270 30% 75%);
  border-radius: 0.5rem;
  overflow: hidden;
}

body:not(.dark) .prose table th,
body:not(.dark) article .entry-content table th,
body:not(.dark) .single-post .entry-content table th {
  background-color: hsl(270 60% 94%);
  color: hsl(270 70% 30%);
  border-color: hsl(270 30% 75%);
  font-weight: 600;
  padding: 0.875rem 1rem;
}

body:not(.dark) .prose table td,
body:not(.dark) article .entry-content table td,
body:not(.dark) .single-post .entry-content table td {
  background-color: hsl(0 0% 100%);
  color: hsl(220 20% 10%);
  border-color: hsl(270 30% 75%);
  padding: 0.875rem 1rem;
}

body:not(.dark) .prose table tbody tr:nth-child(even) td,
body:not(.dark) article .entry-content table tbody tr:nth-child(even) td,
body:not(.dark) .single-post .entry-content table tbody tr:nth-child(even) td {
  background-color: hsl(210 15% 93%);
}

body:not(.dark) .prose table tbody tr {
  border-bottom: 1px solid hsl(270 30% 75%);
}

body:not(.dark) .prose table tbody tr:last-child {
  border-bottom: none;
}

/* Dark mode table styling - Purple headers with white text, dark background */
.dark .prose table,
.dark article .entry-content table,
.dark .single-post .entry-content table {
  background-color: hsl(220 25% 8%);
  border: 1px solid hsl(270 50% 50%);
  border-radius: 0.5rem;
  overflow: hidden;
}

.dark .prose table thead,
.dark article .entry-content table thead,
.dark .single-post .entry-content table thead {
  background-color: hsl(270 70% 50%);
}

.dark .prose table th,
.dark article .entry-content table th,
.dark .single-post .entry-content table th {
  background-color: hsl(270 70% 50%) !important;
  color: hsl(0 0% 100%) !important;
  border: none !important;
  border-bottom: 1px solid hsl(270 70% 50%) !important;
  font-weight: 600;
  padding: 0.875rem 1rem;
}

.dark .prose table th *,
.dark article .entry-content table th *,
.dark .single-post .entry-content table th * {
  color: hsl(0 0% 100%) !important;
}

.dark .prose table td,
.dark article .entry-content table td,
.dark .single-post .entry-content table td {
  background-color: hsl(220 25% 8%) !important;
  color: hsl(210 20% 98%) !important;
  border: none !important;
  border-bottom: 1px solid hsl(270 50% 50%) !important;
  padding: 0.875rem 1rem;
}

.dark .prose table td *,
.dark article .entry-content table td *,
.dark .single-post .entry-content table td * {
  color: hsl(210 20% 98%) !important;
}

.dark .prose table tbody tr {
  background-color: hsl(220 25% 8%) !important;
}

.dark .prose table tbody tr td {
  border-bottom: 1px solid hsl(270 50% 50%);
}

.dark .prose table tbody tr:last-child td {
  border-bottom: none !important;
}

/* Remove alternating row colors in dark mode - all rows same dark background */
.dark .prose table tbody tr:nth-child(even) td,
.dark article .entry-content table tbody tr:nth-child(even) td,
.dark .single-post .entry-content table tbody tr:nth-child(even) td {
  background-color: hsl(220 25% 8%) !important;
}

.dark .prose table tbody tr:nth-child(odd) td,
.dark article .entry-content table tbody tr:nth-child(odd) td,
.dark .single-post .entry-content table tbody tr:nth-child(odd) td {
  background-color: hsl(220 25% 8%) !important;
}

/* Special styling for "Number of Steps" column or similar data columns in dark mode - Purple text */
.dark .prose table td:last-child,
.dark article .entry-content table td:last-child,
.dark .single-post .entry-content table td:last-child {
  color: hsl(270 70% 75%) !important;
  font-weight: 500;
}

.dark .prose table td:last-child *,
.dark article .entry-content table td:last-child *,
.dark .single-post .entry-content table td:last-child * {
  color: hsl(270 70% 75%) !important;
}

/* Ensure first column in dark mode has white text (overrides default) */
.dark .prose table td:first-child,
.dark article .entry-content table td:first-child,
.dark .single-post .entry-content table td:first-child {
  color: hsl(210 20% 98%) !important;
}

.dark .prose table td:first-child *,
.dark article .entry-content table td:first-child *,
.dark .single-post .entry-content table td:first-child * {
  color: hsl(210 20% 98%) !important;
}

/* Ensure all post content text is visible */
.prose p,
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6,
article .entry-content p,
article .entry-content h1, article .entry-content h2, article .entry-content h3,
article .entry-content h4, article .entry-content h5, article .entry-content h6,
.single-post .entry-content p,
.single-post .entry-content h1, .single-post .entry-content h2, .single-post .entry-content h3,
.single-post .entry-content h4, .single-post .entry-content h5, .single-post .entry-content h6 {
  color: hsl(var(--foreground));
}

/* Links in post content */
.prose a,
article .entry-content a,
.single-post .entry-content a {
  color: hsl(var(--primary));
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose a:hover,
article .entry-content a:hover,
.single-post .entry-content a:hover {
  color: hsl(var(--primary));
  opacity: 0.8;
}

body:not(.dark) .prose a,
body:not(.dark) article .entry-content a,
body:not(.dark) .single-post .entry-content a {
  color: hsl(270 70% 50%);
}

.dark .prose a,
.dark article .entry-content a,
.dark .single-post .entry-content a {
  color: hsl(270 75% 55%);
}
