/* ReciP Minimal Stylesheet */

/* ===== Variables ===== */
:root {
  --background: hsl(44, 32%, 96%);
  --foreground: hsl(140, 60%, 35%);
  --card: #fff;
  --border: hsl(44, 20%, 85%);
  --primary: hsl(140, 60%, 35%);
  --secondary: hsl(25, 95%, 53%);
  --muted: hsl(44, 20%, 90%);
  --muted-foreground: hsl(140, 15%, 45%);
  --accent: hsl(25, 95%, 53%);
  --success: hsl(142, 76%, 36%);
  --eco: hsl(100, 50%, 50%);
  --radius: 0.5rem;

  --shadow-card: 0 2px 10px -2px rgba(0, 0, 0, 0.1);
  --shadow-orange: 0 4px 20px -4px rgba(255, 120, 0, 0.2);
}

/* ===== Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: system-ui, sans-serif;
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  z-index: 20;
}

/* ===== Header ===== */
.header {
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}
.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary);
}
.back-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  text-decoration: none;
  transition: 0.3s;
}
.back-link:hover {
  color: hsl(140, 60%, 30%);
}
.header-divider {
  width: 1px;
  height: 1.5rem;
  background: var(--border);
}
.nav-desktop {
  display: flex;
  gap: 1.5rem;
}
.nav-link {
  color: var(--muted-foreground);
  text-decoration: none;
}
.nav-link:hover {
  color: var(--primary);
}

/* ===== Eco Badge ===== */
.eco-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  background: linear-gradient(135deg, var(--primary), var(--eco));
  color: black; box-shadow: var(--shadow-orange);
}
.eco-icon {
  font-size: 1rem;
}

/* ===== Recipe Detail Layout ===== */
.recipe-detail-container {
  padding: 2rem 0;
}
.recipe-detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}
.main-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* ===== Recipe Hero ===== */
.recipe-hero {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.recipe-hero-image {
  position: relative;
  height: 300px;
}
.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.difficulty-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--secondary);
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
}
.recipe-hero-content {
  padding: 1.5rem;
}
.recipe-hero-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.recipe-hero-title {
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary);
}
.recipe-hero-description {
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
}

.recipe-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.stat-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--muted);
  border-radius: var(--radius);
}
.stat-item.eco-stat {
  background: rgba(16, 185, 129, 0.1);
}
.stat-icon {
  font-size: 1.25rem;
  color: var(--primary);
}
.stat-value {
  font-weight: bold;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* ===== Sections ===== */
.recipe-section {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.section-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary);
}

/* ===== Ingredients ===== */
.ingredients-status {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}
.ingredients-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.ingredient-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  border-radius: var(--radius);
  border-left: 4px solid transparent;
  transition: 0.3s;
}
.ingredient-item.available {
  background: rgba(16, 185, 129, 0.1);
  border-left-color: var(--success);
}
.ingredient-item.needed {
  background: var(--muted);
  border-left-color: var(--secondary);
}
.ingredient-name {
  font-weight: 500;
}
.ingredient-name.available {
  color: var(--success);
}
.ingredient-amount {
  color: var(--muted-foreground);
}
.missing-ingredients {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(255, 120, 0, 0.1);
  border: 1px solid rgba(255, 120, 0, 0.2);
  border-radius: var(--radius);
}
.missing-title {
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}
.missing-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.missing-tag {
  border: 1px solid var(--secondary);
  color: var(--secondary);
  padding: 0.25rem 0.5rem;
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.75rem;
}

/* ===== Steps ===== */
.steps-progress {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.progress-bar {
  width: 6rem;
  height: 0.5rem;
  background: var(--muted);
  border-radius: 9999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--success);
  transition: width 0.3s;
}
.progress-text {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}
.steps-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.step-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: 0.3s;
}
.step-item.pending {
  background: var(--muted);
}
.step-item.pending:hover {
  background: hsl(44, 20%, 85%);
}
.step-item.completed {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

/* ===== Sidebar ===== */
.sidebar-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 2rem;
}
.sidebar-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--primary);
  margin-bottom: 1rem;
}
.impact-description,
.impact-value {
  color: var(--muted-foreground);
}
.impact-value {
  font-weight: bold;
  margin-top: 0.5rem;
}

/* ===== Toast ===== */
.toast-container {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 100;
}
.toast {
  background: var(--card);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.floating-bg {
  position: fixed; /* stays fixed while scrolling */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden; /* hide overflow if emojis drift */
  z-index: -1; /* keeps it behind all content */
  pointer-events: none; /* prevents blocking clicks */
}

.floating-bg span {
  position: absolute;
  font-size: 2rem;
  opacity: 0.2; /* faint background feel */
  animation: float 10s infinite ease-in-out;
}

.ingredient-item.available {
  background-color: #d4f5d4;
  font-weight: bold;
}
.missing-tag {
  background-color: #ffe0e0;
  padding: 0.2rem 0.5rem;
  border-radius: 5px;
  margin-right: 0.3rem;
}

/* Example float animation */
@keyframes float {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(10deg);
  }
  100% {
    transform: translateY(0) rotate(0deg);
  }
}
