/* Garden Helper - Front-end Styles */

/* CSS Custom Properties for theming */
.garden-helper {
  --gh-primary: hsl(142, 76%, 36%);
  --gh-primary-hover: hsl(142, 76%, 32%);
  --gh-secondary: hsl(210, 40%, 95%);
  --gh-accent: hsl(142, 76%, 36%);
  --gh-background: hsl(0, 0%, 100%);
  --gh-foreground: hsl(222, 84%, 5%);
  --gh-muted: hsl(210, 40%, 96%);
  --gh-muted-foreground: hsl(215, 16%, 47%);
  --gh-border: hsl(214, 32%, 91%);
  --gh-input: hsl(214, 32%, 91%);
  --gh-ring: hsl(142, 76%, 36%);
  --gh-card: hsl(0, 0%, 100%);
  --gh-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --gh-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --gh-radius: 0.5rem;
  --gh-transition: all 0.15s ease-in-out;
}

/* Minimal reset scoped to garden-helper */
.garden-helper * {
  box-sizing: border-box;
}

.garden-helper {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  color: var(--gh-foreground);
  background-color: var(--gh-background);
}

/* Container */
.gh-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* Navigation */
.gh-navigation {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.gh-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gh-breadcrumb-arrow {
  color: var(--gh-muted-foreground);
}

/* Cards */
.gh-card {
  background: var(--gh-card);
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius);
  box-shadow: var(--gh-shadow);
  margin-bottom: 1.5rem;
}

.gh-card-header {
  padding: 1.5rem 1.5rem 0;
}

.gh-card-content {
  padding: 1.5rem;
}

.gh-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--gh-foreground);
}

/* Buttons */
.gh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--gh-radius);
  border: 1px solid transparent;
  background: transparent;
  color: var(--gh-foreground);
  cursor: pointer;
  transition: var(--gh-transition);
  text-decoration: none;
  white-space: nowrap;
}

.gh-btn:hover {
  text-decoration: none;
}

.gh-btn:focus {
  outline: 2px solid var(--gh-ring);
  outline-offset: 2px;
}

.gh-btn-primary {
  background: var(--gh-primary);
  color: white;
}

.gh-btn-primary:hover {
  background: var(--gh-primary-hover);
  color: white;
}

.gh-btn-outline {
  border-color: var(--gh-border);
  background: var(--gh-background);
}

.gh-btn-outline:hover {
  background: var(--gh-muted);
}

/* Mode Toggle */
.gh-mode-toggle {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

@media (max-width: 640px) {
  .gh-mode-toggle {
    flex-direction: column;
  }
}

/* Search Bar */
.gh-search-bar {
  position: relative;
  margin-top: 1rem;
}

.gh-search-input, .gh-category-search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius);
  font-size: 1rem;
  background: var(--gh-background);
  color: var(--gh-foreground);
  transition: var(--gh-transition);
}

.gh-search-input:focus, .gh-category-search-input:focus {
  outline: none;
  border-color: var(--gh-ring);
  box-shadow: 0 0 0 2px var(--gh-ring);
}

.gh-search-input::placeholder, .gh-category-search-input::placeholder {
  color: var(--gh-muted-foreground);
}

/* Badges */
.gh-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
  white-space: nowrap;
}

.gh-badge-outline {
  border: 1px solid var(--gh-border);
  background: var(--gh-background);
  color: var(--gh-foreground);
}

/* Category Selector */
.gh-sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.gh-section-card {
  background: var(--gh-card);
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius);
  padding: 1.5rem;
  cursor: pointer;
  transition: var(--gh-transition);
}

.gh-section-card:hover {
  border-color: var(--gh-primary);
  box-shadow: var(--gh-shadow-lg);
}

.gh-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  color: var(--gh-foreground);
}

.gh-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.gh-category-item {
  background: var(--gh-muted);
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius);
  padding: 0.75rem;
  cursor: pointer;
  transition: var(--gh-transition);
  text-align: center;
  font-weight: 500;
  color: var(--gh-foreground);
}

.gh-category-item:hover {
  background: var(--gh-primary);
  color: white;
  border-color: var(--gh-primary);
}

/* Plant Grid */
.gh-plant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.gh-plant-card {
  background: var(--gh-card);
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius);
  padding: 1.5rem;
  transition: var(--gh-transition);
}

.gh-plant-card:hover {
  box-shadow: var(--gh-shadow-lg);
  border-color: var(--gh-primary);
}

.gh-plant-name {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  color: var(--gh-foreground);
}

.gh-plant-details {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gh-plant-detail {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.gh-plant-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.gh-plant-label {
  font-weight: 500;
  color: var(--gh-muted-foreground);
  min-width: 120px;
}

.gh-plant-value {
  color: var(--gh-foreground);
  font-weight: 600;
}

.gh-plant-notes {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: var(--gh-muted);
  border-radius: var(--gh-radius);
  font-size: 0.875rem;
  color: var(--gh-muted-foreground);
  border-left: 3px solid var(--gh-primary);
}

/* Icons */
.gh-icon {
  display: inline-block;
  width: 1rem;
  height: 1rem;
}

/* No Results */
.gh-no-results {
  text-align: center;
  padding: 3rem 1rem;
}

.gh-no-results-text {
  font-size: 1.125rem;
  color: var(--gh-muted-foreground);
  margin: 0 0 0.5rem 0;
}

.gh-no-results-hint {
  font-size: 0.875rem;
  color: var(--gh-muted-foreground);
  margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .gh-container {
    padding: 1rem;
  }
  
  .gh-plant-grid {
    grid-template-columns: 1fr;
  }
  
  .gh-sections-grid {
    grid-template-columns: 1fr;
  }
  
  .gh-categories-grid {
    grid-template-columns: 1fr;
  }
  
  .gh-navigation {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .garden-helper {
    --gh-background: hsl(222, 84%, 5%);
    --gh-foreground: hsl(210, 40%, 98%);
    --gh-card: hsl(222, 84%, 8%);
    --gh-muted: hsl(217, 32%, 17%);
    --gh-muted-foreground: hsl(215, 20%, 65%);
    --gh-border: hsl(217, 32%, 17%);
    --gh-input: hsl(217, 32%, 17%);
  }
}

/* Animation utilities */
.gh-fade-in {
  animation: gh-fadeIn 0.3s ease-in-out;
}

@keyframes gh-fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading state */
.gh-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: var(--gh-muted-foreground);
}

.gh-loading::before {
  content: "🌱";
  margin-right: 0.5rem;
  animation: gh-pulse 1.5s ease-in-out infinite;
}

@keyframes gh-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}