<%-   
  content_for :title, question.page_title.blank? ? question.title : question.page_title
  content_for :meta_description, question.page_description
%>


<div class="question-container">
  
  <div class="animation-element">
    <div class="question-step">
      <div><%= question_index %>/<%= questions_size %></div>
    </div>
  </div>

  <div class="animation-element">
    <div class="answers-distribution">
    <% question.answer_percentages.each do |k,v| %>
      <%= tag.div data: { value: v, answered: (k == player_question_answer ? 1 : nil) }, class: 'answer-distribution' do %>
        <%= tag.div v, class: 'percentage' %>
        <%= tag.div t('of_people_worldwide_think_just_lik_you'), class: 'explanation' if k == player_question_answer %>
      <% end %>
    <% end %>
    </div>
  </div>

  <div class="animation-element">
    <div class="question-result">
      <%= @question_answer.last.body.html_safe %>
    </div>
  </div>
  
  <div class="animation-element">
  <% if question == questions.last %>
    <%= button_to tag.span(t('see_results')), 
                  url_for(controller: 'questions', action: 'score'), 
                  class: 'button__base' %>
  <%# link_to t('see_results'), url_for(controller: 'questions', action: 'result')  %>
  <% else %>
    <%= link_to tag.span(t('next_question')), 
                url_for(controller: 'questions', action: 'show', id: question_index.next), 
                class: 'button__base'  %>
  <% end %>
  </div>

</div>