<%- content_for :title, node_title(@node) %>

<div class="results-header">
  <h1><%= result_headline(current_player) %></h1>
</div>
<div class="results-tagline">
  <div>
    <div><%= result_description(current_player) %></div>
  </div>
  <%= svg "ico-wave" %>
</div>


<div class="impact food-waste">
  <div class="icon"><%= svg "ico-last-save" %></div>
  <h3><%= impact_label(:food_waste) %></h3>
  <p><%= impact_message(current_player, :food_waste) %></p>

  <details class="impact-learn-more">
    <summary>
      <h4><%= t("game.results.what_many_dont_know") %></h4>
      <span class="details-icon"></span>
    </summary>
    <% impact_learn_more(:food_waste).each do |paragraph| %>
      <p><%= paragraph %></p>
    <% end %>
  </details>
</div>

<div class="impact emissions">
  <div class="icon"><%= svg "ico-fuel" %></div>
  <h3><%= impact_label(:emissions) %></h3>
  <p><%= impact_message(current_player, :emissions) %></p>

  <details class="impact-learn-more">
    <summary>
      <h4><%= t("game.results.what_many_dont_know") %></h4>
      <span class="details-icon"></span>
    </summary>
    <% impact_learn_more(:emissions).each do |paragraph| %>
      <p><%= paragraph %></p>
    <% end %>
  </details>
</div>

<div class="impact income">
  <div class="icon"><%= svg "ico-coins" %></div>
  <h3><%= impact_label(:income) %></h3>
  <p><%= impact_message(current_player, :income) %></p>

  <details class="impact-learn-more">
    <summary>
      <h4><%= t("game.results.what_many_dont_know") %></h4>
      <span class="details-icon"></span>
    </summary>
    <% impact_learn_more(:income).each do |paragraph| %>
      <p><%= paragraph %></p>
    <% end %>
  </details>
</div>

<div class="like-container">

  <%= tag.h3 t("game.did_you_like_this_game") %>

  <div>
    <button class="thumbs-up"><%= svg "ico-thumb" %></button>
    <button class="thumbs-down"><%= svg "ico-thumb" %></button>
  </div>

</div>

<div class="newsletter-container">
  <%= tag.h3 t("game.join_our_newsletter") %>
  <%= tag.p t("game.join_our_newsletter_desc") %>

  <%= link_to "#" do %>
    <%= tag.span svg("ico-arrow-right") %>
    <%= tag.span t("game.sounds_good") %>
  <% end %>
</div>

<div class="share-container" data-controller="share" data-share-url-value="<%= root_url %>">
  <button type="button" class="cta" data-action="share#share"><%= tag.span t("game.share") %></button>
</div>

<%= button_to tag.span(t("game.save_another_tomato")), start_path, class: "cta" %>

