/* Food Database, Exercise Calculator, Progress Tracker Styles */

.food-search-section {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.food-search-input,
.food-category-filter {
  flex: 1;
  min-width: 200px;
  padding: 0.75rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
}

.food-search-input:focus,
.food-category-filter:focus {
  outline: none;
  border-color: #FF6B35;
}

.food-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
}

.food-card {
  background: white;
  border: 2px solid #f3f4f6;
  border-radius: 12px;
  padding: 1.25rem;
  transition: all 0.2s;
}

.food-card:hover {
  border-color: #FF6B35;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.food-card h4 {
  margin: 0 0 0.25rem 0;
  font-size: 1.1rem;
  color: #1f2937;
}

.food-unit {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 0 0 0.75rem 0;
}

.food-nutrition {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.food-kcal {
  font-size: 1.5rem;
  font-weight: 700;
  color: #FF6B35;
}

.food-macros {
  display: flex;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #4b5563;
}

.food-macros span {
  padding: 0.25rem 0.5rem;
  background: #f9fafb;
  border-radius: 4px;
}

.food-add-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.food-grams-input {
  width: 80px;
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.food-diary-section,
.activity-log-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid #f3f4f6;
}

.diary-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.diary-table th,
.diary-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.diary-table th {
  background: #f9fafb;
  font-weight: 600;
  color: #374151;
}

.diary-total {
  background: #fff7ed;
  font-weight: 600;
}

.btn-link {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0.25rem 0.5rem;
}

.btn-link:hover {
  color: #dc2626;
}

/* Exercise Calculator */
.exercise-result-card {
  margin-top: 2rem;
  padding: 2rem;
  background: linear-gradient(135deg, #FF6B35 0%, #FF8C61 100%);
  color: white;
  border-radius: 12px;
  text-align: center;
}

.exercise-result-card .big-number {
  font-size: 3rem;
  font-weight: 700;
  margin: 1rem 0;
}

.exercise-result-card .big-number span {
  font-size: 1rem;
  font-weight: 400;
  display: block;
  opacity: 0.9;
}

.exercise-result-card .btn {
  background: white;
  color: #FF6B35;
}

.log-summary {
  padding: 1rem;
  background: #fff7ed;
  border-radius: 8px;
  margin-bottom: 1rem;
  text-align: center;
  color: #FF6B35;
  font-size: 1.1rem;
}

/* Progress Tracker */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.stat-box {
  background: white;
  border: 2px solid #f3f4f6;
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
}

.stat-label {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
}

.progress-stats,
.progress-history {
  margin-top: 2rem;
}

textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
}

textarea:focus {
  outline: none;
  border-color: #FF6B35;
}

/* Tool tabs */
.tool-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid #e5e7eb;
  flex-wrap: wrap;
}

.tool-tab {
  padding: 0.75rem 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: #6b7280;
  font-weight: 500;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.tool-tab:hover {
  color: #FF6B35;
}

.tool-tab.active {
  color: #FF6B35;
  border-bottom-color: #FF6B35;
}

.tool-panel {
  display: none;
}

.tool-panel.active {
  display: block;
}

@media (max-width: 768px) {
  .food-results-grid {
    grid-template-columns: 1fr;
  }
  
  .diary-table {
    font-size: 0.85rem;
  }
  
  .diary-table th,
  .diary-table td {
    padding: 0.5rem;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .exercise-result-card .big-number {
    font-size: 2rem;
  }
}