<div class="grid gap-6 m:grid-cols-2">
  <div class="grid gap-6">
    <% account.bg_color_hex = user_colors(account)[:bg] if account.bg_color_hex.blank? %>
    <% account.text_color_hex = user_colors(account)[:text] if account.text_color_hex.blank? %>
    <div class="crayons-field">
      <%= f.label :bg_color_hex, "Brand color 1", class: "crayons-field__label" %>
      <p class="crayons-field__description">Used for backgrounds, borders etc.</p>
      <div class="flex items-center">
        <%= f.text_field :bg_color_hex, placeholder: "#000000", class: "crayons-textfield mr-2", id: "bg-color-textfield" %>
        <input id="bg-color-colorfield" type="color" class="crayons-color-selector">
      </div>
    </div>

    <div class="crayons-field">
      <% account.bg_color_hex = user_colors(account)[:text] if account.text_color_hex.blank? %>
      <%= f.label :text_color_hex, "Brand color 2", class: "crayons-field__label" %>
      <p class="crayons-field__description">Used for texts (usually put on <em>Brand color 1</em>).</p>
      <div class="flex items-center">
          <%= f.text_field :text_color_hex, placeholder: "#ffffff", class: "crayons-textfield mr-2", id: "text-color-textfield" %>
          <input id="text-color-colorfield" type="color" class="crayons-color-selector">
      </div>
    </div>
  </div>

  <div class="crayons-card crayons-card--secondary flex-1 p-6">
    <p class="text-uppercase color-base-50 mb-4 fs-s ff-accent">Preview:</p>
    <svg id="color-select-preview-logo" class="p-4 radius-default" xmlns="http://www.w3.org/2000/svg" version="1" width="128" viewBox="0 0 132.000000 65.000000" role="img">
      <title id="aldzs1ucwkayuyoa6rxtxo2ikd8bpr0q">App logo</title>
      <path d="M0 33v32h11.3c12.5 0 17.7-1.6 21.5-6.5 3.8-4.8 4.4-9 4-28-.3-16.8-.5-18.2-2.7-21.8C30.3 2.5 26.1 1 12 1H0v32zm23.1-19.1c2.3 1.9 2.4 2.3 2.4 18.5 0 15.7-.1 16.7-2.2 18.8-1.7 1.6-3.5 2.2-7 2.2l-4.8.1-.3-20.8L11 12h4.9c3.3 0 5.6.6 7.2 1.9zM46.1 3.6c-2 2.6-2.1 3.9-2.1 29.6v26.9l2.5 2.4c2.3 2.4 2.9 2.5 16 2.5H76V54.1l-10.2-.3-10.3-.3v-15l6.3-.3 6.2-.3V27H55V12h21V1H62.1c-13.9 0-14 0-16 2.6zM87 15.2c2.1 7.9 5.5 20.8 7.6 28.8 3.2 12.3 4.3 15 7 17.7 1.9 2 4.2 3.3 5.7 3.3 3.1 0 7.1-3.1 8.5-6.7 1-2.6 15.2-55.6 15.2-56.8 0-.3-2.8-.5-6.2-.3l-6.3.3-5.6 21.5c-3.5 13.6-5.8 20.8-6.2 19.5C105.9 40 96 1.9 96 1.4c0-.2-2.9-.4-6.4-.4h-6.4L87 15.2z">
      </path>
    </svg>
  </div>
</div>
