/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

:root {
    --font-family: system-ui, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif;
    --font-size: 14px;
    --code-font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --black-color: #333333;
    --gray-color: #CCCCCC;
    --red-color: #BE2043;
    --purple-color: #832778;
    --blue-color: #0033cc;
}

body {
    margin: 0;
    padding: 0;
    border: 0;
    background-color: white;
}

/* Main content holder. */
div.book {
    max-width: 1320px;
    min-width: 320px;
    margin: 0 auto;
    font-family: var(--font-family);
    padding: 1rem;
    background-color: white;
}

div.toc > dl, div.list-of-tables > dl {
    border: 2px solid var(--gray-color);
    padding: 1rem;
}

a {
    color: var(--blue-color);
    text-decoration: none;
}

h1, h2, h3, h4, div.toc {
    color: var(--red-color);
}

div.legalnotice {
    max-width: 450px;
}

pre {
    overflow: scroll;
}

pre i {
    font-style: normal;
}

pre.programlisting, pre.screen, pre.literallayout {
    border: 1px solid #BBBBBB;
    background-color: #EEE;
    font-family: var(--code-font-family);
    white-space: pre;
    padding: 0 1rem;
}

/*
 * Java syntax highlighting with eclipse default colors
 * and default font-style
 */
pre.programlisting .hl-keyword {
    color: var(--purple-color);
    font-weight: bold;
}

/* Seems to be broken, override red inline style of hl-string */
pre.programlisting .hl-string, pre.programlisting b.hl-string i[style] {
    color: #2A00FF !important;
}

pre.programlisting .hl-tag {
    color: #3F7F7F;
}

pre.programlisting .hl-comment {
    color: #3F5F5F;
    /* font-style: italic; */
}

pre.programlisting .hl-multiline-comment {
    color: #3F5FBF;
    /* font-style: italic; */
}

pre.programlisting .hl-value {
    color: #2A00FF;
}

pre.programlisting .hl-attribute {
    color: var(--purple-color);
}

table {
    width: 100%;
    border: 1px solid #A0A0A0;
    border-spacing: 0;
    caption-side: bottom;
    border-collapse: collapse;
}

table thead {
    border-color: inherit;
    border-style: solid;
    border-width: 0;
}

table tr {
    border-color: inherit;
    border-style: solid;
    border-width: 0;
}

table th {
    border-color: #A0A0A0;
    border-style: solid;
    border-width: 0;
    border-left-width: 1px;
    border-bottom-width: 1px;
    text-align: inherit;
    background-color: #ededee;
    padding: 0.1rem 0.5rem;
    font-weight: bold;
}

table tbody {
    border-color: inherit;
    border-style: solid;
    border-width: 0;
}

table td {
    border-color: #A0A0A0;
    border-style: dotted;
    border-width: 0;
    border-left-width: 1px;
    border-bottom-width: 1px;
    vertical-align: top;
    padding: 0.3em;
}

div.mediaobject img {
    width: 100%;
    height: 100%;
}

h2.subtitle img {
    width: min(650px, 100%);
}
