
<style>
  /* Custom Color Theme */
  /**********************/
  {% if custom_color_theme %}

    /* Light Theme */
    {% if custom_color_theme.light %}
      @media (prefers-color-scheme: light)
      {
        body {
          {% if custom_color_theme.light.color %}
            color: {{ custom_color_theme.light.color }};
          {% endif %}
          {% if custom_color_theme.light.background %}
            background-color: {{ custom_color_theme.light.background }};
          {% endif %}
        }
        .dump-toolbar {
          {% if custom_color_theme.light.toolbar_color %}
            color: {{ custom_color_theme.light.toolbar_color }};
          {% else %}
            color: #827b66;
          {% endif %}
          {% if custom_color_theme.light.toolbar_background %}
            background-color: {{ custom_color_theme.light.toolbar_background }};
          {% else %}
            background-color: #fcf0cf;
          {% endif %}
          {% if custom_color_theme.light.border %}
            border-color: {{ custom_color_theme.light.border }};
          {% else %}
            border-color: #d0c095;
          {% endif %}
        }
        {# On hover, swap text and background colors #}
        .dump-toolbar .button:hover,
        .dump-toolbar .button:focus,
        .dump-toolbar .button:active,
        .dump-toolbar .dropdown-button:hover,
        .dump-toolbar .dropdown-button:focus,
        .dump-toolbar .dropdown-button:active {
          {% if custom_color_theme.light.toolbar_background %}
            color: {{ custom_color_theme.light.toolbar_background }};
          {% else %}
            color: #fcf0cf;
          {% endif %}
          {% if custom_color_theme.light.toolbar_color %}
            background-color: {{ custom_color_theme.light.toolbar_color }};
          {% else %}
            background-color: #827b66;
          {% endif %}
        }
        .dd-wrapper {
          {% if custom_color_theme.light.border %}
            color: {{ custom_color_theme.light.border }};
          {% else %}
            color: #d0c095;
          {% endif %}
        }
        hr {
          {% if custom_color_theme.light.border %}
            color: {{ custom_color_theme.light.border }};
          {% else %}
            color: #d0c095;
          {% endif %}
        }
      }
    {% endif %}

    /* Dark Theme */
    {% if custom_color_theme.dark %}
      @media (prefers-color-scheme: dark)
      {
        body {
          {% if custom_color_theme.dark.color %}
            color: {{ custom_color_theme.dark.color }};
          {% endif %}
          {% if custom_color_theme.dark.background %}
            background-color: {{ custom_color_theme.dark.background }};
          {% endif %}
        }
        .dump-toolbar {
          {% if custom_color_theme.dark.toolbar_color %}
            color: {{ custom_color_theme.dark.toolbar_color }};
          {% else %}
            color: #839496;
          {% endif %}
          {% if custom_color_theme.dark.toolbar_background %}
            background-color: {{ custom_color_theme.dark.toolbar_background }};
          {% else %}
            background-color: #001f29;
          {% endif %}
          {% if custom_color_theme.dark.border %}
            border-color: {{ custom_color_theme.dark.border }};
          {% else %}
            border-color: #043b49;
          {% endif %}
        }
        {# On hover, swap text and background colors #}
        .dump-toolbar .button:hover,
        .dump-toolbar .button:focus,
        .dump-toolbar .button:active,
        .dump-toolbar .dropdown-button:hover,
        .dump-toolbar .dropdown-button:focus,
        .dump-toolbar .dropdown-button:active {
          {% if custom_color_theme.dark.toolbar_background %}
            color: {{ custom_color_theme.dark.toolbar_background }};
          {% else %}
            color: #001f29;
          {% endif %}
          {% if custom_color_theme.dark.toolbar_color %}
            background-color: {{ custom_color_theme.dark.toolbar_color }};
          {% else %}
            background-color: #839496;
          {% endif %}
        }
        .dd-wrapper {
          {% if custom_color_theme.dark.border %}
            color: {{ custom_color_theme.dark.border }};
          {% else %}
            color: #054757;
          {% endif %}
        }
        hr {
          {% if custom_color_theme.dark.border %}
            color: {{ custom_color_theme.dark.border }};
          {% else %}
            color: #054757;
          {% endif %}
        }
      }
    {% endif %}

    /* Meta section */
    {% if custom_color_theme.meta %}
      {% if custom_color_theme.meta.arrow %}
        .arrow {
          color: {{ custom_color_theme.meta.arrow }};
        }
      {% endif %}
      {% if custom_color_theme.meta.access_modifier %}
        .access-modifier {
            color: {{ custom_color_theme.meta.access_modifier }};
        }
      {% endif %}
      {% if custom_color_theme.meta.access_modifier %}
        .braces {
            color: {{ custom_color_theme.meta.braces }};
        }
      {% endif %}
      {% if custom_color_theme.meta.empty %}
        .empty {
            color: {{ custom_color_theme.meta.empty }};
        }
      {% endif %}
      {% if custom_color_theme.meta.location %}
        .location {
          color: {{ custom_color_theme.meta.location }};
        }
      {% endif %}
      {% if custom_color_theme.meta.type %}
        .type {
            color: {{ custom_color_theme.meta.type }};
        }
      {% endif %}
      {% if custom_color_theme.meta.unique %}
        .unique {
            color: {{ custom_color_theme.meta.unique }};
        }
      {% endif %}
    {% endif %}

    /* Identifier section */
    {% if custom_color_theme.identifiers %}
      {% if custom_color_theme.identifiers.section_name %}
      .section_name {
        color: {{ custom_color_theme.identifiers.section_name }};
      }
      {% endif %}
      {% if custom_color_theme.identifiers.attribute %}
        .attribute {
            color: {{ custom_color_theme.identifiers.attribute }};
        }
      {% endif %}
      {% if custom_color_theme.identifiers.constant %}
        .constant {
            color: {{ custom_color_theme.identifiers.constant }};
        }
      {% endif %}
      {% if custom_color_theme.identifiers.constant %}
        .dumped_name {
            color: {{ custom_color_theme.identifiers.dumped_name }};
        }
      {% endif %}
      {% if custom_color_theme.identifiers.function %}
        .function {
            color: {{ custom_color_theme.identifiers.function }};
        }
      {% endif %}
      {% if custom_color_theme.identifiers.index %}
        .index {
            color: {{ custom_color_theme.identifiers.index }};
        }
      {% endif %}
      {% if custom_color_theme.identifiers.key %}
        .key {
            color: {{ custom_color_theme.identifiers.key }};
        }
      {% endif %}
      {% if custom_color_theme.identifiers.params %}
        .params {
            color: {{ custom_color_theme.identifiers.params }};
        }
      {% endif %}
    {% endif %}

    /* Types section */
    {% if custom_color_theme.types %}
      {% if custom_color_theme.types.bool %}
        .bool {
            color: {{ custom_color_theme.types.bool }};
        }
      {% endif %}
      {% if custom_color_theme.types.bound %}
        .bound {
            color: {{ custom_color_theme.types.bound }};
        }
      {% endif %}
      {% if custom_color_theme.types.intermediate %}
        .intermediate {
          color: {{ custom_color_theme.types.intermediate }};
        }
      {% endif %}
      {% if custom_color_theme.types.empty %}
        .default {
          color: {{ custom_color_theme.types.default }};
        }
      {% endif %}
      {% if custom_color_theme.types.docs %}
        .docs {
          color: {{ custom_color_theme.types.docs }};
        }
      {% endif %}
      {% if custom_color_theme.types.module %}
        .module {
            color: {{ custom_color_theme.types.module }};
        }
      {% endif %}
      {% if custom_color_theme.types.none %}
        .none {
          color: {{ custom_color_theme.types.none }};
        }
      {% endif %}
      {% if custom_color_theme.types.number %}
        .number {
          color: {{ custom_color_theme.types.number }};
        }
      {% endif %}
      {% if custom_color_theme.types.string %}
        .string {
            color: {{ custom_color_theme.types.string }};
        }
      {% endif %}
    {% endif %}
  {% endif %}

  /* Forcing color themes */
  /************************/
  /* Forcing Light */
  {% if force_light_theme %}
    body {
      {% if custom_color_theme.light.color %}
        color: {{ custom_color_theme.light.color }};
      {% else %}
        color: #827b66;
      {% endif %}
      {% if custom_color_theme.light.background %}
        background-color: {{ custom_color_theme.light.background }};
      {% else %}
        background-color: #fdf6e3;
      {% endif %}
    }
    .dump-toolbar {
      {% if custom_color_theme.light.toolbar_color %}
        color: {{ custom_color_theme.light.toolbar_color }};
      {% else %}
        color: #827b66;
      {% endif %}
      {% if custom_color_theme.light.toolbar_background %}
        background-color: {{ custom_color_theme.light.toolbar_background }};
      {% else %}
        background-color: #fcf0cf;
      {% endif %}
      {% if custom_color_theme.light.border %}
        border-color: {{ custom_color_theme.light.border }};
      {% else %}
        border-color: #d0c095;
      {% endif %}
    }
    {# On hover, swap text and background colors #}
    .dump-toolbar .button:hover,
    .dump-toolbar .button:focus,
    .dump-toolbar .button:active,
    .dump-toolbar .dropdown-button:hover,
    .dump-toolbar .dropdown-button:focus,
    .dump-toolbar .dropdown-button:active {
      {% if custom_color_theme.light.toolbar_background %}
        color: {{ custom_color_theme.light.toolbar_background }};
      {% else %}
        color: #fcf0cf;
      {% endif %}
      {% if custom_color_theme.light.toolbar_color %}
        background-color: {{ custom_color_theme.light.toolbar_color }};
      {% else %}
        background-color: #827b66;
      {% endif %}
    }
    .dd-wrapper {
      {% if custom_color_theme.light.border %}
        color: {{ custom_color_theme.light.border }};
      {% else %}
        color: #d0c095;
      {% endif %}
    }
    hr {
      {% if custom_color_theme.light.border %}
        color: {{ custom_color_theme.light.border }};
      {% else %}
        color: #d0c095;
      {% endif %}
    }
    .arrow {
      {% if custom_color_theme.meta.arrow %}
        color: {{ custom_color_theme.meta.arrow  }}
      {% else %}
        color: #657b83;
      {% endif %}
    }
    .access-modifier {
      {% if custom_color_theme.meta.access_modifier %}
        color: {{ custom_color_theme.meta.access_modifier }}
      {% else %}
        color: #657b83;
      {% endif %}
    }
    .braces {
      {% if custom_color_theme.meta.braces %}
        color: {{ custom_color_theme.meta.braces }}
      {% else %}
        color: #657b83;
      {% endif %}
    }
    .location {
      {% if custom_color_theme.meta.location %}
        color: {{ custom_color_theme.meta.location }}
      {% else %}
        color: #93a1a1;
      {% endif %}
    }
    .attribute {
      {% if custom_color_theme.identifiers.attribute %}
        color: {{ custom_color_theme.identifiers.attribute }}
      {% else %}
        color: #586e75;
      {% endif %}
    }
    .dumped_name {
      {% if custom_color_theme.identifiers.dumped_name %}
        color: {{ custom_color_theme.identifiers.dumped_name }}
      {% else %}
        color: #586e75;
      {% endif %}
    }
    .docs {
      {% if custom_color_theme.types.docs %}
        color: {{ custom_color_theme.types.docs }}
      {% else %}
        color: #93a1a1;
      {% endif %}
    }
    .params {
      {% if custom_color_theme.type.params %}
        color: {{ custom_color_theme.type.params }}
      {% else %}
        color: #586e75;
      {% endif %}
    }
  {% endif %}

  /* Forcing Dark */
  {% if force_dark_theme %}
    body {
      {% if custom_color_theme.dark.color %}
        color: {{ custom_color_theme.dark.color }};
      {% else %}
        color: #839496;
      {% endif %}
      {% if custom_color_theme.dark.background %}
        background-color: {{ custom_color_theme.dark.background }};
      {% else %}
        background-color: #002b36;
      {% endif %}
    }
    .dump-toolbar {
      {% if custom_color_theme.dark.toolbar_color %}
        color: {{ custom_color_theme.dark.toolbar_color }};
      {% else %}
        color: #839496;
      {% endif %}
      {% if custom_color_theme.dark.toolbar_background %}
        background-color: {{ custom_color_theme.dark.toolbar_background }};
      {% else %}
        background-color: #001f29;
      {% endif %}
      {% if custom_color_theme.dark.border %}
        border-color: {{ custom_color_theme.dark.border }};
      {% else %}
        border-color: #043b49;
      {% endif %}
    }
    {# On hover, swap text and background colors #}
    .dump-toolbar .button:hover,
    .dump-toolbar .button:focus,
    .dump-toolbar .button:active,
    .dump-toolbar .dropdown-button:hover,
    .dump-toolbar .dropdown-button:focus,
    .dump-toolbar .dropdown-button:active {
      {% if custom_color_theme.dark.toolbar_background %}
        color: {{ custom_color_theme.dark.toolbar_background }};
      {% else %}
        color: #001f29;
      {% endif %}
      {% if custom_color_theme.dark.toolbar_color %}
        background-color: {{ custom_color_theme.dark.toolbar_color }};
      {% else %}
        background-color: #839496;
      {% endif %}
    }
    .dd-wrapper {
      {% if custom_color_theme.dark.border %}
        color: {{ custom_color_theme.dark.border }};
      {% else %}
        color: #054757;
      {% endif %}
    }
    hr {
      {% if custom_color_theme.dark.border %}
        color: {{ custom_color_theme.dark.border }};
      {% else %}
        color: #054757;
      {% endif %}
    }
    .arrow {
      {% if custom_color_theme.meta.arrow %}
        color: {{ custom_color_theme.meta.arrow  }}
      {% else %}
        color: #839496;
      {% endif %}
    }
    .access-modifier {
      {% if custom_color_theme.meta.access_modifier %}
        color: {{ custom_color_theme.meta.access_modifier }}
      {% else %}
        color: #839496;
      {% endif %}
    }
    .braces {
      {% if custom_color_theme.meta.braces %}
        color: {{ custom_color_theme.meta.braces }}
      {% else %}
        color: #839496;
      {% endif %}
    }
    .location {
      {% if custom_color_theme.meta.location %}
        color: {{ custom_color_theme.meta.location }}
      {% else %}
        color: #586e75;
      {% endif %}
    }
    .attribute {
      {% if custom_color_theme.identifiers.attribute %}
        color: {{ custom_color_theme.identifiers.attribute }}
      {% else %}
        color: #93a1a1;
      {% endif %}
    }
    .dumped_name {
      {% if custom_color_theme.identifiers.dumped_name %}
        color: {{ custom_color_theme.identifiers.dumped_name }}
      {% else %}
        color: #93a1a1;
      {% endif %}
    }
    .docs {
      {% if custom_color_theme.types.docs %}
        color: {{ custom_color_theme.types.docs }}
      {% else %}
        color: #586e75;
      {% endif %}
    }
    .params {
      {% if custom_color_theme.type.params %}
        color: {{ custom_color_theme.type.params }}
      {% else %}
        color: #93a1a1;
      {% endif %}
    }
  {% endif %}

</style>
