<table style="font-family:Verdana,sans-serif; font-size:11px; color:#374953; width: 700px;">
  <tbody>
    <tr>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td align="left">Witaj, masz nowe zamówienie złożone przez
        <strong style="color:#0cd4d2;"><%= @order.full_name %></strong>.</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td style="background-color:#0cd4d2; color:#FFF; font-size: 12px; font-weight:bold; padding: 0.5em 1em;" align="left">Szczegóły zamówienia</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td align="left">
        Zamówienie:
        <strong>
          <span style="color:#0cd4d2;"><%= @order.beauty_id %></span>
          z dnia <%= @order.date_checkout %></strong>
        <br>Metoda płatności: <strong><%= @order.payment_method.name %></strong>
      </td>
    </tr>
    <tr>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td align="left">
        <table style="width:100%; font-family:Verdana,sans-serif; font-size:11px; color:#374953;">
          <tbody>
            <tr style="background-color:#f7f7f7; text-align:center;">
              <th>Produkt</th>
              <th style="width:15%; padding: 0.6em 0;">Cena jednostkowa</th>
              <th style="width:15%; padding: 0.6em 0;">Ilość</th>
              <th style="width:20%; padding: 0.6em 0;">Suma</th>
            </tr>
            <% @order.order_products.each do |op| %>
            <tr>
              <td style="padding:0.6em 0.4em;">
                <strong><%= op.product.name %></strong>
              </td>
              <td style="padding:0.6em 0.4em; text-align:right;">PLN <%= format('%.2f', op.price) %></td>
              <td style="padding:0.6em 0.4em; text-align:center;"><%= op.quantity %></td>
              <td style="padding:0.6em 0.4em; text-align:right;">PLN <%= format('%.2f', op.multiple_price) %></td>
            </tr>
            <% end %>
            <tr style="text-align:right;">
              <td></td>
              <td colspan="2" style="background-color:#f7f7f7; padding:0.6em 0.4em;">Towar</td>
              <td style="background-color:#f7f7f7; padding:0.6em 0.4em;">PLN <%= format('%.2f', @order.order_value) %></td>
            </tr>
            <tr style="text-align:right;">
              <td></td>
              <td colspan="2" style="background-color:#DDE2E6; padding:0.6em 0.4em;">Wysyłka</td>
              <td style="background-color:#DDE2E6; padding:0.6em 0.4em;">PLN <%= format('%.2f', @order.shipping.price) %></td>
            </tr>
            <tr style="text-align:right; font-weight:bold;">
              <td></td>
              <td colspan="2" style="background-color:#f7f7f7; padding:0.6em 0.4em;">Razem do zapłaty</td>
              <td style="background-color:#f7f7f7; padding:0.6em 0.4em;">PLN <%= format('%.2f', @order.order_summary) %></td>
            </tr>
          </tbody>
        </table>
      </td>
    </tr>
    <tr>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>
        <table style="width:100%; font-family:Verdana,sans-serif; font-size:11px; color:#374953;">
          <tbody>
            <tr style="background-color:#B9BABE; text-transform:uppercase;">
              <th style="text-align:left; padding: 0.3em 1em;">Adres dostawy</th>
            </tr>
            <tr>
              <td style="padding:0.5em 0 0.5em 0.5em; background-color:#EBECEE;">
                <span style="color:#0cd4d2; font-weight:bold;"><%= @order.full_name %></span><br>
                <span style="color:#0cd4d2; font-weight:bold;"><%= @order.email %></span><br>
                <%= raw @order.address.gsub(/(\r\n|\n\r|\r|\n)/, '<br \>') %>
              </td>
            </tr>
          </tbody>
        </table>
      </td>
    </tr>
    <% unless @order.message_from_client.blank? %>
    <tr>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td style="background-color:#0cd4d2; color:#FFF; font-size: 12px; font-weight:bold; padding: 0.5em 1em;" align="left">Wiadomość od klienta</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td align="left">
        <strong><%= raw @order.message_from_client.gsub(/(\r\n|\n\r|\r|\n)/, '<br \>') %></strong>
      </td>
    </tr>
    <% end %>
  </tbody>
</table>
