/* Main NIST Chemistry WebBook style sheet. */

/* Color settings.

Colors are set using css variables to implement a dark scheme for
users that prefer a dark background.
*/

:root {
    --fg-color: black;
    --alt-fg-color: #112E51;
    /* #112E51 = designsystem.digital.gov color-primary-darkest */
    --bg-color: white;
    --alt-bg-color: #F1F1F1;
    /* #F1F1F1 = designsystem.digital.gov color-gray-lightest */
    --alt-alt-bg-color: #D6D7D9;
    /* #D6D7D9 = designsystem.digital.gov color-gray-lighter */
    --link-color: #0071BC;
    /* #0071BC = designsystem.digital.gov color-primary */
    --active-link-color: #205493;
    /* #205493 = designsystem.digital.gov color-primary-darker */
    --visited-link-color: #4C2C92;
    /* #4C2C92 = designsystem.digital.gov color-visited */
    --message-bg-color: #DCE4EF;
    /* #DCE4EF = designsystem.digital.gov color-cool-blue-lightest */
    --warning-bg-color: #FFB6C1;
    /* #FFB6C1 = designsystem.digital.gov color-secondary-lightest */
}

/* Comment out for the time being. */
/* @media only screen and (prefers-color-scheme: dark) { */
/*    :root { */
        /* These are mostly derived by taking the HSL values for the
           normal colors and replacing them with values where H and S
           are unchanged, but L is equal to 100 minus the prior value.
       */
/*        --fg-color: white; */
/*        --alt-fg-color: #AECBEE; */
/*        --bg-color: black; */
/*        --alt-bg-color: #1F1F1F; */ /* Manually lighted, would have been 0E0E0E */
/*        --alt-alt-bg-color: #262729; */
/*        --link-color: #43B4FF; */
/*        --active-link-color: #6CA0DF; */
/*        --visited-link-color: #8D6DD3; */
/*        --message-bg-color: #101823; */
/*        --warning-bg-color: #49000B; */

        /* Alternate approach to color definition. */
/*        --primary-hue: 215; */  /* designsystem.digital.gov Blue warm */
/*        --accent-hue: 20; */    /* designsystem.digital.gov Orange warm */

/*        --fg-color: hsl(0, 0%, 80%); */
/*        --alt-fg-color: hsl(0, 0%, 60%); */
/*        --bg-color:  hsl(0, 0%, 5%); */
/*        --alt-bg-color:  hsl(0, 0%, 10%); */

/*        --active-link-color: hsl(var(--primary-hue), 50%, 72%); */
/*        --visited-link-color: hsl(var(--primary-hue), 70%, 72%); */

/*        --message-bg-color: hsl(var(--primary-hue), 50%, 24%); */
/*        --warning-bg-color: hsl(var(--accent-hue), 50%, 24%); */
/*    } */

    /* The following is from:
       https://medium.com/@mwichary/dark-theme-in-a-day-3518dde2955a
    */
/*    img { */
/*        filter: invert(100%) hue-rotate(180deg); */
/*        mix-blend-mode: screen; */
/*    } */
/*} */

/* Reset element wide settings from NIST gobal style. */
label {display: inline;}
p, pre {margin: 1em 0;}
table {border-collapse: inherit;}
ol li, ul li {margin-bottom: 0;}
ul ul, ul ol, ol ul, ol ol {margin: 0;}
label {font-weight: inherit;}

textarea,
select,
input[type="date"],
input[type="datetime"],
input[type="datetime-local"],
input[type="email"],
input[type="month"],
input[type="number"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="text"],
input[type="time"],
input[type="url"],
input[type="week"] {
    border: thin solid #112E51;
    /* #112E51 = designsystem.digital.gov color-primary-darkest */
    border: thin solid var(--alt-fg-color);
    padding: inherit;}

/* Show focus for checkboxes and radio buttons. */
input[type="file"]:focus, input[type="file"]:active,
input[type="radio"]:focus,
input[type="radio"]:active,
input[type="checkbox"]:focus,
input[type="checkbox"]:active {
   box-shadow: #0071BC 0 0 5px 0;
    /* #0071BC = designsystem.digital.gov color-primary */
  box-shadow: var(--link-color) 0 0 5px 0;
  z-index: 1;
}

/* Settings for SVG icons. */
svg.webbook_icon_big,
svg.webbook_icon,
svg.webbook_icon_text,
svg.webbook_icon_copy {display: inline-block;
                       margin: 0;
                       fill: currentColor;
                       vertical-align: middle;}

svg.webbook_icon_big {margin: 0 -.125em;
                      height: 1.25em;
                      width: 1.25em;}

svg.webbook_icon {height: 1em;
                  width: 1em}

svg.webbook_icon_text,
svg.webbook_icon_copy {height: 0.8em;
                       width: 0.8em;}

svg.webbook_icon_text {vertical-align: baseline;}

svg.webbook_icon_copy {vertical-align: top;}

/* General settings. */
html {background-color: white;
      background-color: var(--bg-color);}

body {background-color: white;
      background-color: var(--bg-color);
      color: black;
      color: var(--fg-color);
      margin:  0px;}

main {margin-left: 0.25in;
      margin-right: 0.25in;}

/* Reset some colors from the NIST template to support dark mode. */
h1, h2, h4, label {
    color: black;
    color: var(--fg-color);}

h3 {color: #112E51;
    /* #112E51 = designsystem.digital.gov color-primary-darkest */
    color: var(--alt-fg-color);}

/* Justified text may cause problems for some readers. Use the default. */
p.text {text-align: initial;}

/* These are now set by NIST-wide settings. */
/*
sup, sub {font-size: 70%;}
.small {font-size: smaller;}
*/

/* Link styles. */
a {text-decoration: none;}
a:link {
    color: #0071BC;
    /* #0071BC = designsystem.digital.gov color-primary */
    color: var(--link-color);}
a:active, a:hover {
    color: #205493;
    /* #205493 = designsystem.digital.gov color-primary-darker */
    color: var(--active-link-color);}
a:visited {
    color: #4C2C92;
    /* #4C2C92 = designsystem.digital.gov color-visited */
    color: var(--visited-link-color);}

img.no-border {border: 0pt;
               vertical-align: text-top;}

/* Styles for messages inserted into web pages. */
.message, .warning {border: thin solid black;
                    border: thin solid var(--fg-color);
                    margin-top: 1em;
                    margin-bottom: 1em;
                    padding-left: 1em;
                    padding-right: 1em;
                    border-radius: 1em;}
.message {
    background-color: #DCE4EF;
    /* #DCE4EF = designsystem.digital.gov color-cool-blue-lightest */
    background-color: var(--message-bg-color);}
.warning {
    background-color: #FFB6C1;
    /* #FFB6C1 = designsystem.digital.gov color-secondary-lightest */
    background-color: var(--warning-bg-color);}

div.message, div.warning {margin-left: 15%;
                          margin-right: 15%;}

/* Style for InChIs and InChIKeys. */
span.inchi-text {font-family: monospace;
                 overflow-wrap: anywhere;}

/* Styles for InChI Trust image. */
div.inchi-trust {margin-left: 1em;
                 min-width: 2.9em;}

img.inchi-trust {margin: 0pt;
                 width: 2.9em;}

/* Style for a very plain button. */
button.plain-button {background: none;
                     border: none;
                     padding: 0;
                     margin: 0;}

/* Styles used in div-based layout. */
div.row-flex {overflow: auto;
              display: flex;}

div.left-float {display: block;
                float: left;}

/* Style for show / hide div toggle. */
div-toggle {font-family: "Source Sans Pro", "Lucida Sans Unicode", sans-serif;}

/* General purpose styles. */
.nowrap {white-space: nowrap;}

.center {margin-left: auto;
         margin-right: auto;}

/*
  Settings for jQuery UI widgets. These have to be marked as
  "!important" since the jQuery UI style sheet may be loaded
  after this one.
*/
.ui-widget-header {
    color: black !important;
    color: var(--fg-color) !important;
    background-color: #F1F1F1 !important;
    /* #F1F1F1 = designsystem.digital.gov color-gray-lightest */
    background-color: var(--alt-bg-color) !important;
    border-color: white !important;
    border-color: var(--bg-color) !important;
}

div.ui-widget-content {
    background-color: white !important;
    background-color: var(--bg-color) !important;
    color: black !important;
    color: var(--fg-color) !important;}

.ui-widget-content .ui-state-default {
    background-color: #D6D7D9 !important;
    /* #D6D7D9 = designsystem.digital.gov color-gray-lighter */
    background-color: var(--alt-alt-bg-color) !important;
    border-color: black !important;
    border-color: var(--fg-color) !important;
    color: black !important;
    color: var(--fg-color) !important;}

.ui-widget-content .ui-state-default a {
    color: black !important;
    color: var(--fg-color) !important;}

.ui-widget-content .ui-state-active {
    background-color: #205493; !important;
    /* #205493 = designsystem.digital.gov color-primary-darker */
    background-color: var(--active-link-color) !important;
    border-color: #112E51 !important;
    /* #112E51 = designsystem.digital.gov color-primary-darkest */
    border-color: var(--alt-fg-color) !important;
    color: white !important;
    color: var(--bg-color) !important;}

.ui-widget-content .ui-state-active a {
    color: white !important;
    color: var(--bg-color) !important;}

/* Apply link settings to panels inside jQuery UI widgets. */
div.insert_panel a {text-decoration: none !important;}
div.insert_panel a:link {
    color: #0071BC !important;
    /* #0071BC = designsystem.digital.gov color-primary */
    color: var(--link-color) !important;}
div.insert_panel a:active, div.insert_panel a:hover {
    color: #205493 !important;
    /* #205493 = designsystem.digital.gov color-primary-darker */
    color: var(--active-link-color) !important;}
div.insert_panel a:visited {
    color: #4C2C92 !important;
    /* #4C2C92 = designsystem.digital.gov color-visited */
    color: var(--visited-link-color) !important;}

/* Settings for tab widget (horizontal tabs) */
div.jquery-ui-tabs div.ui-tabs-panel {
    padding-top: 0;
    padding-bottom: 0;}

/* Styles for field sets. These assume all controls are in label elements */

/* Only use this style for field sets inside div elements. */
div fieldset.vert-label-list {display: inline-block;}
div fieldset.vert-label-list label {display: block;}

/* Useful for a small number of controls. */
fieldset.horz-label-list label {white-space: nowrap;}
fieldset.horz-label-list label + label {margin-left: 1em;}

/* ===============================================
   Styles used only in documents (not data pages).
   ===============================================
*/
h1.title {text-align: center;}
p.subtitle {text-align: center;
            font-size: x-large;
            margin-top: 0;}

ol.bibliography {list-style-type: none; margin-left: 0pt;}
ol.bibliography li {margin-bottom: 1em;}

p.displaymath {margin-top: 1em; margin-bottom: 1em;
               margin-left: 2em;}

span.func {font-family: sans-serif;}

table.list {border: thin solid black;
            border: thin solid var(--fg-color);
            border-collapse: collapse;
            margin-bottom: 1ex;}
table.list th {border: thin solid black;
               border: thin solid var(--fg-color);
               background-color: #D6D7D9;
               /* #D6D7D9 = designsystem.digital.gov color-gray-lighter */
               background-color: var(--alt-alt-bg-color);}
table.list td {border: thin solid black;
               border: thin solid var(--fg-color);}

table.search_options td {vertical-align: top;}

ul.spaced li {margin-bottom: 0.8ex;}
ul.spaced li:last-child {margin-bottom: 0ex;}

/* =====================================
   End of styles only used in documents.
   =====================================
*/

/* =============================
   Styles not used in documents.
   =============================
*/
/* Common data tables. */
table.data {
  border: thin solid black;
  border: thin solid var(--fg-color);
  margin-bottom: 1ex;}
table.data th, table.data td {
  padding: 2px;
  border: thin solid black;
  border: thin solid var(--fg-color);}
table.data th {
    background-color: #FFB6C1;
    /* #FFB6C1 = designsystem.digital.gov color-secondary-lightest */
    background-color: var(--warning-bg-color);}


table.doc {border: medium solid black;
           border-collapse: collapse;
           margin-bottom: 1ex;}
table.doc th {background-color: #D6D7D9;
              /* #D6D7D9 = designsystem.digital.gov color-gray-lighter */
              background-color: var(--alt-alt-bg-color);
              text-align: center;}
table.doc th, table.doc td {border: medium solid black;
                            border: medium solid var(--fg-color);
                            padding-left: 0.5ex;
                            padding-right: 0.5ex;}

table.name_value td, table.name_value th {text-align: left;
                                          vertical-align: top;
                                          padding-bottom: 0.2em;}
table.name_value td:first-child, table.name_value th:first-child {
                                     padding-right: 0.2em;}

/* Puts a grid around and inside a table. */
table.thin_grid {border: thin solid black;
                 border: thin solid var(--fg-color);
                 border-collapse: collapse;}
table.thin_grid th, table.thin_grid td {
    border: thin solid #D6D7D9;
    /* #D6D7D9 = designsystem.digital.gov color-gray-lighter */
    border: thin solid var(--alt-alt-bg-color);}

/* Make all table cells left aligned. */
table.left_align th {text-align: left;}

table.left_right_align th, table.left_right_align td {text-align: right;}
table.left_right_align th:first-child, table.left_right_align td:first-child {
                                           text-align: left;}

table.horz_pad td {padding-left: 1.0em;}
table.horz_pad td:first-child {padding-left: 0.5em;}

/* Table for symbol definitions. */
table.symbol_table {margin-top: 1em;
                    margin-bottom: 1em;
                    margin-left: 1em;}

table.symbol_table td.symbol {padding-right: 1em;}


.mixture {vertical-align: middle;}
.mixture span.punct {font-size: 150%;}

hr.subdivide {width: 80%;
              margin-left: 0pt;
              margin-right: auto;}

img.struct {vertical-align: text-top;
            border: 0pt;}

p.section-head {font-size: smaller;
                margin-left: 2em;}

div.indented, p.indented {margin-left: 2em;
                          margin-right: 2em;}

td.left {text-align: left;}
td.right {text-align: right}
td.left-nowrap {text-align: left;
                white-space: nowrap;}
td.center-nowrap {text-align: center;
                  white-space: nowrap;}
td.right-nowrap {text-align: right;
                 white-space: nowrap;}

applet{border: thin solid black;
       border: thin solid var(--fg-color);}

/* ====================================
   End of styles not used in documents.
   ====================================
 */

/* Black NIST identifier bar. */
.webbook_header_bar {
  box-sizing: border-box;
  background-color: black;
  color: white;
  display: flex;
  flex-direction: row;
  position: relative;
  margin-bottom: 0px;}

.webbook_header_bar:after {
  content: "";
  display: table;
  clear: both;}

.webbook_header_bar * {
    box-sizing: inherit;}

.webbook_header_bar a,
.webbook_header_bar a:link,
.webbook_header_bar a:visited {
  color: white;
  text-decoration: none;}

.webbook_header_bar span.logo {
  margin: 29.825px; /* Matches margin on NIST web site. */
  float: left;
  font-size: 0;
  line-height: 0;}

.webbook_header_bar span.logo a {
  font-weight: normal;
  font-size: 20px;
  height: 44.75px;
  width: 320px;
  background-image: url('nist_logo.svg');
  background-repeat: no-repeat;
  background-size: 320px auto;
  text-indent: -9999px;
  overflow: hidden;
  display: inline-block;}

.webbook_header_bar h1 {
  display: inline;
  margin: auto 0px auto 0px;
  background-color: black;
  color: white;
  font-size: 24px;
  line-height: 40px;}


@media screen and (max-width: 700px) {
  .webbook_header_bar {
    padding: 0px;}

  .webbook_header_bar span.logo {
    margin: 4px;}

  .webbook_header_bar span.logo a {
    height: 26px;
    width: 80px;
    background-image: url('nist_logo_mark.svg');
    background-repeat: no-repeat;
    background-position: 0 0px;
    background-size: 80px auto;}

  .webbook_header_bar h1 {
    font-size: 24px;
    line-height: 26px;}
}

/*
  For links to skip to content. Adapted from:

  http://webaim.org/techniques/css/invisiblecontent/
*/
.skip-link a {
    position:absolute;
    left:-10000px;
    top:auto;
    width:1px;
    height:1px;
    overflow:hidden;
}

.skip-link a:focus {
    position:static;
    width:auto;
    height:auto;
}

/*
  For content which is only for screen readers.

  Adapted from:

   http://webaim.org/techniques/css/invisiblecontent/#techniques

*/
.sr-only {
    position:absolute;
    left:-10000px;
    top:auto;
    width:1px;
    height:1px;
    overflow:hidden;
    margin: -1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    border: 0;
}


/*
   Accessible menu style adapted from work by Terrill F. Thompson, University
   of Washington.

   https://staff.washington.edu/tft/tests/menus/simplyaccessible/index.html

   Adapted to meet NIST Office of Data and Informatics conventions.
*/
.webbook_nav, .webbook_nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Top level nav */
.webbook_nav {
    float: left;
    margin: 0px 0px 10px 0px;
    width: 100%;
    color:  white;
    background-color: #044687; /* colors from NIST SR data convention */
    background-image: linear-gradient(#04519B,#044687 60%,#033769);
    box-shadow: 0 2px 2px rgba(0,0,0,0.1);
}

/* Dropdowns */
.webbook_nav ul {
    position: absolute;
    top: 2.8em;
    left: -9999px;
    opacity: 0;

    transition: opacity linear 0.2s;

    min-width: 150px;
    color: black;
    background-color: white;

    box-shadow: 0 3px 3px rgba(0,0,0,0.5);
}

.webbook_nav li {
    float: left;
    position: relative;
    margin: 0;
}

/* Top level nav items */
.webbook_nav li > a {
    float: left;
    display: block;
    padding: 0.6em 1.2em;
    border-right: 1px solid rgba(255,255,255,0.4);
    color: white;
    font-weight: bold;
    font-size: 18px;
    text-decoration: none;
}

/* Top level hover state, preserve hover state when hovering dropdown  */
.webbook_nav li > a:hover,
.webbook_nav li > a:focus,
.webbook_nav li:focus > a,
.webbook_nav li:hover > a {
    background-color: #022F5A; /* color from SR data convention */
    color: white;
    outline: 0;
}

.webbook_nav li:hover ul,
.webbook_nav li:focus ul,
ul.show-menu {
    left: 0;
    opacity: 1;
    z-index: 1;
}

.webbook_nav ul li {
    float: none;
    position: static;
}

.webbook_nav ul a {
    float: none;
    display: block;
    color: black;
    font-size: 14px;
    text-shadow: none;
    border: 1px solid #212121;
    /* #212121 = designsystem.digital.gov color-base */
    border-width: 0 0 1px;

    transition: all linear 0.2s;
}

/* Rounded corners for ul, first, and last list item */
.webbook_nav ul,
.webbook_nav ul li:last-child a {
    border: 0;
    border-bottom-left-radius: 7px;
    border-bottom-right-radius: 7px;
}

.webbook_nav ul,
.webbook_nav ul li:first-child a {
    border-top-right-radius: 7px;
}

/* Color for highlighted dropdown items. */
.webbook_nav ul a:hover,
.webbook_nav ul a:focus {
    background-color: #022F5A; /* color from SR data convention */
    color: white;
    text-shadow: none;
}

/* Append triangle to top level items. */
a.menu_below::after {
    content: " \0025BC";
    font-size: small;
}

/* Footer settings. */
footer {border-top: 2px solid black;
        margin: 1em 24px 1em 24px;
        padding: 0px;}

footer ul {list-style-type: none;
           list-style-image: none;
           list-style-position: outside;
           text-align: center;
           padding: 0;
           margin: 1em 0px 1em 0px;}

footer ul li {display: inline-block;}

footer ul li::before {content:  " | ";}
footer ul li:first-child::before {content:  "";}

/* Adjustments for handheld devices. */
@media screen and (min-width: 700px) {
    li.no-handheld {display: list-item;}
    .no-handheld {display: initial;}

    .only-handheld {display: none;}
}

@media screen and (max-width: 700px) {
    .no-handheld {display: none;}

    li.only-handheld {display: list-item;}
    .only-handheld {display: initial;}

    main, footer {margin-left: 2px;
                  margin-right: 2px;}

    p.section-head {margin-left: 4px;}

    div.indented, p.indented {margin-left: 4px;
                              margin-right: 4px;}

    dd {margin-left: 2em;}

    ul, ol {padding-left: 2em;}
}

/* Hide some stuff when printing. */
@media print
{
    .no-print, .no-print * {
        display: none !important;}

    .sr-only, .sr-only * {
        display: none !important;}
}
