/* Theme Color Classes - Maps Tailwind utilities to CSS variables */
.bg-primary {
  background-color: var(--primary-color) !important;
}

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

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

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

.text-secondary {
  color: var(--secondary-color) !important;
}

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

.bg-primary-bg {
  background-color: var(--primary-bg) !important;
}

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

.text-accent {
  color: var(--accent-color) !important;
}

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

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

/* Hover states */
.hover\:bg-primary:hover {
  background-color: var(--primary-color) !important;
  opacity: 0.9;
}

.hover\:text-primary:hover {
  color: var(--primary-color) !important;
}

.hover\:border-primary:hover {
  border-color: var(--primary-color) !important;
}

.hover\:bg-secondary:hover {
  background-color: var(--secondary-color) !important;
  opacity: 0.9;
}

/* Focus states */
.focus\:ring-primary:focus {
  --tw-ring-color: var(--primary-color) !important;
}

.focus\:border-primary:focus {
  border-color: var(--primary-color) !important;
}

/* Gradients */
.from-primary {
  --tw-gradient-from: var(--primary-color) !important;
}

.to-primary {
  --tw-gradient-to: var(--primary-color) !important;
}

.via-primary {
  --tw-gradient-via: var(--primary-color) !important;
}

/* Fill for SVG */
.fill-primary {
  fill: var(--primary-color) !important;
}

.stroke-primary {
  stroke: var(--primary-color) !important;
}

/* Placeholder color */
.placeholder-primary::placeholder {
  color: var(--primary-color) !important;
  opacity: 0.6;
}

/* Ring colors for focus states */
.ring-primary {
  --tw-ring-color: var(--primary-color) !important;
}

.ring-secondary {
  --tw-ring-color: var(--secondary-color) !important;
}

/* Shadow colors */
.shadow-primary {
  --tw-shadow-color: var(--primary-color) !important;
  --tw-shadow: var(--tw-shadow-colored) !important;
}

/* Additional utility classes for dynamic theming */
.bg-primary-10 {
  background-color: var(--primary-color);
  opacity: 0.1 !important;
}

.bg-primary-20 {
  background-color: var(--primary-color);
  opacity: 0.2 !important;
}

.bg-primary-50 {
  background-color: var(--primary-color);
  opacity: 0.5 !important;
}

/* Removed problematic rule that was overriding all bg-[#color] classes */

/* Theme Sidebar Styles */
.theme-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background-color: white;
  box-shadow: -4px 0 10px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease-in-out;
  z-index: 9999;
}

.dark .theme-sidebar {
  background-color: #1f2937;
  /* border-left: 1px solid #374151; */
}

.theme-sidebar.open {
  right: 0;
}

.theme-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.dark .theme-sidebar-header {
  /* border-color: #374151; */
}

.theme-sidebar-content {
  padding: 1.5rem;
  height: calc(100vh - 80px);
  overflow-y: auto;
}

.theme-section {
  margin-bottom: 2rem;
}

.theme-section-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #4b5563;
}

.dark .theme-section-title {
  color: #9ca3af;
}

.theme-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
}

.theme-option {
  cursor: pointer;
  transition: all 0.2s;
}

.theme-option:hover {
  transform: translateY(-2px);
}

.theme-option img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border: 2px solid transparent;
  border-radius: 0.5rem;
  transition: border-color 0.2s;
}



.theme-option.active img {
  border-color: #ef4444;
}

.theme-option:hover img {
  border-color: #ef4444;
}

.color-options {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.5rem;
}

.color-option {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: transform 0.2s;
}

.color-option:hover {
  transform: scale(1.05);
}

.color-option.active {
  outline: 2px solid #ef4444;
  outline-offset: 2px;
}
