/* Baby Food Genius - Frontend Styles */

.bfg-lite-card {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.bfg-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #f0f0f0;
}

.bfg-header h2 {
  color: #2c3e50;
  font-size: 2rem;
  margin: 0 0 0.5rem 0;
}

.bfg-sub {
  color: #7f8c8d;
  font-size: 0.95rem;
  margin: 0;
}

/* Form Styles */
.bfg-form {
  margin-bottom: 2rem;
}

.bfg-row {
  margin-bottom: 1.5rem;
}

.bfg-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.bfg-section legend {
  font-weight: 600;
  color: #495057;
  font-size: 1.1rem;
  padding: 0 0.5rem;
}

.bfg-form label {
  display: block;
  font-weight: 500;
  color: #495057;
  margin-bottom: 0.5rem;
}

.bfg-form select,
.bfg-input,
.bfg-select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.bfg-form select:focus,
.bfg-input:focus,
.bfg-select:focus {
  outline: none;
  border-color: #80bdff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.bfg-radio {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.bfg-radio input[type="radio"] {
  width: auto;
  margin: 0;
}

.bfg-ingredients,
.bfg-filters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.bfg-ingredients label,
.bfg-filters label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.bfg-ingredients label:hover,
.bfg-filters label:hover {
  background: #e7f3ff;
  border-color: #80bdff;
}

.bfg-ingredients input[type="checkbox"],
.bfg-filters input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.bfg-actions {
  text-align: center;
  margin-top: 2rem;
}

.bfg-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 1rem 3rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.bfg-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(102, 126, 234, 0.4);
}

.bfg-button:active {
  transform: translateY(0);
}

/* Status & Results */
.bfg-status {
  padding: 1rem;
  margin: 1.5rem 0;
  border-radius: 6px;
  text-align: center;
  font-weight: 500;
}

.bfg-status:not(:empty) {
  background: #e3f2fd;
  border: 1px solid #90caf9;
  color: #1976d2;
}

.bfg-loader {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 0.5rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.bfg-result {
  margin-top: 2rem;
}

.bfg-recipe {
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  padding: 2rem;
  animation: fadeIn 0.5s ease-in;
}

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

.bfg-result-header {
  text-align: center;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #f0f0f0;
  margin-bottom: 2rem;
}

.bfg-result-header h3 {
  color: #2c3e50;
  font-size: 1.75rem;
  margin: 0 0 1rem 0;
}

.bfg-meta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.bfg-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #e7f3ff;
  color: #1976d2;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

.bfg-recipe .bfg-section {
  margin-bottom: 2rem;
  padding: 0;
  background: transparent;
  border: none;
}

.bfg-recipe h4 {
  color: #495057;
  font-size: 1.25rem;
  margin: 0 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e9ecef;
}

.bfg-ingredients-list,
.bfg-instructions-list,
.bfg-nutrition-list {
  margin: 0;
  padding-left: 1.5rem;
}

.bfg-ingredients-list li,
.bfg-instructions-list li,
.bfg-nutrition-list li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.bfg-ingredients-list strong {
  color: #2c3e50;
}

.bfg-ingredients-list em {
  color: #6c757d;
  font-size: 0.9rem;
}

.bfg-warning {
  background: #fff3cd;
  border: 1px solid #ffc107;
  padding: 1rem;
  border-radius: 6px;
}

.bfg-warning h4 {
  color: #856404;
}

.bfg-warning p {
  color: #856404;
  margin: 0;
}

.bfg-tips {
  background: #d1ecf1;
  border: 1px solid #17a2b8;
  padding: 1rem;
  border-radius: 6px;
}

.bfg-tips h4 {
  color: #0c5460;
}

.bfg-tips p {
  color: #0c5460;
  margin: 0;
}

.bfg-footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e9ecef;
  color: #6c757d;
}

.bfg-error {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
  .bfg-lite-card {
    padding: 1.5rem;
    margin: 1rem;
  }

  .bfg-header h2 {
    font-size: 1.5rem;
  }

  .bfg-ingredients,
  .bfg-filters {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  .bfg-button {
    padding: 0.875rem 2rem;
    font-size: 1rem;
  }

  .bfg-meta {
    flex-direction: column;
    align-items: center;
  }
}