/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Allergen Tags Styling */
.allergen-tags {
  margin: 15px 0;
}

.badge {
  display: inline-block;
  padding: 5px 10px;
  margin: 2px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: bold;
  text-decoration: none;
}

.badge-warning {
  background-color: #ffc107;
  color: #212529;
}

.checkbox-item {
  margin: 8px 0;
  padding: 5px;
  border-radius: 5px;
  background-color: #f8f9fa;
}

.checkbox-item input[type="checkbox"] {
  margin-right: 8px;
}

.checkbox-item label {
  font-weight: bold;
  margin-right: 5px;
}

.checkbox-item small {
  color: #6c757d;
  font-style: italic;
}

/* Authentication Forms */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 120px);
  padding: 20px;
}

.auth-form {
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
}

.auth-form h1 {
  text-align: center;
  margin-bottom: 30px;
  color: #333;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #555;
}

.form-group input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
}

.form-group input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Form actions are now handled by Tailwind CSS */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s;
  width: 100%;
}

@media (min-width: 640px) {
  .btn {
    width: auto;
  }
}

.btn-primary {
  background-color: #007bff;
  color: white;
}

.btn-primary:hover {
  background-color: #0056b3;
}

.auth-links {
  margin-top: 20px;
  text-align: center;
}

.auth-links a {
  color: #007bff;
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
}

.error-messages {
  background-color: #f8d7da;
  color: #721c24;
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 20px;
  border: 1px solid #f5c6cb;
}

.error-messages h2 {
  margin-top: 0;
  font-size: 16px;
}

.error-messages ul {
  margin: 10px 0 0 0;
  padding-left: 20px;
}

.success-messages {
  background-color: #d4edda;
  color: #155724;
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 20px;
  border: 1px solid #c3e6cb;
}

/* Header Styling */
.main-header {
  background-color: #2c3e50;
  color: white;
  padding: 15px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-brand .brand-link {
  color: white;
  text-decoration: none;
  font-size: 24px;
  font-weight: bold;
}

.header-brand .brand-link:hover {
  color: #ecf0f1;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link {
  color: #ecf0f1;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.nav-link:hover {
  background-color: #34495e;
  color: white;
}

.nav-separator {
  color: #bdc3c7;
  margin: 0 5px;
}

.logout-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
}

.main-content {
  min-height: calc(100vh - 80px);
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Recipes Index Styling */
.recipes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #ecf0f1;
}

.recipes-header-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.household-info {
  margin: 0;
  color: #666;
  font-size: 14px;
  font-style: italic;
}

/* Recipe Show Styling */
.recipe-show-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.recipe-header {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 2px solid #ecf0f1;
}

.recipe-header h1 {
  color: #2c3e50;
  margin-bottom: 10px;
}

.recipe-household {
  color: #666;
  font-size: 16px;
  margin: 0;
  font-style: italic;
}

.recipe-content {
  margin-bottom: 40px;
}

.recipe-content h2 {
  color: #2c3e50;
  margin-top: 30px;
  margin-bottom: 15px;
}

.recipe-content ul {
  margin-bottom: 20px;
}

.recipe-content li {
  margin-bottom: 5px;
  line-height: 1.6;
}

.recipe-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  padding-top: 30px;
  border-top: 2px solid #ecf0f1;
}

.recipes-header h1 {
  margin: 0;
  color: #2c3e50;
}

.recipes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.recipe-card {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.recipe-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.recipe-title {
  color: #2c3e50;
  text-decoration: none;
  font-size: 18px;
  font-weight: bold;
  margin: 0 0 10px 0;
}

.recipe-title:hover {
  color: #3498db;
}

.recipe-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}

.recipe-servings {
  background-color: #3498db;
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.recipe-ingredients {
  color: #666;
  font-size: 14px;
  margin: 10px 0;
  line-height: 1.4;
}

.more-ingredients {
  color: #999;
  font-style: italic;
}

.recipe-allergens {
  margin-top: 10px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.empty-state a {
  color: #3498db;
  text-decoration: none;
  font-weight: bold;
}

.empty-state a:hover {
  text-decoration: underline;
}

/* Recipe Form Styling */
.recipe-form-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.recipe-form-header {
  text-align: center;
  margin-bottom: 40px;
}

.recipe-form-header h1 {
  color: #2c3e50;
  margin-bottom: 10px;
}

.form-subtitle {
  color: #666;
  font-size: 16px;
  margin: 0;
}

.recipe-form {
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-section {
  margin-bottom: 30px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #2c3e50;
  font-size: 16px;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-help {
  display: block;
  margin-top: 5px;
  color: #666;
  font-size: 14px;
  font-style: italic;
}

.allergen-tags-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.allergen-tag-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background-color: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.allergen-tag-item input[type="checkbox"] {
  margin-right: 8px;
}

.allergen-tag-item label {
  font-weight: bold;
  margin-right: 5px;
  cursor: pointer;
}

.allergen-description {
  color: #6c757d;
  font-style: italic;
  font-size: 12px;
}

/* Form actions styling is now handled by Tailwind CSS */

.btn-large {
  padding: 15px 30px;
  font-size: 18px;
}

.btn-secondary {
  background-color: #6c757d;
  color: white;
  border: 1px solid #6c757d;
}

.btn-secondary:hover {
  background-color: #545b62;
  border-color: #545b62;
}

/* Household Form Styling */
.household-form-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
}

.household-form-header {
  text-align: center;
  margin-bottom: 40px;
}

.household-form-header h1 {
  color: #2c3e50;
  margin-bottom: 10px;
}

.household-form {
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Usage Info Card Styling */
.usage-info-card {
  color: white !important;
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 30px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.usage-info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
  pointer-events: none;
}

.usage-info-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.usage-icon {
  margin-right: 12px;
  opacity: 0.9;
}

.usage-info-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: white !important;
}

.usage-stats {
  position: relative;
  z-index: 1;
}

.usage-stat {
  text-align: center;
  margin-bottom: 20px;
}

.stat-value {
  font-size: 36px;
  font-weight: bold;
  margin-bottom: 5px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
  color: white !important;
}

.stat-label {
  font-size: 14px;
  opacity: 0.9;
  font-weight: 500;
  color: white !important;
}

.usage-progress {
  margin-bottom: 20px;
}

.progress-bar {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  height: 8px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  background: linear-gradient(90deg, #4ade80 0%, #22c55e 100%);
  height: 100%;
  border-radius: 10px;
  transition: width 0.3s ease;
  box-shadow: 0 2px 4px rgba(74, 222, 128, 0.3);
}

.progress-text {
  font-size: 12px;
  opacity: 0.9;
  text-align: center;
  font-weight: 500;
  color: white !important;
}

.usage-status {
  text-align: center;
  position: relative;
  z-index: 1;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.status-badge svg {
  opacity: 0.9;
}

.status-good {
  background: rgba(34, 197, 94, 0.9);
  color: white;
}

.status-warning {
  background: rgba(245, 158, 11, 0.9);
  color: white;
}

.status-critical {
  background: rgba(239, 68, 68, 0.9);
  color: white;
}

/* Predefined Gradient Themes */
.usage-info-card.theme-blue {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3) !important;
}

.usage-info-card.theme-green {
  background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%) !important;
  box-shadow: 0 8px 25px rgba(74, 222, 128, 0.3) !important;
}

.usage-info-card.theme-orange {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3) !important;
}

.usage-info-card.theme-purple {
  background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%) !important;
  box-shadow: 0 8px 25px rgba(168, 85, 247, 0.3) !important;
}

.usage-info-card.theme-red {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3) !important;
}

.usage-info-card.theme-teal {
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%) !important;
  box-shadow: 0 8px 25px rgba(20, 184, 166, 0.3) !important;
}



.form-select {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
  font-family: inherit;
  background-color: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-select:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Header Household Link Styling */
.household-link {
  font-weight: bold;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 8px 12px;
  transition: background-color 0.2s;
}

.household-link:hover {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
}

/* Meal Plan Form Styling */
.meal-plan-form-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

.meal-plan-form-header {
  text-align: center;
  margin-bottom: 40px;
}

.meal-plan-form-header h1 {
  color: #2c3e50;
  margin-bottom: 10px;
}

.meal-plan-form {
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.section-title {
  color: #2c3e50;
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: bold;
}

.meal-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.day-card {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.day-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.day-title {
  color: #2c3e50;
  margin: 0 0 15px 0;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  padding-bottom: 10px;
  border-bottom: 2px solid #dee2e6;
}

.meal-slots {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.meal-slot {
  display: flex;
  align-items: center;
}

.meal-slot-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  background: white;
  border: 1px solid #dee2e6;
  transition: background-color 0.2s, border-color 0.2s;
  width: 100%;
}

.meal-slot-label:hover {
  background-color: #e9ecef;
  border-color: #adb5bd;
}

.meal-slot-checkbox {
  margin-right: 10px;
  transform: scale(1.2);
}

.meal-slot-text {
  font-weight: 500;
  color: #495057;
}

.meal-slot-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recipe-selection {
  margin-top: 8px;
}

.recipe-select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  background-color: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.recipe-select:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

/* Meal Plans Index Styling */
.meal-plans-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #ecf0f1;
}

.meal-plans-header h1 {
  margin: 0;
  color: #2c3e50;
}

.meal-plans-header-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.meal-plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

.meal-plan-card {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.meal-plan-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.meal-plan-header {
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #ecf0f1;
}

.meal-plan-title {
  color: #2c3e50;
  text-decoration: none;
  font-size: 18px;
  font-weight: bold;
  margin: 0 0 10px 0;
}

.meal-plan-title:hover {
  color: #3498db;
}

.meal-plan-stats {
  margin-top: 10px;
}

.stat-item {
  color: #666;
  font-size: 14px;
}

.meal-plan-preview {
  margin-bottom: 20px;
}

.day-preview {
  margin-bottom: 15px;
}

.day-preview-title {
  color: #2c3e50;
  font-size: 14px;
  font-weight: bold;
  margin: 0 0 8px 0;
}

.meal-types-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.meal-type-indicator {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
}

.meal-type-indicator.filled {
  background-color: #28a745;
  color: white;
}

.meal-type-indicator.empty {
  background-color: #f8f9fa;
  color: #6c757d;
  border: 1px solid #dee2e6;
}

.meal-plan-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 14px;
}

/* Meal Plan Show Styling */
.meal-plan-show-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

.meal-plan-show-header {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 2px solid #ecf0f1;
}

.meal-plan-show-header h1 {
  color: #2c3e50;
  margin-bottom: 10px;
}

.meal-plan-household {
  color: #666;
  font-size: 16px;
  margin: 0 0 20px 0;
  font-style: italic;
}

.meal-plan-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.stat-badge {
  background: #f8f9fa;
  color: #495057;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  border: 1px solid #dee2e6;
}

.enhanced-indicator {
  margin: 10px 0;
}

.enhanced-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: linear-gradient(135deg, #8b5cf6, #a855f7);
  color: white;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(139, 92, 246, 0.3);
  transition: all 0.2s ease;
}

.enhanced-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(139, 92, 246, 0.4);
}

.enhanced-badge svg {
  width: 16px;
  height: 16px;
  margin-right: 6px;
}

/* Enhanced View Styling */
.enhanced-view .meal-plan-show-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 2px solid #8b5cf6;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15);
}

/* Enhanced View Recipe Summary Cards */
.enhanced-view .recipe-summary-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.2s ease;
}

.enhanced-view .recipe-summary-card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.enhanced-view .recipe-summary-header {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.enhanced-view .recipe-summary-header .recipe-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 0.75rem;
}

.enhanced-view .recipe-summary-header .recipe-title .recipe-link {
  color: #3182ce;
  text-decoration: none;
}

.enhanced-view .recipe-summary-header .recipe-title .recipe-link:hover {
  color: #2c5aa0;
  text-decoration: underline;
}

.enhanced-view .recipe-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.enhanced-view .usage-badge {
  background: #805ad5;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  display: inline-block;
  margin-right: 0.25rem;
}

.enhanced-view .recipe-badges .inline-flex {
  white-space: nowrap;
  display: inline-block;
  margin-right: 0.25rem;
}

.recipe-badges .inline-flex {
  white-space: nowrap;
  display: inline-block;
  margin-right: 0.25rem;
}

.enhanced-view .day-section {
  border: 2px solid #e9ecef;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.1);
  transition: all 0.3s ease;
}

.enhanced-view .day-section:hover {
  border-color: #8b5cf6;
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.2);
  transform: translateY(-2px);
}

.enhanced-view .meal-slot-display.has-recipe {
  border-color: #8b5cf6;
  background: linear-gradient(135deg, #f8fff9 0%, #f0f9ff 100%);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.1);
}

.meal-plan-content {
  margin-bottom: 40px;
}

.day-section {
  margin-bottom: 40px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.day-title {
  color: #2c3e50;
  margin: 0 0 20px 0;
  font-size: 20px;
  font-weight: bold;
  padding-bottom: 10px;
  border-bottom: 2px solid #ecf0f1;
}

.meal-slots-display {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.meal-slot-display {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 15px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.meal-slot-display:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.meal-slot-display.has-recipe {
  border-color: #28a745;
  background-color: #f8fff9;
}

.meal-slot-display.no-recipe {
  border-color: #dee2e6;
  background-color: #f8f9fa;
}

.meal-slot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ecf0f1;
}

.meal-type-title {
  color: #2c3e50;
  margin: 0;
  font-size: 16px;
  font-weight: bold;
}

.recipe-badge {
  background-color: #28a745;
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
}

.empty-badge {
  background-color: #6c757d;
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
}

.recipe-info {
  margin-top: 10px;
}

.recipe-title {
  margin: 0 0 10px 0;
  font-size: 14px;
}

.recipe-link {
  color: #3498db;
  text-decoration: none;
  font-weight: bold;
}

.recipe-link:hover {
  text-decoration: underline;
}

.recipe-preview {
  margin-bottom: 10px;
}

.recipe-ingredients-preview {
  color: #666;
  font-size: 12px;
  margin: 0;
  line-height: 1.4;
}

.more-ingredients {
  color: #999;
  font-style: italic;
}

.recipe-allergens {
  margin-top: 8px;
}

.empty-slot {
  text-align: center;
  padding: 20px 0;
}

.empty-slot-text {
  color: #6c757d;
  margin: 0 0 5px 0;
  font-style: italic;
}

.empty-slot-help {
  color: #999;
  font-size: 11px;
}

.meal-plan-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  padding-top: 30px;
  border-top: 2px solid #ecf0f1;
}

/* Recipe Selection Styling */
.recipe-card {
  position: relative;
  border: 2px solid transparent;
  transition: border-color 0.3s ease;
}

.recipe-card.selected {
  border-color: #28a745;
  background-color: #f8fff9;
}

.recipe-selection {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
}

.recipe-checkbox {
  display: none;
}

.recipe-checkbox-label {
  display: inline-block;
  padding: 8px 12px;
  background-color: #f8f9fa;
  border: 2px solid #dee2e6;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #6c757d;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
}

.recipe-checkbox-label:hover {
  background-color: #e9ecef;
  border-color: #adb5bd;
}

.recipe-checkbox:checked + .recipe-checkbox-label {
  background-color: #28a745;
  border-color: #28a745;
  color: white;
}

.recipe-content {
  padding-top: 40px;
}

#add-to-household-btn {
  background-color: #28a745;
  border-color: #28a745;
  color: white;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

#add-to-household-btn:hover {
  background-color: #218838;
  border-color: #1e7e34;
  transform: translateY(-1px);
}

#add-to-household-btn:disabled {
  background-color: #6c757d;
  border-color: #6c757d;
  cursor: not-allowed;
  transform: none;
}

.btn-loading {
  font-style: italic;
}

/* Recipe card hover effect when selectable */
.recipe-card:hover {
  border-color: #28a745;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.15);
}

.recipe-card.selected:hover {
  border-color: #218838;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.25);
}

/* Hide number input spinners for serving adjusters */
.serving-input::-webkit-outer-spin-button,
.serving-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.serving-input[type=number] {
  -moz-appearance: textfield; /* Firefox */
}

/* Hide number input spinners for eater adjusters */
.eater-input::-webkit-outer-spin-button,
.eater-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.eater-input[type=number] {
  -moz-appearance: textfield; /* Firefox */
}

/* Membership Table Styles */
.membership-table-container {
  margin-top: 16px;
  overflow-x: auto;
}

.membership-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.membership-table th {
  background-color: #f8fafc;
  padding: 16px 12px;
  text-align: center;
  font-weight: 600;
  color: #374151;
  border-bottom: 1px solid #e5e7eb;
}

.tier-name-header {
  text-align: left !important;
  width: 40%;
}

.billing-header {
  width: 30%;
}

.membership-table td {
  padding: 16px 12px;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: top;
}

.tier-name {
  background-color: #f9fafb;
}

.tier-name strong {
  display: block;
  font-size: 16px;
  color: #111827;
  margin-bottom: 8px;
}

.tier-features {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.4;
}

.billing-option {
  text-align: center;
  position: relative;
}

/* Hide radio buttons completely - Updated 2024 */
.billing-option input[type="radio"],
.membership-radio,
input[type="radio"].membership-radio,
input[name="membership_selection"][type="radio"],
td .billing-option input[type="radio"],
td .membership-radio,
table input[type="radio"],
table .membership-radio {
  position: absolute !important;
  opacity: 0 !important;
  visibility: hidden !important;
  width: 100% !important;
  height: 100% !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  z-index: -1 !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  border: none !important;
  background: transparent !important;
  margin: 0 !important;
  padding: 0 !important;
  display: none !important;
}

.billing-label {
  display: block;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  background-color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.billing-label:hover {
  border-color: #d1d5db;
  background-color: #f9fafb;
}

.billing-option input[type="radio"]:checked + .billing-label {
  border-color: #3b82f6;
  background-color: #eff6ff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.price {
  display: block;
  font-size: 18px;
  font-weight: 600;
  color: #059669;
  margin-bottom: 4px;
}

.savings {
  display: block;
  font-size: 12px;
  color: #059669;
  font-weight: 500;
}

.billing-option input[type="radio"]:checked + .billing-label .price {
  color: #047857;
}

.billing-option input[type="radio"]:checked + .billing-label .savings {
  color: #047857;
}

/* Remove old radio button styles */
.radio-group,
.radio-option,
.radio-label,
.tier-details,
.tier-price,
.tier-features {
  display: none;
}

/* Responsive table styles */
@media (max-width: 768px) {
  .membership-table-container {
    margin-top: 12px;
  }
  
  .membership-table {
    font-size: 14px;
  }
  
  .membership-table th,
  .membership-table td {
    padding: 12px 8px;
  }
  
  .tier-name strong {
    font-size: 14px;
  }
  
  .tier-features {
    font-size: 12px;
  }
  
  .price {
    font-size: 16px;
  }
  
  .savings {
    font-size: 11px;
  }
  
  .billing-label {
    padding: 8px 12px;
    min-height: 50px;
  }
}

@media (max-width: 480px) {
  .membership-table {
    font-size: 13px;
  }
  
  .membership-table th,
  .membership-table td {
    padding: 8px 6px;
  }
  
  .tier-name strong {
    font-size: 13px;
  }
  
  .tier-features {
    font-size: 11px;
  }
  
  .price {
    font-size: 14px;
  }
  
  .savings {
    font-size: 10px;
  }
}

/* Membership Form Styles */
.membership-form-container {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 2px solid #e5e7eb;
}

.membership-form-header {
  margin-bottom: 20px;
}

.membership-form-header h2 {
  font-size: 24px;
  color: #111827;
  margin-bottom: 8px;
}

.membership-form {
  margin-top: 20px;
}

.membership-form .form-actions {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.membership-form .btn {
  width: 100%;
  max-width: 300px;
}

/* Flash Messages */
.flash-messages {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: 100%;
  max-width: 600px;
  padding: 0 20px;
}

.flash-message {
  margin-bottom: 12px;
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-left: 4px solid;
  animation: slideInDown 0.3s ease-out;
}

.flash-notice,
.flash-success {
  background-color: #f0f9ff;
  border-color: #0ea5e9;
  color: #0c4a6e;
}

.flash-alert,
.flash-error {
  background-color: #fef2f2;
  border-color: #ef4444;
  color: #991b1b;
}

.flash-warning {
  background-color: #fffbeb;
  border-color: #f59e0b;
  color: #92400e;
}

.flash-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.flash-icon {
  flex-shrink: 0;
}

.flash-text {
  flex-grow: 1;
}

.flash-message-text {
  margin: 0;
  font-weight: 500;
  line-height: 1.4;
}

.flash-close {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.flash-close:hover {
  opacity: 1;
}

.flash-dismissible {
  animation: slideInDown 0.3s ease-out;
}

.flash-dismissible.dismissing {
  animation: slideOutUp 0.3s ease-in forwards;
}

@keyframes slideInDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideOutUp {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(-100%);
    opacity: 0;
  }
}

/* Responsive adjustments for flash messages */
@media (max-width: 640px) {
  .flash-messages {
    top: 70px;
    padding: 0 16px;
  }
  
  .flash-message {
    padding: 14px 16px;
    margin-bottom: 8px;
  }
  
  .flash-content {
    gap: 10px;
  }
}

/* Recipe Summary Section Styling */
.recipe-summary-section {
  margin: 2rem 0;
  padding: 2rem;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #e9ecef;
}

.summary-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 0.5rem;
  border-bottom: 2px solid #4299e1;
  padding-bottom: 0.5rem;
}

.summary-description {
  color: #718096;
  font-size: 1rem;
  margin-bottom: 2rem;
  font-style: italic;
}

/* Executive Report Section Styling */
.executive-summary-section,
.main-recipes-section,
.full-meal-plan-section {
  margin: 3rem 0;
  padding: 2rem;
  background: white;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.section-header {
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
}

.collapsible-header {
  cursor: pointer;
  user-select: none;
  /* Ensure header is always visible */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem;
  border-radius: 0.375rem;
  transition: background-color 0.2s ease;
}

.collapsible-header:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.collapsible-header .collapse-toggle {
  transition: all 0.3s ease;
  /* Ensure toggle button is always visible */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  border-radius: 0.25rem;
  min-width: 2rem;
  min-height: 2rem;
}

.collapsible-header .collapse-toggle svg {
  transition: transform 0.3s ease;
  /* Ensure arrow is always visible */
  display: block;
  width: 1.5rem;
  height: 1.5rem;
  stroke-width: 2;
}

/* Arrow rotation based on data-collapsed attribute */
.collapsible-header[data-collapsed="true"] .collapse-toggle svg {
  transform: rotate(90deg);
}

/* Add visual indicator for collapsed state */
.collapsible-header[data-collapsed="true"] {
  border-left: 3px solid #e5e7eb;
}

.collapsible-header[data-collapsed="false"] {
  border-left: 3px solid #10b981;
}

/* Hover effect for better user experience */
.collapsible-header:hover .collapse-toggle {
  color: #6b7280;
  background-color: rgba(0, 0, 0, 0.05);
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  color: #1a202c;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.section-subtitle {
  color: #718096;
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.section-divider {
  height: 4px;
  background: linear-gradient(90deg, #4299e1, #805ad5, #f56565);
  border-radius: 2px;
  margin: 0 auto;
  width: 100px;
}

/* Collapse Toggle Button */
.collapse-toggle {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.collapse-toggle:hover {
  background: white;
  border-color: #4299e1;
  transform: scale(1.1);
}

.collapse-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.3);
}

.collapse-icon {
  width: 20px;
  height: 20px;
  color: #4a5568;
  transition: transform 0.3s ease;
}

/* Collapsed State */
.section-header.collapsed .collapse-icon {
  transform: rotate(-90deg);
}

.section-content {
  overflow: visible;
  transition: all 0.3s ease;
  max-height: none;
  opacity: 1;
  margin-top: 1rem;
}

.section-content.collapsed {
  max-height: 0;
  opacity: 0;
  margin: 0;
  padding: 0;
  border: none;
}

/* Executive Summary Section */
.executive-summary-section {
  background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
  border: 2px solid #4299e1;
}

.meal-plan-overview {
  text-align: center;
  margin-bottom: 2rem;
}

.meal-plan-name {
  font-size: 2.5rem;
  font-weight: 900;
  color: #2d3748;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.meal-plan-household {
  font-size: 1.25rem;
  color: #4a5568;
  margin-bottom: 1rem;
  font-weight: 500;
}

.enhanced-indicator {
  margin: 1rem 0;
}

.enhanced-badge {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, #4299e1, #3182ce);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.meal-plan-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.stat-card {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 900;
  color: #4299e1;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #4a5568;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Main Recipes Section */
.main-recipes-section {
  background: linear-gradient(135deg, #f0fff4 0%, #e6fffa 100%);
  border: 2px solid #48bb78;
}

.main-recipes-section .section-title {
  color: #22543d;
}

.main-recipes-section .section-divider {
  background: linear-gradient(90deg, #48bb78, #38a169, #2f855a);
}

/* Full Meal Plan Section */
.full-meal-plan-section {
  background: linear-gradient(135deg, #fffaf0 0%, #fef5e7 100%);
  border: 2px solid #ed8936;
}

.full-meal-plan-section .section-title {
  color: #744210;
}

.full-meal-plan-section .section-divider {
  background: linear-gradient(90deg, #ed8936, #dd6b20, #c05621);
}

/* Updated Recipe Summary Cards for Main Recipes Section */
.main-recipes-section .recipe-summary-card {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.main-recipes-section .recipe-summary-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border-color: #48bb78;
}

.main-recipes-section .recipe-summary-header .recipe-title {
  color: #22543d;
}

.main-recipes-section .usage-badge {
  background: linear-gradient(135deg, #48bb78, #38a169);
}

/* Updated Day Sections for Full Meal Plan */
.full-meal-plan-section .day-section {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.full-meal-plan-section .day-title {
  color: #744210;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #ed8936;
}

.full-meal-plan-section .meal-slot-display {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.full-meal-plan-section .meal-type-title {
  color: #744210;
  font-size: 1.125rem;
  font-weight: 600;
}

.full-meal-plan-section .recipe-title {
  color: #2d3748;
  font-size: 1.25rem;
  font-weight: 600;
}

.full-meal-plan-section .recipe-link {
  color: #ed8936;
}

.full-meal-plan-section .recipe-link:hover {
  color: #dd6b20;
}

.recipes-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
}

.recipe-summary-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.2s ease;
}

.recipe-summary-card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.recipe-summary-header {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.recipe-summary-header .recipe-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 0.75rem;
}

.recipe-summary-header .recipe-title .recipe-link {
  color: #3182ce;
  text-decoration: none;
}

.recipe-summary-header .recipe-title .recipe-link:hover {
  color: #2c5aa0;
  text-decoration: underline;
}

.recipe-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.usage-badge {
  background: #805ad5;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  display: inline-block;
  margin-right: 0.25rem;
}

.recipe-summary-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.total-servings strong {
  display: block;
  margin-bottom: 0.5rem;
  color: #4a5568;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Consolidated Ingredients Section */
.consolidated-ingredients {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 1rem;
}

.consolidated-ingredients strong {
  display: block;
  margin-bottom: 0.75rem;
  color: #374151;
  font-size: 0.875rem;
  font-weight: 600;
}

.ingredients-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ingredient-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.ingredient-item svg {
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.ingredient-text {
  color: #4a5568;
  font-size: 0.875rem;
  line-height: 1.4;
}

.meal-occurrences strong {
  display: block;
  margin-bottom: 0.25rem;
  color: #374151;
  font-size: 0.875rem;
}

.click-hint {
  display: block;
  color: #6b7280;
  font-size: 0.75rem;
  font-style: italic;
  margin-bottom: 0.5rem;
}

.occurrences-summary {
  margin-top: 0.5rem;
}

/* Compact day occurrences layout */
.day-occurrences {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.day-occurrences:hover {
  background: #f8fafc;
  border-color: #3b82f6;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.1);
  transform: translateY(-1px);
}

.day-occurrences:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(59, 130, 246, 0.1);
}

/* Highlight effect for day sections when scrolled to */
.highlight-day {
  animation: dayHighlight 2s ease-out;
}

@keyframes dayHighlight {
  0% {
    background-color: #fef3c7;
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.3);
  }
  50% {
    background-color: #fef3c7;
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.3);
  }
  100% {
    background-color: transparent;
    border-color: #e2e8f0;
    box-shadow: none;
  }
}

.day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.day-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.click-indicator {
  width: 16px;
  height: 16px;
  color: #6b7280;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.day-occurrences:hover .click-indicator {
  color: #3b82f6;
  transform: translateX(2px);
}

.day-name {
  font-weight: 600;
  color: #2d3748;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.meal-types {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

.meal-type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: #edf2f7;
  border: 1px solid #cbd5e0;
  border-radius: 50%;
  color: #4a5568;
  cursor: help;
  transition: all 0.2s ease;
}

.meal-type-badge:hover {
  transform: scale(1.1);
}

.meal-type-badge svg {
  width: 14px;
  height: 14px;
}

/* Old compact view styles removed - replaced with new compact layout above */

/* Breakfast - Yellow */
.meal-type-badge[title*="Breakfast"] {
  background: #fbbf24;
  border-color: #f59e0b;
  color: #92400e;
}

.meal-type-badge[title*="Breakfast"]:hover {
  background: #f59e0b;
  border-color: #d97706;
}

/* Lunch - White with red hands */
.meal-type-badge[title*="Lunch"] {
  background: #ffffff;
  border-color: #dc2626;
  color: #dc2626;
}

.meal-type-badge[title*="Lunch"]:hover {
  background: #fef2f2;
  border-color: #b91c1c;
}

/* Dinner - Dark blue */
.meal-type-badge[title*="Dinner"] {
  background: #1e40af;
  border-color: #1d4ed8;
  color: #ffffff;
}

.meal-type-badge[title*="Dinner"]:hover {
  background: #1d4ed8;
  border-color: #1e3a8a;
}

/* Snack - Light green */
.meal-type-badge[title*="Snack"] {
  background: #86efac;
  border-color: #4ade80;
  color: #166534;
}

.meal-type-badge[title*="Snack"]:hover {
  background: #4ade80;
  border-color: #22c55e;
}

.meal-type-badge svg {
  width: 16px;
  height: 16px;
}

/* Remove old detailed view styles */
.occurrences-detailed {
  display: none;
}

.occurrence-item {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: #4a5568;
  font-weight: 500;
}

.occurrence-servings {
  color: #718096;
  font-size: 0.75rem;
  font-weight: 400;
}

.occurrences-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.recipe-allergens strong {
  display: block;
  margin-bottom: 0.5rem;
  color: #4a5568;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.allergen-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.no-recipes-message {
  text-align: center;
  padding: 3rem;
  color: #718096;
  font-style: italic;
}

/* Print-friendly styles */
@media print {
  .view-toggle {
    display: none !important;
  }
  
  .collapse-toggle {
    display: none !important;
  }
  
  .section-content {
    max-height: none !important;
    opacity: 1 !important;
  }
  
  .executive-summary-section,
  .main-recipes-section,
  .full-meal-plan-section {
    background: white !important;
    border: 2px solid #000 !important;
    margin: 1rem 0 !important;
    padding: 1rem !important;
    page-break-inside: avoid;
  }
  
  .section-title {
    color: #000 !important;
    border-bottom: 2px solid #000 !important;
  }
  
  .section-divider {
    background: #000 !important;
  }
  
  .meal-plan-name {
    color: #000 !important;
  }
  
  .stat-card {
    border: 1px solid #000 !important;
    background: #f0f0f0 !important;
  }
  
  .stat-value {
    color: #000 !important;
  }
  
  .recipe-summary-card {
    border: 1px solid #000 !important;
    box-shadow: none !important;
    page-break-inside: avoid;
    margin-bottom: 1rem !important;
  }
  
  .recipe-summary-header .recipe-title .recipe-link {
    color: #000 !important;
    text-decoration: underline !important;
  }
  
  .usage-badge {
    background: #000 !important;
    color: white !important;
    border: 1px solid #000 !important;
  }
  
  .occurrence-item {
    background: #f0f0f0 !important;
    border: 1px solid #000 !important;
  }
  
  /* Print styles for meal occurrences */
  
  .day-occurrences {
    border: 1px solid #000 !important;
    background: #f0f0f0 !important;
  }
  
  .day-name {
    color: #000 !important;
  }
  
  .meal-type-badge {
    background: #f0f0f0 !important;
    border: 1px solid #000 !important;
    color: #000 !important;
  }
  
  .badge-warning {
    background: #ffeb3b !important;
    color: #000 !important;
    border: 1px solid #000 !important;
  }
  
  .day-section {
    border: 1px solid #000 !important;
    background: #f0f0f0 !important;
    page-break-inside: avoid;
  }
  
  .day-title {
    color: #000 !important;
    border-bottom: 2px solid #000 !important;
  }
  
  .meal-slot-display {
    border: 1px solid #000 !important;
    background: white !important;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .view-toggle {
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem;
  }
  
  .toggle-label,
  .current-view,
  .toggle-link {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
  }
  
  .executive-summary-section,
  .main-recipes-section,
  .full-meal-plan-section {
    padding: 1rem;
    margin: 1.5rem 0;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .meal-plan-name {
    font-size: 2rem;
  }
  
  .meal-plan-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .stat-value {
    font-size: 2rem;
  }
  
  .recipes-summary-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .recipe-summary-card {
    padding: 1rem;
  }
  
  .servings-breakdown {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .occurrences-list {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  /* Responsive meal occurrences - removed old grid layout */
  
  .day-occurrences {
    padding: 0.5rem;
  }
  
  .meal-type-badge {
    width: 24px;
    height: 24px;
  }
  
  .meal-type-badge svg {
    width: 14px;
    height: 14px;
  }
  
  /* Responsive collapsible sections */
  .collapse-toggle {
    width: 36px;
    height: 36px;
    top: 0.5rem;
    right: 0.5rem;
  }
  
  .collapse-icon {
    width: 18px;
    height: 18px;
  }
  
  .section-header {
    padding: 1rem 0.5rem;
  }
}

/* View Toggle Styling */
.view-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  backdrop-filter: blur(4px);
}

.toggle-label {
  font-weight: 600;
  color: #4a5568;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.current-view {
  background: #4299e1;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.toggle-link {
  background: #48bb78;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(72, 187, 120, 0.2);
}

.toggle-link:hover {
  background: #38a169;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(72, 187, 120, 0.3);
  color: white;
  text-decoration: none;
}

/* Structured Ingredient Form Styling - Compressed */
.ingredients-container {
  border: none;
  background-color: transparent;
  overflow: visible;
}

.ingredients-header {
  background-color: transparent;
  border-bottom: none;
  padding: 0;
  margin-bottom: 8px;
}

.ingredient-row-header {
  display: grid;
  grid-template-columns: 1fr 80px;
  gap: 8px;
  align-items: center;
  font-weight: 600;
  font-size: 13px;
  color: #374151;
}

.ingredient-actions-header {
  text-align: center;
}

.ingredients-list {
  padding: 0;
}

.ingredient-row {
  display: flex !important;
  gap: 8px !important;
  align-items: center !important;
  margin-bottom: 6px !important;
  padding: 0 !important;
  background-color: transparent !important;
  border: none !important;
  border-radius: 0 !important;
}

.ingredient-row:last-child {
  margin-bottom: 0;
}

.ingredient-inputs {
  display: flex !important;
  gap: 8px !important;
  align-items: center !important;
  flex: 1 !important;
}

.ingredient-quantity-input {
  width: 70px !important;
  text-align: center !important;
}

.ingredient-unit-input {
  width: 90px !important;
  text-align: center !important;
}

.ingredient-item-input {
  flex: 1 !important;
}

.ingredient-actions {
  width: 80px !important;
  display: flex !important;
  justify-content: center !important;
}

.remove-ingredient {
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 3px;
  border: 1px solid #dc2626;
  background-color: #dc2626;
  color: white;
  cursor: pointer;
  transition: background-color 0.2s;
}

.remove-ingredient:hover {
  background-color: #b91c1c;
}

.ingredients-actions {
  padding: 8px 0;
  border-top: none;
  background-color: transparent;
}

#add-ingredient {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 4px;
  border: 1px solid #6b7280;
  background-color: #6b7280;
  color: white;
  cursor: pointer;
  transition: background-color 0.2s;
}

#add-ingredient:hover {
  background-color: #4b5563;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .ingredient-row-header,
  .ingredient-row {
    gap: 6px;
  }
  
  .ingredient-inputs {
    gap: 4px;
  }
  
  .ingredient-quantity-input,
  .ingredient-unit-input,
  .ingredient-item-input {
    font-size: 12px;
    padding: 4px 6px;
  }
  
  .remove-ingredient {
    padding: 3px 6px;
    font-size: 10px;
  }
}

.ingredient-inputs-header {
  text-align: left;
}

.ingredient-actions-header {
  text-align: center;
}

.ingredient-quantity-input,
.ingredient-unit-input,
.ingredient-item-input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  border-radius: 3px;
  font-size: 13px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ingredient-quantity-input:focus,
.ingredient-unit-input:focus,
.ingredient-item-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* Max Recipes Slider Styling */
.slider {
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  border-radius: 5px;
  background: #e5e7eb;
  outline: none;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.slider:hover {
  opacity: 1;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #6366f1;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.slider::-webkit-slider-thumb:hover {
  background: #4f46e5;
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #6366f1;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.slider::-moz-range-thumb:hover {
  background: #4f46e5;
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.slider::-moz-range-track {
  height: 8px;
  border-radius: 5px;
  background: #e5e7eb;
  border: none;
}

.slider:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-actions {
  margin-top: calc(var(--spacing) * 8);
  gap: calc(var(--spacing) * 3);
  flex-direction: column;
  display: flex;
}

@media (min-width: 40rem) {
  .form-actions {
    gap: calc(var(--spacing) * 4);
    flex-direction: row;
  }
}

.recipe-generation-actions {
  margin-top: calc(var(--spacing) * 6);
  gap: calc(var(--spacing) * 3);
  flex-direction: column;
  display: flex;
  align-items: center;
  padding-top: calc(var(--spacing) * 4);
  border-top: 1px solid #e5e7eb;
}

@media (min-width: 40rem) {
  .recipe-generation-actions {
    gap: calc(var(--spacing) * 4);
    flex-direction: row;
    justify-content: center;
  }
}

/* Collapsible Sections */
.collapsible-header {
  cursor: pointer;
  user-select: none;
  /* Ensure header is always visible */
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.collapsible-header:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.collapsible-header .collapse-toggle {
  transition: transform 0.3s ease;
  /* Ensure toggle button is always visible */
  display: flex;
  align-items: center;
  justify-content: center;
}

.collapsible-header .collapse-toggle svg {
  transition: transform 0.3s ease;
  /* Ensure arrow is always visible */
  display: block;
}

/* Arrow rotation based on data-collapsed attribute */
.collapsible-header[data-collapsed="true"] .collapse-toggle svg {
  transform: rotate(90deg);
}

/* Hover effect for better user experience */
.collapsible-header:hover .collapse-toggle {
  color: #6b7280;
}

.section-content {
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease, padding 0.3s ease;
  max-height: none;
  opacity: 1;
}

.section-content.collapsed {
  max-height: 0;
  opacity: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
