/* Galley Cookbook - Card-Based UI */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #667eea;
  --primary-dark: #5568d3;
  --secondary: #764ba2;
  --success: #28a745;
  --danger: #dc3545;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-600: #6c757d;
  --gray-800: #343a40;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
  --radius: 12px;
  --transition: all 0.2s ease;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

/* Header */
header {
  text-align: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  padding: 3rem 2rem;
  border-radius: var(--radius);
  margin-bottom: 3rem;
  box-shadow: var(--shadow-lg);
  position: relative;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

header p {
  font-size: 1.1rem;
  opacity: 0.95;
  font-weight: 300;
}

/* Clear All Button */
.clear-all-btn {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.2);
  color: white;
  cursor: pointer;
  border-radius: 8px;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

.clear-all-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Mode Toggle */
.mode-toggle {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 2rem;
  background: white;
  padding: 0.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.toggle-btn {
  padding: 0.5rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--gray-600);
  cursor: pointer;
  transition: var(--transition);
  border-radius: 8px;
}

.toggle-btn:hover {
  background: var(--gray-100);
  color: var(--primary);
}

.toggle-btn.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  box-shadow: var(--shadow-sm);
}

/* Selection Grid - Horizontal Layout */
.selection-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* Card Sections */
.card-section {
  background: white;
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.card-section h2 {
  color: var(--primary);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.selection-badge {
  font-size: 0.85rem;
  padding: 0.25rem 0.75rem;
  background: var(--gray-200);
  border-radius: 20px;
  color: var(--gray-600);
  font-weight: 500;
}

.selection-badge.active {
  background: var(--success);
  color: white;
}

/* Card Grid */
.card-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Individual Cards */
.card {
  background: var(--gray-100);
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 1.25rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  font-weight: 500;
  position: relative;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.card:hover:not(.disabled) {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.card.selected {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.card.selected::after {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 1.2rem;
  font-weight: bold;
}

.card.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.card.disabled:hover {
  transform: none;
  box-shadow: none;
  border-color: transparent;
}

/* Protein cards - larger */
#protein-grid .card {
  font-size: 1.05rem;
  min-height: 90px;
  font-weight: 600;
}

/* Veggie cards - multi-select indicator (use same selected style as default) */

/* Sauce cards - use same selected style as default */

/* Highlighted sauce cards (matching ingredient filter) */
#sauce-grid .card.highlighted {
  border: 3px solid var(--success);
  background: linear-gradient(135deg, #d1f2eb 0%, #e8f8f5 100%);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
  position: relative;
}

#sauce-grid .card.highlighted::before {
  content: '✨';
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 1.2rem;
}

/* Selected takes priority over highlighted */
#sauce-grid .card.selected.highlighted {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border: 3px solid var(--success);
  color: white;
}

/* Suggested cards - subtle glow for protein recommendations */
.card.suggested {
  border: 2px solid #ffd89b;
  background: linear-gradient(135deg, #fffaf0 0%, #fff8e1 100%);
  box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2);
}

/* Card Legend */
.card-legend {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem;
  background: white;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  font-size: 0.85rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-swatch {
  width: 40px;
  height: 32px;
  border-radius: 6px;
  border: 2px solid transparent;
  position: relative;
  flex-shrink: 0;
}

.legend-swatch.selected {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-color: var(--primary);
}

.legend-swatch.selected::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: bold;
}

.legend-swatch.suggested {
  background: linear-gradient(135deg, #fffaf0 0%, #fff8e1 100%);
  border: 2px solid #ffd89b;
}

.legend-swatch.featured {
  background: linear-gradient(135deg, #fffef0 0%, #fff9e6 100%);
  border: 2px solid #ffd700;
}

.legend-swatch.featured::before {
  content: '⭐';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1rem;
}

.legend-swatch.favorite {
  background: linear-gradient(135deg, #fff0f5 0%, #ffe4ec 100%);
  border: 2px solid #ff6b9d;
}

.legend-swatch.favorite::before {
  content: '❤️';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1rem;
}

.legend-swatch.highlighted {
  background: linear-gradient(135deg, #d1f2eb 0%, #e8f8f5 100%);
  border: 3px solid var(--success);
}

.legend-swatch.highlighted::before {
  content: '✨';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1rem;
}

.card.suggested:hover:not(.disabled) {
  border-color: #f7b733;
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

/* Selected suggested cards maintain suggested visual cue */
.card.suggested.selected {
  border: 2px solid #f7b733;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
}

.card.suggested.selected::after {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 1.2rem;
  font-weight: bold;
}

/* Starch Display */
.starch-display {
  background: linear-gradient(135deg, #ffd89b 0%, #f7b733 100%);
  color: var(--gray-800);
  padding: 1.5rem;
  border-radius: var(--radius);
  text-align: center;
  font-size: 1.3rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* Buttons */
.primary-btn {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
  width: 100%;
  margin-bottom: 1rem;
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.primary-btn:active {
  transform: translateY(0);
}

.primary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.secondary-btn {
  background: var(--gray-600);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  width: 100%;
}

.secondary-btn:hover {
  background: var(--gray-800);
  transform: translateY(-2px);
}

/* Weekly Meals Grid */
.weekly-meals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.weekly-meal-card {
  background: var(--gray-100);
  border: 2px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 1.25rem;
  position: relative;
}

.weekly-meal-card h3 {
  color: var(--primary);
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  padding-right: 30px;
}

.weekly-meal-card .meal-type-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--primary);
  color: white;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.weekly-meal-card .meal-type-badge.snack-badge {
  background: var(--secondary);
}

.weekly-meal-card .meal-detail {
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-bottom: 0.5rem;
}

.weekly-meal-card .meal-detail strong {
  color: var(--gray-800);
  display: inline-block;
  min-width: 70px;
}

.weekly-meal-card .remove-meal-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--danger);
  color: white;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.weekly-meal-card .remove-meal-btn:hover {
  background: #c82333;
  transform: scale(1.1);
}

.empty-week {
  text-align: center;
  padding: 2rem;
  color: var(--gray-600);
  font-style: italic;
}

/* Shopping List */
.shopping-list {
  background: var(--gray-100);
  padding: 1.5rem;
  border-radius: var(--radius);
  line-height: 1.8;
}

.shopping-list .item {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--gray-300);
  font-family: 'Courier New', monospace;
}

.shopping-list .item:last-child {
  border-bottom: none;
}

.recipe-card {
  background: var(--gray-100);
  border-radius: var(--radius);
  overflow: hidden;
}

.recipe-card-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  padding: 0.75rem 1rem;
  font-size: 1.05rem;
}

.recipe-card-body {
  padding: 1rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Ingredient Search */
#ingredient-search-section {
  margin-bottom: 2rem;
}

#ingredient-search-section h2 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.section-description {
  color: var(--gray-600);
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}

#ingredient-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.5rem;
}

#ingredient-grid .card {
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  min-height: auto;
  text-align: center;
}

.search-results {
  margin-top: 1rem;
}

.search-result-card {
  background: var(--gray-100);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  padding: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.search-result-card:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.search-result-card strong {
  display: block;
  margin-bottom: 0.25rem;
}

.search-result-card small {
  opacity: 0.8;
}

/* Recipe Result Cards (from ingredient search) */
.recipe-result-card {
  background: white;
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  padding: 1.25rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.recipe-result-card:hover {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.recipe-result-card:hover strong,
.recipe-result-card:hover small,
.recipe-result-card:hover div {
  color: white !important;
}

/* Favorite recipe result cards */
.recipe-result-card.favorite-recipe {
  border-color: #ff6b9d;
  background: linear-gradient(135deg, #fff0f5 0%, #ffe4ec 100%);
}

.recipe-result-card.favorite-recipe:hover {
  border-color: #ff1493;
  background: linear-gradient(135deg, #ff1493 0%, #c71585 100%);
}

/* Featured recipe result cards */
.recipe-result-card.featured-recipe {
  border-color: #ffd700;
  background: linear-gradient(135deg, #fffef0 0%, #fff9e6 100%);
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.recipe-result-card.featured-recipe:hover {
  border-color: #ffb700;
  background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
}

/* When a result card is both featured and favorited */
.recipe-result-card.featured-recipe.favorite-recipe {
  border: 3px solid;
  border-image: linear-gradient(135deg, #ffd700 0%, #ff6b9d 100%) 1;
  background: linear-gradient(135deg, #fffef0 0%, #fff0f5 100%);
}

/* Recipe Display */
.recipe-display {
  background: var(--gray-100);
  padding: 1.5rem;
  border-radius: var(--radius);
  line-height: 1.8;
}

.recipe-display h3 {
  color: var(--primary);
  margin-bottom: 1rem;
}

.recipe-display .sauce-description {
  font-style: italic;
  color: var(--gray-600);
  margin-bottom: 1rem;
}

.recipe-display .ingredients-list {
  margin: 1rem 0;
  padding-left: 1.5rem;
  display: block; /* Override grid display */
  list-style-type: disc;
}

.recipe-display .ingredients-list li {
  display: list-item;
  margin-bottom: 0.5rem;
}

.recipe-display .ingredients-list ul {
  margin-top: 0.25rem;
  padding-left: 1.5rem;
}

.recipe-display .instructions {
  background: white;
  padding: 1rem;
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
  margin-top: 1rem;
}

/* Sauce Card Enhancement */
.sauce-card-description {
  font-size: 0.8rem;
  color: var(--gray-600);
  font-style: italic;
  margin-top: 0.5rem;
}

.sauce-ingredients {
  font-size: 0.75rem;
  color: var(--gray-700);
  margin-top: 0.5rem;
  line-height: 1.4;
}

.sauce-ingredients strong {
  color: var(--gray-800);
}

.card.sauce-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.card.sauce-card .sauce-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

/* Snack Grid - Compact Layout */
#snack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

#snack-grid .card {
  padding: 0.75rem;
  min-height: 60px;
  font-size: 0.9rem;
  position: relative;
}

#snack-grid .sauce-card-description {
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

/* Featured snacks */
#snack-grid .card.featured {
  border-color: #ffd700;
  background: linear-gradient(135deg, #fffef0 0%, #fff9e6 100%);
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

#snack-grid .card.featured:hover {
  border-color: #ffb700;
  box-shadow: 0 4px 12px rgba(255, 183, 0, 0.4);
}

/* Favorite snacks */
#snack-grid .card.favorite {
  border-color: #ff6b9d;
  background: linear-gradient(135deg, #fff0f5 0%, #ffe4ec 100%);
}

#snack-grid .card.favorite:hover {
  border-color: #ff1493;
  box-shadow: 0 4px 12px rgba(255, 20, 147, 0.2);
}

/* Both featured and favorite */
#snack-grid .card.featured.favorite {
  border: 3px solid;
  border-image: linear-gradient(135deg, #ffd700 0%, #ff6b9d 100%) 1;
  background: linear-gradient(135deg, #fffef0 0%, #fff0f5 100%);
}

.shopping-list .item:last-child {
  border-bottom: none;
}

/* Responsive */
@media (max-width: 1024px) {
  .selection-grid {
    grid-template-columns: 1fr;
  }
  
  .card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }
  
  header p {
    font-size: 1rem;
  }
  
  .card-section {
    padding: 1.5rem;
  }
  
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
  }
  
  .card {
    padding: 1rem;
    min-height: 70px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  body {
    padding: 10px;
  }
  
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
  
  .card-section h2 {
    font-size: 1.2rem;
  }
}

/* Staple Items Styling */
.staple-item {
  opacity: 0.8;
  font-style: italic;
}

/* Shopping Item with Move Button */
.shopping-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.shopping-item .item-text {
  flex: 1;
}

.move-btn {
  background: var(--success);
  color: white;
  border: none;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.move-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.have-item {
  opacity: 0.7;
}

.have-item .move-btn {
  background: var(--gray-600);
}

.have-item .item-text {
  text-decoration: line-through;
}

/* Recipe Quick Buttons */
.recipe-buttons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.recipe-quick-btn {
  background: white;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  box-shadow: var(--shadow-sm);
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 120px;
}

.recipe-quick-btn:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Favorite recipes get a subtle glow */
.recipe-quick-btn.favorite {
  border-color: #ff6b9d;
  background: linear-gradient(135deg, #fff0f5 0%, #ffe4ec 100%);
}

.recipe-quick-btn.favorite:hover {
  border-color: #ff1493;
  box-shadow: 0 4px 12px rgba(255, 20, 147, 0.2);
}

/* Featured recipes (Founder's Picks) */
.recipe-quick-btn.featured {
  border-color: #ffd700;
  background: linear-gradient(135deg, #fffef0 0%, #fff9e6 100%);
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.recipe-quick-btn.featured:hover {
  border-color: #ffb700;
  box-shadow: 0 4px 12px rgba(255, 183, 0, 0.4);
}

/* When a recipe is both featured and favorited */
.recipe-quick-btn.featured.favorite {
  border: 3px solid;
  border-image: linear-gradient(135deg, #ffd700 0%, #ff6b9d 100%) 1;
  background: linear-gradient(135deg, #fffef0 0%, #fff0f5 100%);
}

.recipe-quick-btn.selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.recipe-quick-btn.selected .recipe-quick-name {
  color: var(--primary);
  font-weight: 700;
}

.recipe-quick-btn.selected::after {
  content: '✓';
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  color: var(--primary);
  font-size: 1.2rem;
  font-weight: bold;
}

/* Favorite toggle button */
.favorite-toggle {
  background: transparent;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: var(--transition);
}

.favorite-toggle:hover {
  transform: scale(1.2);
}

.favorite-toggle:active {
  transform: scale(0.9);
}

/* Featured star - no longer used at top */
.featured-star {
  font-size: 1.3rem;
  line-height: 1;
  z-index: 10;
  cursor: help;
}

/* Featured badge */
.featured-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
  color: #000;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  z-index: 5;
}

/* Featured badge for search results (smaller) */
.featured-badge-small {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
  color: #000;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  z-index: 5;
}

.recipe-quick-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.35rem;
}

.recipe-quick-desc {
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.recipe-badges {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-start;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--gray-200);
  font-size: 1.2rem;
}

.recipe-badges span {
  cursor: default;
}

/* Ingredients View Styles */
.ingredients-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.ingredient-item {
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.ingredient-item:hover {
  border-color: var(--success);
  box-shadow: var(--shadow-md);
}

.ingredient-name {
  font-weight: 600;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ingredient-details {
  font-size: 0.9rem;
  color: var(--gray-600);
}

.staple-badge {
  display: inline-block;
  background: var(--success);
  color: white;
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

/* Floating Feedback Button */
.feedback-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  padding: 0.875rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  transition: var(--transition);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.feedback-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.feedback-btn:active {
  transform: translateY(-1px) scale(1.02);
}

@media (max-width: 768px) {
  .feedback-btn {
    bottom: 1rem;
    right: 1rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
  }
}

/* Print Styles */
@media print {
  body {
    background: white;
    padding: 0;
  }
  
  header,
  .mode-toggle,
  #meals-container,
  #snacks-container,
  #ingredient-search-section,
  .selection-grid,
  #starch-section,
  #weekly-section,
  #recipe-section,
  #snack-recipe-section,
  .primary-btn,
  .secondary-btn,
  #generate-btn,
  #print-btn,
  #email-btn {
    display: none !important;
  }
  
  #shopping-section {
    display: block !important;
    box-shadow: none;
    padding: 1rem;
  }
  
  #shopping-section h2 {
    color: black;
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }
  
  .shopping-list {
    background: white;
    padding: 0;
  }
  
  .shopping-list h3 {
    color: black;
    page-break-after: avoid;
  }
  
  .item {
    border-bottom: 1px solid #ccc;
    padding: 0.4rem 0;
    font-size: 0.9rem;
  }
  
  .move-btn {
    display: none !important;
  }
  
  .have-item {
    opacity: 1 !important;
  }
  
  .have-item .item-text {
    text-decoration: none;
  }
  
  .recipe-card {
    page-break-inside: avoid;
    margin-bottom: 1.5rem;
    border: 1px solid #ccc;
  }
  
  .recipe-card-header {
    background: #667eea !important;
    color: white;
    padding: 0.5rem;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  
  .recipe-card-body {
    padding: 0.75rem;
  }
  
  .instructions {
    border: 1px solid #ddd !important;
    background: #f8f9fa !important;
    page-break-inside: avoid;
  }
  
  .recipes-section {
    page-break-before: always;
  }
}
