/*
 * Copyright (c) 2017, 2026, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.  Oracle designates this
 * particular file as subject to the "Classpath" exception as provided
 * by Oracle in the LICENSE file that accompanied this code.
 *
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit www.oracle.com if you need additional information or have any
 * questions.
 */

@import url('../api/resource-files/fonts/dejavu.css');

/* Light theme and global variables */
:root {
    color-scheme: light;
    --body-font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Luxi Sans', Verdana, Arial, Helvetica;
    --code-font-family: 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Luxi Mono', 'Courier New';
    --body-font-size: 10pt;
    --nav-font-size: 13.4px;
    --max-content-width: 1500px;
    --body-text-color: #181818;
    --body-background-color: #ffffff;
    --navbar-background-color: #4D7A97;
    --navbar-text-color: #ffffff;
    --even-row-color: #f0f0f2;
    --odd-row-color: #fdfdfe;
    --link-color: #437291;
    --link-color-active: #bb7a2a;
    --link-color-visited: #77629E;
    --table-border-color: #000000;
    --table-header-background-color: #DDF;
    --button-border-color: #b0b8c8;
    --button-hover-color: #e9ecf0;
    --settings-background-color: #f8f8f8;
    --settings-border-color: #e6e6e6;
    --underline-thickness: 0.08em;
    --icon-filter: none;
    --current-theme-svg: url('data:image/svg+xml; utf8, \
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" >\
    <g fill="none" stroke="%23fff" stroke-linecap="round">\
    <circle cx="49.932" cy="50.193" r="24.947" stroke-width="7.6"/>\
    <path d="m50.882 5.5255v10.822" stroke-width="7.533"/>\
    <path d="m24.315 74.134-7.6524 7.6524" stroke-width="7.533"/>\
    <path d="m75.461 73.989 7.6524 7.6524" stroke-width="7.533"/>\
    <path d="m18.223 16.442c7.6524 7.6524 7.6524 7.6524 7.6524 7.6524" stroke-width="7.533"/>\
    <path d="m83.27 19.68-7.6524 7.6524" stroke-width="7.533"/><path d="m50.014 84.417v10.822" stroke-width="7.533"/>\
    <path d="m95.53 49.53h-10.822" stroke-width="7.533"/><path d="m15.446 49.162h-10.822" stroke-width="7.533"/></g></svg>');
    --x-svg: url('data:image/svg+xml; utf8, \
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">\
    <path d="m8 8 84 84" style="stroke:%23505050;stroke-width:15"/>\
    <path d="M8 92 92 8" style="stroke:%23505050;stroke-width:15"/></svg>');
}
/* Dark theme variables */
:root[data-theme="theme-dark"] {
    color-scheme: dark;
    --body-text-color: #e8e8e8;
    --body-background-color: #202226;
    --navbar-background-color: #406074;
    --navbar-text-color: #ffffff;
    --even-row-color: #34383D;
    --odd-row-color: #222528;
    --link-color: #94badb;
    --link-color-active: #e8a351;
    --link-color-visited: #A5A3C5;
    --table-border-color: #919191;
    --table-header-background-color: #4D4D6C;
    --button-border-color: #909090;
    --button-hover-color: #3f4146;
    --settings-background-color: #2f3439;
    --settings-border-color: #595959;
    --icon-filter: invert(91%) brightness(160%);
    --underline-thickness: 0.05em;
    /* Inline SVG icons for dark theme */
    --current-theme-svg: url('data:image/svg+xml; utf8, \
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">\
    <g fill="none" stroke="%23fff" stroke-linecap="round"><path d="m34.834 \
    21.49a29.94 29.94 0 0 1 33.103 12.994 29.94 29.94 0 0 1-2.6651 35.462 \
    29.94 29.94 0 0 1-34.674 7.9004" stroke-width="7.6"/><path d="m35.411 \
    22.187a42.812 42.812 0 0 1-4.6466 55.023" stroke-width="7.6892"/></g></svg>');
    --x-svg: url('data:image/svg+xml; utf8, \
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">\
    <path d="m8 8 84 84" style="stroke:%23e0e0e0;stroke-width:15"/>\
    <path d="M8 92 92 8" style="stroke:%23e0e0e0;stroke-width:15"/></svg>');
    main a[href] {
        text-decoration: underline var(--underline-thickness);
        text-underline-offset: 0.14em;
    }
}

@supports (-webkit-hyphens:none) {
    :root {
        --underline-thickness: 0.05em;
    }
    :root[data-theme="theme-dark"] {
        --underline-thickness: 0.03em;
    }
}
:root[data-underline-links="on"] {
    main a[href] {
        text-decoration: underline var(--underline-thickness);
        text-underline-offset: 0.14em;
    }
}
:root[data-underline-links="off"] {
    main a[href] {
        text-decoration: none;
    }
}

[id] {
  scroll-margin-top: 0.9em;
}

code[id], span[id] {
    scroll-margin-top: 0.3em;
}

body {
  background-color:var(--body-background-color);
  color:var(--body-text-color);
  font-family: var(--body-font-family), sans-serif;
  font-size:var(--body-font-size);
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  min-width: 100%;
  line-height: 1.4;
}

pre, code, tt {
    font-family: var(--code-font-family), monospace;
}

main, footer {
  margin-block: 16px;
}

/* Adjust horizontal margin and padding for child elements of body element */
main, footer, body > nav, header > p, header h1, header#title-block-header div.nav-content {
  max-width: var(--max-content-width);
  margin-inline: auto;
  padding-inline: 27px;
}

blockquote {
  margin: 1.5ex 0 1.5ex 2em;
}

p {
  margin-top: 1ex;
  margin-bottom: 1ex;
}

dd > p:first-child, pre:first-child {
  margin-top: 0;
}

h1:first-child, h2:first-child {
  margin-top: 0;
}

h1, h2 {
  margin-top: 2ex;
  margin-bottom: 1ex;
}

h3, h4, h5 {
  margin-top: 1.5ex;
  margin-bottom: 1ex;
}

h4, h5 {
  font-size: 100%;
}

.subtitle {
    font-style: italic;
    font-weight: bold;
    margin-bottom: 1em;
}

h1.title + .subtitle {
    margin-top: -1em;
}

a { text-decoration: none }

a:link {
  color: var(--link-color);
}

a:visited {
  color: var(--link-color-visited);
}

a[href]:hover {
  color: var(--link-color-active);
}

a img {
  border-width: 0;
}

img {
  filter: var(--icon-filter);
}

table {
  border-collapse: collapse;
  margin: 8px 15px;
}

th, td {
  padding: 3px;
  vertical-align: top;
}

table, th, td {
  border: 1px solid var(--table-border-color);
}

caption  {
  text-align: left;
  font-style: italic;
  text-indent: 15px;
  margin-bottom:10px;
}

tr:nth-child(even), tr:nth-child(even) th[scope=row] {
  background: var(--even-row-color);
}

tr:nth-child(odd), tr:nth-child(odd) th[scope=row] {
  background: var(--odd-row-color);
}

th {
  background: var(--table-header-background-color);
}

table.centered {
  margin-left: auto;
  margin-right: auto;
}
table.centered td {
  text-align: left;
}
.centered {
  text-align: center;
}

.draft-header {
  text-align: center;
  font-size: 11.2px;
  padding: 6px;
  line-height: initial;
}

.legal-footer {
    font-style: italic;
    font-size: 80%;
}

nav#TOC {
  border: 1px solid gray;
  border-radius: 10px;
  padding: 5px 10px;
  margin-bottom: 15px;
  max-width: min(var(--max-content-width) - 27px, 100% - 77px);
}

nav#TOC ul ul {
    font-size:smaller;
}

nav#TOC ul ul li {
    display: inline-block
}

nav#TOC ul ul li::before {
    content: " \2022  "
}

/* Rules below replicate sizing of navigation bar in API docs */
header#title-block-header div.navbar {
    background-color: var(--navbar-background-color);
    color: var(--navbar-text-color);
}

header#title-block-header div.nav-content {
    padding: 0 20px 0 26px;
    margin-bottom: 30px;
    display: flex;
    flex-direction: row;
    align-items: center;
    height: 44px;
    overflow: auto hidden;
    font-size: 0.857em;
    line-height: initial;
}

header#title-block-header div.nav-content nav {
    flex: 1 1 auto;
    font-size: 12px;
    white-space: nowrap;
}

header#title-block-header div.nav-content > div {
    flex: 0 0 auto;
    font-size: 10.978px;
    white-space: nowrap;
}

header#title-block-header ul {
    display:inline-flex;
    align-items: center;
    padding: 0;
    margin: 0;
}
header#title-block-header ul li {
    list-style:none;
    float:left;
    padding: 5px 6px;
    text-transform:uppercase;
}

header#title-block-header li.no-link {
    background-color:#F8981D;
    color:#253441;
    margin: auto 5px;
}

header#title-block-header a:link, header#title-block-header a:active, header#title-block-header a:visited {
    color:#ffffff;
    text-decoration:none;
    text-transform:uppercase;
}
header#title-block-header a:hover {
    color:#bb7a2a;
}
/*
 * Styles for header/section anchor links
 */
a.anchor-link {
    opacity: 0;
    transition: opacity 0.1s 0.1s;
}
:hover > a.anchor-link {
    opacity: 90%;
}
a.anchor-link:hover,
a.anchor-link:focus-visible,
a.anchor-link.visible {
    opacity: 100%;
}
a.anchor-link > img {
    width: 0.8em;
    height: 0.8em;
}
/*
 * Styles for theme picker
 */
button#theme-button {
    position: relative;
    width: 32px;
    height: 32px;
    padding: 6px;
    margin-left: -6px;
    background: var(--current-theme-svg) no-repeat 6px;
    background-size: 18px 18px;
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
}
button#theme-button:hover,
button#theme-button:focus-visible {
    border: 1px solid var(--button-border-color);
}
div#theme-panel {
    display: none;
    position: fixed;
    z-index: 8;
    background-color: var(--settings-background-color);
    color: var(--body-text-color);
    font-size: var(--nav-font-size);
    padding: 4px;
    white-space: nowrap;
    border: 1px solid var(--settings-border-color);
    border-radius: 4px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
}
button#theme-panel-close-button {
    position: absolute;
    right: 4px;
    top: 4px;
    width: 24px;
    height: 24px;
    background: var(--x-svg) no-repeat 5.5px;
    background-size: 12px;
    border: 1px solid transparent;
    border-radius: 3px;
    cursor: pointer;
}
button#theme-panel-close-button:hover,
button#theme-panel-close-button:focus-visible {
    border: 1px solid var(--button-border-color);
    background-color: var(--button-hover-color);
}
div#theme-panel div.panel-heading {
    font-weight: bold;
    font-size: 16px;
}
div#theme-panel div {
    padding: 10px 8px;
}
div#theme-panel label {
    margin-right: 8px;
    cursor: pointer;
}
div#theme-panel input {
    margin-right: 4px;
}

