:root {
    --primary: #777777;
    --secondary: #0693e3;
    --secondary-emphasis: #0084d1;
    --accent: #444444;
    --primary-fg: #fff;
    --primary-fg-off: #f0f0f0;

    --error: red;
    --error-off: salmon;
    --warning: orange;
    --warning-off: lightsalmon;
    --success: green;
    --success-off: lightgreen;
    --info: skyblue;
    --info-off: lightblue;

    --links: #9900bb;
    --linksrgb: 153,0,187;

    --header-height: 95px;

    /* Set up the palette for the answers heat map.
        Colors are defined for the quintiles with 1 the lowest. */
    --heatmap-quint-1: #ffc3cf;
    --heatmap-quint-2: #ffe2d1;
    --heatmap-quint-3: #fef0c8;
    --heatmap-quint-4: #bfdbc4;
    --heatmap-quint-5: #9be0ec;

    /* Set up the main logo palette */
    --logo-dark-purple: #861E90;
    --logo-med-purple: #A7148E;
    --logo-red-violet: #CE098D;
    --logo-dk-blue: #4E84CE;
    --logo-dk-blue-shadow: rgba(78, 132, 206, 0.3);
    --logo-lt-blue: #99DEF9;
    --nexus-light-text: #504D4D;
    --nexus-dark-text: #000;
    --nexus-dark-colored-text: #6453AF;
    --nexus-white-text: #F5F5F5;
    --nexus-disabled: #CCCBCB;
    --nexus-filled-button:#861E90;
    --nexus-filled-button-hover:#dd80e5;

    --font-family-primary: Arial,Helvetica,"Helvetica Neue",sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    padding: 0;
    height: 100%;
    overflow-x: hidden;
    position: relative;
    display: block;
    margin-top: 0;
    margin-bottom: 0;
    font-family: var(--font-family-primary);
    font-size: 14px;
    line-height: 1.35;
}

body {
    display: grid;
    grid-template-areas:
        "header header"
        "nav main"
        "footer footer";
    grid-template-rows: auto 1fr auto;
    grid-template-columns: fit-content(40%) 1fr;
}

header {
    grid-area: header;
    padding-top: 2px;
    margin: auto;
    max-width: calc(1380px - 4em);
    width: 90%;
}

@media screen {#nsflogo {
    width:40px;
    height:40px;
    position:absolute;
    top: 25px;
    right: 10px;
}}
/* Hide the logo when screen gets narrow (so it doesn't float over the menu) */
@media screen and (max-width: 900px) { #nsflogo { display:none; } }
/* Hide the logo when screen gets narrow (so it doesn't float over the menu) */
@media print { #nsflogo { display:none; } }

.messages {
    width: 100%;
    margin-top: 0em;
    padding: 0em;
    list-style: none;
    text-align: center;
    background-color: grey;
}

.messages .error {
    background-color: var(--error-off);
}

.messages .warning {
    background-color: var(--warning-off);
}

.messages .success {
    background-color: var(--success-off);
}

.messages .info {
    background-color: var(--info-off);
}

ul.errorlist {
    color: var(--error);
    font-size: 13px;
    list-style: none;
    padding-left: 1em;
}

#motdPopup {
    max-width:520px;
    min-width:200px;
    margin-top: 100px;
    background-color: var(--logo-lt-blue);
    border-color: var(--logo-dk-blue);
    box-shadow: 0 3px 5px var(--logo-dk-blue-shadow);
}
#motdPopup form {
    text-align: center;
}
#motdPopup form button {
    padding: 0 12px;
    min-height: 1.8em;
    background-color: var(--logo-dk-blue-shadow);
    color: var(--nexus-white-text);
}
#motdPopup form button:focus {
    background-color: var(--logo-dk-blue);
    box-shadow: 0 0 0 1px var(--accent);
}
#motdPopup div#noshow {
    margin-top: 15px;
    color: var(--nexus-light-text);
    font-style: italic;
    font-size: 0.95em;
}
#motdPopup p {
    margin: 0 0 10px 0;
}
#motdPopup p span.intro {
    font-weight: bold;
}



main {
    grid-area: main;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: calc(1380px - 4em);
    min-width: 50%;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 10em;
}

main h1 {
    text-align: center;
}

main section {
    padding: 5px;
    margin: 20px;
    min-width: 30%;
    align-self: center;
    background-color: #f8f8f8;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.3);
}

main section>h2 {
    background-color: #eee;
    margin: 0px;
    padding: 5px;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.18);
}

main section>h3 {
    background-color: #eee;
    margin: 0px;
    padding: 5px;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.18);
}

main section>p {
    padding: 0px 10px;
}

main section section {
    box-shadow: none;
}

main div.cardblock {
    width: 90%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    grid-auto-rows: 1fr;
    padding-top:1em;
}
main div.cardblock section.card {
    min-height: 250px;
    max-height: 380px;
    flex-basis: 30%;
    min-width:250px;
    padding:auto;
    margin:10px auto;
}
main div.cardblock section.card.short {
    min-height: 50px;
    max-height: 150px;
}
main div.cardblock section.card h3{
    margin: 0 auto;
    text-align: center;
}
main div.cardblock section.card.banner {
    flex-basis: 80%;
    min-height: 50px;    
    text-align: center;
}
main div.cardblock section.card.banner p {
    margin: 10px 0 0 0;
}
main div.cardblock section.card div.imgcard {
    display:flex;
    justify-content: center;
    align-items: center;
    height: 90%;
    width: 100%;
    padding:5px;
}
main div.cardblock section.card div img {
    width: 100%;
}

section.card h2 {
    padding-left: 10px;
    text-align: center;
    font-size: 1.3em;
}
section.card p {
    padding: 0px 10px;
}
section.card p.center {
    text-align: center;
}
section.card ul {
    list-style-type: disc;
    padding-left: 2em;
}

main div.cardbutton { 
    margin-left: auto;
    margin-right: auto; 
    margin-bottom: 8px; 
}
main img.cardcontent {  
    display: table-cell;
    text-align: center;
    vertical-align: middle;
    padding: 10px 20px;
    margin: auto;
    justify-content: center;
    border: none;
    border-radius: 8px;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.18);
    cursor: pointer;
}
main section.card.nyi h2 {
    color: var(--primary);
}
main section.card.nyi img.cardcontent {
    cursor: not-allowed;
}

main div.cardbutton img.cardcontent { 
    display: block;
    width:90%;
    padding: 4px 10px;
}

main a.cardbutton, main div.cardbutton a p.cardbutton {  
    display: block;
    width: 12em;
    text-align: center;
    vertical-align: middle;
    padding: 10px 20px;
    margin: auto;
    justify-content: center;
    min-width: 4em;
    min-height: 2.5em;

    color: var(--primary-fg);
    font-family: inherit;
    font-size: inherit;
    line-height: 1.1;

    background-color: var(--secondary);
    border: none;
    border-radius: 8px;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.18);

    cursor: pointer;
    transition: 220ms all ease-in-out;    
}
main a.cardbutton:hover, main div.cardbutton a p.cardbutton:hover {  
    background-color: var(--secondary-emphasis);
}

main a.cardbutton:focus, main div.cardbutton a p.cardbutton:focus {
    outline-style: solid;
    outline-color: transparent;
    box-shadow: 0 0 0 4px var(--accent);
}


main a.cardbutton.NYI {  
    pointer-events: none;
    background-color: var(--primary-fg-off);
    color: var(--info-off);
}
p.copyright {
    border: solid var(--primary) 1px;
    padding: 10px;
    margin: 20px;
    font-size: .85em;
}

p.totop {
    padding:0;
    margin:0 0 10px 0;
    border-bottom: 1px solid var(--primary);
    position:relative;
    top: -5px;
    font-size: 0.85em;
}
a.totop {
    float:right;
    margin: 0;
    padding: 0 10px 0 0;
    font-style:italic;
    /* font-size:.85em; */
    position:relative;
    top: -2px;
}

img.main-bg {
    opacity: 0.4;
    position: absolute;
    left: 0;
    top: 7px;
    width: 100%;
    height: 600px;
    z-index: -100;
    object-fit: cover;
    object-position: 80%;
}

main ul {
    list-style: none;
    padding-left: 1em;
}

main li {
    margin-bottom: 4px;
}

main table {
    text-align: left;
    border-spacing: 0px;
    /* width: 100%; */
}

main table tr {
    vertical-align: top;
    text-align: left;
}

main table tr th:first-of-type,
main table tr td:first-of-type {
    text-align: left;
}

a {
    outline: none;
    text-decoration: none;
    padding: 2px 1px 0;
}

a.current {
    font-weight: bold;
    text-decoration: dotted;
}

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

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

a:focus {
    background: lightcyan;
}

a:hover {
    background: lightcyan;
}

a:active {
    background: #c0ffff;
    color: gray;
}



header>nav {
    grid-area: header;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background-color: white;
    /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
    height: 95px;
    padding: 1em 1em 1em 5px;
    color: rgb(71, 71, 73);
    font-size: 17px;
    border-bottom: 1px solid gray;
}

header>nav .logo {
    margin-left: 0;
}

header>nav .logo a {
    display:inline-block;
}

header>nav li {
    text-align: center;
    text-transform:uppercase;
}

header>nav .username {
    text-align: right;
    font-size: 12px;
    color: var(--logo-med-purple);
    font-weight: bold;
    max-width: 15em;
    margin:auto .5rem;
    text-transform: none;
}

header>nav .logo img {
    vertical-align: middle;
}

main>nav.breadcrumbs {
    align-self: flex-start;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 15px;
    padding-left: 10px;
}
main>nav.breadcrumbs>p.breadcrumbs {
    margin-top: 0.7em;
    margin-bottom: 0.2em;
}

span.breadcrumbarrow {
    font-weight: bold;
    position: relative;
    top:-1px;
    font-family: "Arial Black";
    color:var(--logo-dk-blue);
}

body>nav {
    grid-area: nav;
    background-color: white;
    display: flex;
    flex-direction: column;
    padding: 10px;
    border-right: solid dimgrey;
}

body>nav ul {
    list-style: circle;
    max-width: 12em;
    padding-left: 0em;
    margin:0;
}

body>nav details ul {
    padding-left: 1.5em;
}

body>nav details summary, nav #filtertree details summary {
    text-indent: -1.2em;
    padding-left: 1.1em;
}

#filtertree {
    min-width: 15em;
}
#filtertree input#UpdateView {
    font-size: 1em;
    font-weight: bold;
    background-color: var(--logo-dk-blue-shadow);
    display:inline;
    margin:0 auto;
    float: right;
    border-width: 1px;
    padding: 3px 10px
}

#filtertree input#UpdateView:hover {
    background-color: var(--logo-lt-blue);
}

#filtertree span.helptext {
    display: none;
}
#filtertree li.skip, #filtertree li.skipFilter, #filtertree div.skip {
    display: none;
}
#filtertree div.viewChoices, #filtertree div.viewOptions {
    margin: 5px 0 10px 10px;
}

#filtertree summary, #filtertree div.viewselect {
    margin-top: 5px;
}

#filtertree div.viewselect input[type='checkbox']{
    position:relative;
    top: 0;
    margin-right: 5px;
}

#filtertree summary, #filtertree div.viewselect select{
    margin-left: .4em;
    padding:1px;
    font-weight: bold;
    width: 18em;
}
#filtertree div.viewselect.skip,
 #filtertree div.viewselect:has(select.skip),
 #filtertree div.viewselect select option[disabled] {
    display: none;
}
#filtertree div.viewselect:has(label[for='id_topics']) select, 
#filtertree div.viewselect:has(label[for='id_topics']) label {
    margin-left: .9em;
    width: 17.5em;
}

#filtertree label, #resexp_to {
    font-weight: bold;
    font-size: 13.5px;
    color: var(--nexus-light-text);
}
#filtertree div>label {
    font-size: 13px;
}
#filtertree div>span.skiplabel {
    font-size: 13px;
    margin-left: .9em;
}
#filtertree .viewoption label, #filtertree .viewoption label option {
    /* font-weight: normal; */
    font-size: 1em;
}
#filtertree div.viewoption {
    width: 16em;
    margin-bottom: 2px;
}
#filtertree details summary label {
    pointer-events: none;
}
#filtertree details label[for] {
    margin-left:10px;
}

#filtertree label input:checked {
    accent-color: var(--logo-dk-blue);
}

#filtertree span.showAllNone {
    font-size: .8em;
    padding-left: .1em;
}

#filtertree details:not([open]) span.showAllNone {
    display:none;
}
#filtertree #id_benchmark {
    float:left;
}
#filtertree div#res_exp_wrapper {
    padding-left: .4em;
    padding-top: .2em;
}
#filtertree div#res_exp_wrapper p {
    margin-top: .2em;
    margin-bottom: .2em;
}
body>nav #filtertree ul {
    max-width: initial;
}


/* FilterTooltip container */
.filtertip {
    position: relative;
    color: #6453AFA0;
    border: 2px outset #99def94f;
    border-radius: 1em;
    border-width: 2px;
    padding: 0 2px;
    font-weight: bold;
    font-size: 12px;
}

/* Tooltip text */
.filtertip .filtertiptext {
    visibility: hidden;
    min-width: 22em;
    background-color: white;
    box-shadow: 0px 0px 3px 3px #FFFFFF;
    color: var(--nexus-dark-colored-text);
    text-align: left;
    font-size: 1em;
    font-weight: bold;
    padding: 1px;
    text-indent: initial;

    /* Position the filtertip text - see examples below! */
    position: absolute;
    z-index: 1;
    top: -1px;
    left: 2em;
}

/* Show the filtertip text when you mouse over the filtertip container */
.filtertip:hover {
    color: #6453AF;
    border-color: #99def9;
}

.filtertip:hover .filtertiptext {
    visibility: visible;
}

nav p.FilterTitle{
    margin:5px 0 0 0;
    color: #5d4e9e;
}
nav p.FilterTitle.Update{
    margin:0 0 18px 0;
}
nav p.FilterTitle.Update span.FilterTitle {
    position: relative;
    top:20px;
}

nav p.FilterTitle.Options{
    margin-top:1em;
}

nav span.FilterTitle {
    font-weight: bold;
    font-size: 1.1em;
}

#canvas.viz {
    width: 80%;
    max-height: 600px;
    display:flex;
    /* border:1px solid var(--logo-dark-purple); */
}
#canvas.viz>div {
    margin:0px auto;
}
h3.graphNYI {
    margin:3em auto;
    font-style: italic;
    color:var(--nexus-dark-colored-text);
}
.plotly .hoverlayer .hovertext rect {
    fill-opacity: 1 !important;
}

#CMGraphTitle {
    margin-top: 0;
    margin-bottom: 0.2em;
    text-align: center;
}

div.viz_footnote {
    max-width: 70%;
    margin:5px auto;
}

div.viz_footnote.extraspace {
    margin-top:3em;
}

p.viz_footnote, p.viz_footnote_intro {
    font-size: 0.9em;
    color: var(--nexus-light-text);
    z-index: 5;
}
p.viz_footnote_intro {
    margin: 5px 0 0 0;
}
p.viz_footnote {
    margin: 0 0 0 20px;
}
p.viz_footnote span.missing {
    font-style: italic;
    font-weight: bold;
    color:#9F9F9F;
}
img#sharelinkimg {
    height:20px; 
    position: relative;
    top:6px;
    left:5px;
}
p#sharelabel {
    color: var(--nexus-light-text);
    font-size: .9em;
    text-align: center;
    margin: 0 0 1em 0;
}

.menu {
    display: flex;
    flex-direction: row;
    list-style-type: none;
    margin: 0;
    padding: 0;
    font-weight: bold;
}

.menu>li {
    margin: auto 0.3rem;
    text-transform: uppercase;
}

.menu>li a {
    padding: 0 0.5rem;
}

.menu>li button {
    border: none;
    background-color: transparent;
    font-family: inherit;
    font-size: inherit;
    padding: 0 0.5rem;
    cursor: pointer;
    color: inherit;
    font-weight: bold;
    text-transform: uppercase;
}

.menu>li button:hover, .menu>li button:focus  {
    background: lightcyan;
}

.menu>li ul li {
    display: none;
}

.menu>li a,
.menu>li a:visited {
    color: inherit;
    text-decoration: none;
}

.menu>li a:hover,
.menu>li a:active {
    color: var(--accent);
}


.menu-button-container {
    display: none;
    height: 100%;
    width: 30px;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#menu-toggle {
    display: none;
}

.menu-button,
.menu-button::before,
.menu-button::after {
    display: block;
    background-color: var(--accent);
    position: absolute;
    height: 4px;
    width: 30px;
    transition: transform 400ms cubic-bezier(0.23, 1, 0.32, 1);
    border-radius: 2px;
}

.menu-button::before {
    content: "";
    margin-top: -8px;
}

.menu-button::after {
    content: "";
    margin-top: 8px;
}

#menu-toggle:checked+.menu-button-container .menu-button::before {
    margin-top: 0px;
    transform: rotate(45deg);
}

#menu-toggle:checked+.menu-button-container .menu-button {
    background: rgba(255, 255, 255, 0);
}

#menu-toggle:checked+.menu-button-container .menu-button::after {
    margin-top: 0px;
    transform: rotate(-45deg);
}

/* On small screens e.g. mobile devices, collapse the navbar into a hamburger menu icon on the left-side. Hide the login id*/
@media (max-width: 700px) {
    header>nav {
        flex-direction: row-reverse;
    }

    header>nav .username {
        text-align: left;
        font-size: 0.8em;
        font-weight: normal;
        max-width:none;
    }

    .menu-button-container {
        display: flex;
    }

    .menu {
        position: absolute;
        top: 0;
        margin-top: var(--header-height);
        left: 0;
        flex-direction: column;
        width: 100%;
        justify-content: center;
        align-items: center;
    }

    #menu-toggle~.menu li {
        display: none;
        height: 0;
        margin: 0;
        padding: 0;
        border: 0;
        transition: height 400ms cubic-bezier(0.23, 1, 0.32, 1);
    }

    #menu-toggle:checked~.menu li {
        display: flex;
        flex-direction: column;
        border: 1px solid #333;
        height: 100%;
        padding: 0.5em;
        transition: height 400ms cubic-bezier(0.23, 1, 0.32, 1);
    }

    #menu-toggle:checked~.menu li ul li {
        border: none;
        height: 2.5em;
    }

    .menu>li {
        display: flex;
        justify-content: left;
        margin: 0;
        padding: 0.5em 0;
        width: 100%;
        color: var(--primary);
        background-color: var(--primary-fg);
    }

    .menu>li:not(:last-child) {
        border-bottom: 1px solid #444;
    }
}

main button,
main a.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25em 0.75em;
    margin: 0.25em;
    min-width: 4em;
    min-height: 2.5em;

    color: var(--primary-fg);
    font-family: inherit;
    font-size: inherit;
    text-align: center;
    line-height: 1.1;

    background-color: var(--secondary);
    border: none;
    border-radius: 8px;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.18);

    cursor: pointer;
    transition: 220ms all ease-in-out;
}

main a.button.discrete {
    color: var(--nexus-light-text);
    background-color: var(--info);
    min-height: 2em;
}
main a.button.discrete:hover {
    color: var(--primary-fg);
}

main a.button.center {
    display: flex;
    margin-left: auto;
    margin-right: auto;
    max-width: 30%;
}

main button:hover,
main a.button:hover {
    background-color: var(--secondary-emphasis);
}

main button:focus,
main a.button:focus {
    outline-style: solid;
    outline-color: transparent;
    box-shadow: 0 0 0 4px var(--accent);
}

main .danger {
    background-color: var(--error-off);
}

main .danger:hover {
    background-color: var(--error);
}

/*
p {
    max-width: 30em;
}
*/

p.help {
    font-size: 12px;
    margin: 0px 0px 1px 0px;
}

p.footnote {
    font-size: 12px;
    text-align: center;
    max-width: 100%;
}

main form {
    max-width: 700px;
}

form section.fields {
    display: grid;
    grid-template-columns: auto 1fr;
}

form section.fields>div {
    padding: 5px;
}

form section.fields>div>span {
    display: inline-block;
}
form section.wrapper>section.fields {
    margin:0;
}
form section.wrapper>section.actions {
    margin:5px;
}

form section.actions {
    display: flex;
    flex-direction: row;
    justify-content: center;
}
form section.actions button {
    padding-left: 1.5em;
    padding-right: 1.5em;
}

form p.intro  {
    font-weight: bold;
    margin:4px;
    max-width: 700px;
    text-align: center;
}
h3.intro  {
    margin-bottom: 0;
}

td.answer-field .errorlist {
    padding: 0px;
    margin: 0px;
}

td.answer-field #id_priority {
    max-width: 3.5em;
}

img#AckNSFlogo {
    width: 100px;
    height: 100px;
    float: right;
    position:relative;
    top:-15px;
    margin-left: 10px;        
}


/* Tooltip container */
.tooltip {
    position: relative;
    top: 1px;
    display: inline-block;
  }
  
  /* Tooltip text */
  .tooltip .tooltiptext {
    visibility: hidden;
    min-width: 400px;
    max-width: 600px;
    width: auto;
    background-color: lightyellow;
    color: black;
    text-align: center;
    padding: 7px;
    border-radius: 5px;
    border-style: groove;
   
    /* Position the tooltip text - see examples below! */
    position: absolute;
    z-index: 1;
    bottom: 100%;
    right: 110%;
  }
  
  /* Show the tooltip text when you mouse over the tooltip container */
  .tooltip:hover .tooltiptext {
    visibility: visible;
  }

#id_institution_subunit {
    width: 100%;
}

.odd-field {
    background-color: var(--primary-fg-off);
}

.error-field {
    border-left: 1px dotted var(--error);
}

span.avoidwrap { display:inline-block; }

footer {
    grid-area: footer;
    background-color: var(--info);
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    padding: 0.25em;
    margin: auto;
    max-width: calc(1380px - 4em);
    font-size: 0.8em;
    font-style:italic;
}
footer p {
    margin: 2px 10px;
    text-align: center;
}

footer a,
footer a:link,
footer a:visited {
    text-decoration:underline;
    color: inherit;
    background-color: inherit;
}

footer a:hover,
footer a:focus {
    text-decoration: solid;
    color: inherit;
    background-color: var(--info);
}

[inert] {
    opacity: .3;
    pointer-events: none;
    cursor: default;
    user-select: none;
  }