/*
 * The Chandra X-Ray Center (CXC) is operated for NASA:
 *   Smithsonian Astrophysical Observatory
 *   60 Garden Street
 *   Cambridge
 *   MA 02138
 *   USA
 * Email: cxcweb@head.cfa.harvard.edu
 *
 * Smithsonian Institution, Copyright © 1998-2013, 2017, 2018, 2019, 2024
 * All rights reserved. 
 */
 
/* Set up header/footer, over-riding where appropriate */
@import url("cxcstyle_hf.css");

/* Matching CIAO 4.9 version where appropriate */
/* CSC 1 color was #B0C4DE   used /incl/cscfade.jpg
 *     2           #99CC666       /incl/greenfade2.jpg
 */
#cxcheader {
   /*  background: #B0C4DE url("/incl/cscfade.jpg") repeat-y center right; */
   /*  background: #99CC66 url("/incl/greenfade2.jpg") repeat-y center right; */
    background: linear-gradient(to left, #013300, #99CC66 800px);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

#cxcfooter {
    /* background: #B0C4DE url("/incl/cscfade.jpg") repeat-y center right; */
    /* background: #99CC66 url("/incl/greenfade2.jpg") repeat-y center right; */
    background: linear-gradient(to left, #013300, #99CC66 800px);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

#cxcheaderright {
    margin-right: 2em;
    margin-top: 1em;
}

#cxcheaderright li {
    font-size: 1em;
}

#cxcheaderright a {
    font-weight: normal;
    padding: 0px;
}

#cxcheaderright ul li a {
    background-color: transparent;
    border: none; /* turn off the border */
    font-size: larger;
    font-variant: small-caps;
}

#cxcheaderright ul li a:hover {
    background-color: #003366;
}

#cxcfooterleft {
    max-width: 19%;
}

#cxcfooterright {
    max-width: 80%;
}


/* Default CSC styles */

body {
  color: #000000;
  background: #ffffff;
  /* font: normal 100% Georgia, "Times New Roman", Times, serif; */
  font-weight: normal;
  font-style: normal;
  font-size: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/*
p_red {
    color: #ff0000;
}
*/

#main {
    float: left;
    width: 100%;
    min-width: 740px;
    background: #ffffff;
}

#navbar {
/*
  width: 20%;
  float: left;
*/
  background: #ffffff;
}

#navbar dl {
  padding: 5px;
  border: 5px solid #003366;
  }

/* HTML 5 layout changes; really should integrate into the main
   section */

footer {
    clear: both;
}


header {
  grid-area: header;
}

footer {
  grid-area: footer;
}

#content {
  grid-area: main;
  position: relative;
}

#navbar {
  grid-area: navigation;
}

/* padding depends on if in a navbar or not */
.wrap {
  padding-bottom: 1em;
  padding-top: 1em;
}

body.withnavbar .wrap {
  padding-left: 1em;
  padding-right: 1em;
}


body.withnavbar {
    display: grid;
    grid-template-areas: "header header"
                         "navigation main"
                         "footer footer";
    grid-template-columns: 20em 1fr;
}

/* Ideally would tweak the navbar display in this view */

@media screen and (max-width: 800px) , (max-width: 80 em) {
  body.withnavbar {
    grid-template-areas: "header" "main" "navigation" "footer";
    grid-template-columns: 100%;
  }

 /* remove the curves */
 div.topbarcontainer.withnavbar {
    border-bottom-right-radius: 0;
    -webkit-border-bottom-right-radius: 0;
    -moz-border-bottom-right-radius: 0;
 }

 div.bottombar.withnavbar {
    border-top-right-radius: 0;
    -webkit-border-top-radius: 0;
    -moz-border-top-radius: 0;
 }

 #navbar {
    margin-bottom: 0.5em;
 }
}


.navlinkbar, .pagetitle, .navimage, .scriptcell {
  text-align: center;
} 

.pagetitle > h1 {
    margin-bottom: 0;
}

.pagetitle > h1+h2 {
  margin-top: 0;
  margin-bottom: 0.5em;
}

.navimage {
  margin-bottom: 0;
}

/* remove the bullets from list elements in the nav bar */
#navlist li {
  list-style: none;
}

#navlist {
  border: 5px solid #003366;
  border-radius: 0.7em;
  padding: 5px;
}

#navlist ul li {
  margin-left: -2em;
}

/* ensure that main text is below the header */
div.mainbar, table.maintable { 
  clear: both; 
  padding: 0.5em;
}

hr.midsep {
  width: 80%;
  text-align: center;
  margin: 30px auto;
}


/* links */

a { 
  color: #000000;
  }

a:hover { 
  background: #ccccff; 
  }

a img {
  border: none;
  }

h2, h3, h2 a, h3 a {
  color: #003366;
  }

.topspace, topspace a{
  line-height: 0.03em;
  }

.homepage, homepage a{
  border-style: double;
  }

.warning, .warning a {
  color: red;
  }

.highlight, .highlight a {
  color: green;
  }	    

.code_blue, .code_blue a {
  color: blue;
  }

.code_yellow, .code_yellow a {
  color: yellow;
  }

.code_cyan, .code_cyan a {
  color: cyan;
  }


.grouptitle { 
 color: #003366; 
 }

/* header and footer */

div.topbarcontainer {
   /*  background: #B0C4DE url("/incl/cscfade.jpg") repeat-y center right; */
    /* background: #99CC66 url("/incl/greenfade2.jpg") repeat-y center right; */
    background: linear-gradient(to left, #013300, #99CC66 800px);
    overflow: auto;
    width: 100%;

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* withnavbar is a horrible hack */
div.topbarcontainer.withnavbar {
    border-bottom-right-radius: 1em;
    border-bottom-left-radius: 1em;
    -webkit-border-bottom-right-radius: 1em;
    -webkit-border-bottom-left-radius: 1em;
    -moz-border-bottom-right-radius: 1em;
    -moz-border-bottom-left-radius: 1em;
}

/* The following are forced to only match on the presence of div.topbarcontainer
   as I am not convinced all the pages have been converted to this style yet. */

div.topbarcontainer div.lastmodbar {
    padding: 1em;
}
div.topbarcontainer div.searchbar {
    padding-right: 1em;
    padding-bottom: 1em;
    padding-top: 0; /* try and remove existing rule */
}
div.topbarcontainer span.searchbar {
    color: white;
    font-weight: normal;
}
div.topbarcontainer span.searchbar a {
    color: white;
}
div.topbarcontainer span.searchbar a:hover {
    background-color: #003366;
}

div.topbar { 
  width: 100%; 
  }

/*
 * Make sure this is changed when cxcfooter background or radius is changed
 * Need to make sure not applied to thread pages and other non-navbar pages,
 * hence the somewhat specific selector below (could probaly use
 * div#main ~ div.bottombar)
 */

div.bottombar {
   /*  background: #B0C4DE url("/incl/cscfade.jpg") repeat-y center right; */
    /* background: #99CC66 url("/incl/greenfade2.jpg") repeat-y center right; */
    background: linear-gradient(to left, #013300, #99CC66 800px);
    padding-left: 1em;
}

div#main + br + div.bottombar {
    border-top-right-radius: 1em;
    border-top-left-radius: 1em;
    -webkit-border-top-right-radius: 1em;
    -webkit-border-top-left-radius: 1em;
    -moz-border-top-right-radius: 1em;
    -moz-border-top-left-radius: 1em;
}

div.lastmodbar {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}


div.lastmodbar, div.pdfbar, .qlinkbar, div.searchbar {
  font-size: 90%;
  }

div.lastmodbar, div.searchbar {
  padding-top: 10px;	
  }

span.searchbar {
  color: #003366;
  font-weight: bold;
}

div.searchbar { 
  float: right;
  width: 25em; 
  text-align: center;
  }

div#advancedsearch { 
  text-align: right; 
  }

div.urlbar { 
  display: none; 
  }

dd {
  margin-bottom: 1em;
  }

/* navigation bar; the approach taken for CSC is different to CIAO */

#navbar { 
  font-size: 90%; 
  }

#navbar dt { 
	padding-top: .1em;
	}

#navbar dd { 
	margin-left: 1em; 
	margin-bottom: auto;
	padding-top: .1em;
	}

#navbar a.indexlink { 
  font-size: 115%; 
  }

#navbar .heading {
  font-weight: bold;
  color: #000000;
  }

#navbar .selectedheading {
  font-weight: bold;
  color: #000000;
  background: #ccccff;
  }

#navbar a { 
  color: #000033;
  }

/* do we use "sticky" mode? */
@media screen and (min-height: 15em) {
  .navbar-sticky {
    position: sticky;
    top: 0.5em;
  }
  .navbar-not-sticky {
    display: none;
  }
}

.navlink_special {
  background: #99CC66; 
  border: 5px solid #003366;
  border-radius: 0.7em;
  padding-bottom: 1em;
  padding-top: 1em;
  font-weight: bold;
  font-size: larger;
}

/*** is this actually used? ***/
.mainlabel {
  font-size: x-large;
}

.label {
  /* margin-top: 0.4em;  not used without a being set to display: inline-block */
  font-size: large;
}

.navlink_special ul {
  list-style: none;
  margin: 0;
  padding-left: 0;
  text-align: center;
}

.navlink_rel2 {
  text-align: center;
}

.navlink_rel2 .site {
    font-weight: bold;
    font-size: larger;
}

/* newsbar also used in news.xml */
.newsbar { 
  background: #000033;
  color: #ccccff;
  text-align: center;
  padding-bottom: 2px;
  }

.newsbar h2 { 
  color: #ccccff;
  font-size: 1.6em;	
  margin-bottom: 2px;
  }

.newsbar h3 { 
  font-size: 1.4em;	
  margin: 0;
  }

#navbar div.newsbar a { 
  background: #000033;
  color: #ffffff;
  font-size: 1.2em;	
  }

td.objgrpname {
  font-weight: bold;	   
  }

td.grptitle {
  font-style: italic;	   
  }


/* screen output 
 * - the fact that we use htmldoc to create the PDF versions from
 *   specially-prepared versions of the web page limits the use of CSS
 *   in the main text
 */

pre.paramlist { 
  font-size: 90%; 
  }


/* highlight a box
 * (introduced for the "search temporarily unavailable" case)
 */

span.highlightbox {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: bold;
  padding: 0.2em;
  background: #ccccff;
  border: thin solid #003366;
}


/* hide information apart from non-CSS User Agents */
.hideme { 
  display: none; 
  }


/* other highlighting styles */

.screen pre, pre.highlight {
  /* background: #cccccc; */
  background: rgba(204, 204, 204, 0.7);
  white-space: pre;
  /* border: thin solid black; */
  border-bottom: thin solid rgba(0, 0, 0, 0.4);
  border-top: thin solid rgba(0, 0, 0, 0.4);
  padding:  0.5em;
  overflow: auto;
  }

/* green does not work well on a gray background, so
   override it; hopefully this is specific enough not to
   change any other highlight cases that should remain green */
div.screen pre.highlight {
  color: black;
}	    


div.highlighttext {
  background: #cccccc;
  border: thin solid black;
  padding:  0.5em;
  margin: 2em;
  }

div.l3progress {
  background-color: #000;	      
}

/*
 * page-specific style section 
 *
 */

/* threads: "history" block */

.history tr {
  vertical-align: top;
  }

.history td {
  padding-bottom: 10px;
  }

td.historydate {
  padding-right: 10px;
  text-align: right;
  }

/* site map */

#map_content_a, #map_content_b, #map_content_c {
  float: left;
  margin-right: 2%;
  width: 30%;
  }

#map_content_c {
  margin-right: 0
  }

#map_content div ul {
  list-style-type: none;
  padding-left: 1em;
  }

/*
 * Experimental support for figures in threads.
 */
div.figure {
    margin: 1em;
}
div.figure > div.thumbnail > div.screenmedia {
    float: left;
    padding-right: 1em;
    margin-right: 0.5em;
    margin-left: 1em;
    background-color: #ffffff;
}

/* check if we want this for div.thumbnail as well as div.nothumbnail */
div.figure > div.thumbnail > div.screenmedia > img ,
div.figure > div.thumbnail > div.screenmedia > a > img ,
div.figure > div.nothumbnail > div.screenmedia > img {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/*
 * Really would like to restrict the width of the 
 * figures "caption" to that of the image, but
 * not easily obvious without manually overiding the
 * width with the image size for each image. As we now
 * center the image within div.screenmedia it has
 * become less of an issue, although current look is
 * not ideal.
 */
div.figure > div > div.screenmedia > p.figures {
    text-align: center;
}

div.figure > div.caption {
    margin: 1em;
    background-color: #eeeeee;
    padding-left: 0.5em;
    padding-right: 0.5em;
    padding-top: 0.1em;     /* not sure looks good */
    padding-bottom: 0.1em;
}

/* Only want the highlighted bar for the title block, which
 * should be the first div.caption in the block
 */
div.figure div.caption:first-of-type {
    border: solid #99CC66;
    border-width: 0 0 0 1em;
}
span.figtitle {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-variant: small-caps;
}

/* Hide the print media version of the figure */
.printmedia {
    display: none;
}

img_caption {
    margin: 1em;
    background-color: #eeeeee;
    padding-left: 0.5em;
    padding-right: 0.5em;
    padding-top: 0.1em;     /* not sure looks good */
    padding-bottom: 0.1em;
    border: solid #99CC66;
    border-width: 0 0 0 1em;
    display: block;
}

/* could the following be handled by clever use of selectors? */
div.clearfloat {
    clear: both;
}

/*
 * Handle admonition blocks, based on the docbook stylesheet approach
 * to the caution, important, note, tip and warning tags. We use
 * the png files from the docbook distribution (1.78.1), which are
 * assumed to be in /ciao/imgs/.
 */

div.admonition {
    margin: 2em 3em 2em 3em;
    padding: 0.5em 1em 0.5em 1em;
    border: solid #99CC66;
    border-width: 0 0 0 1em;
    background-color: #eeeeff;
}

div.caution-inner {
    /* background-image: url("/ciao/imgs/caution.png"); */
}

div.important-inner {
    /* background-image: url("/ciao/imgs/important.png"); */
}

div.note-inner {
    /* background-image: url("/ciao/imgs/note.png"); */
}

div.tip-inner {
    /* background-image: url("/ciao/imgs/tip.png"); */
}

div.warning-inner {
    /* background-image: url("/ciao/imgs/warning.png"); */
}

/*
 * replacement for background-image use, so that the
 * images are included in the hardcopy output
 */
div.caution-inner > img,
div.important-inner > img,
div.note-inner > img,
div.tip-inner > img,
div.warning-inner > img {
  margin-left: -35px;
  float: left;
}

/* for now assume the images are the same size of abut 25 by 25 pixels */
div.caution-inner,
div.important-inner,
div.note-inner,
div.tip-inner,
div.warning-inner {
    padding-left: 35px;
    min-height: 35px;
    background-position: left top;
    background-repeat: no-repeat;
}

div.admonition div.title {
    margin-bottom: 0.2em;
    font-weight: bold;
    color: #3f3f3f;
}

/*
 * Tables
 */

/* td.oddrow also used in column listing */

td.oddrow { 
  background: #dddddd; 
  }

#dbtable a.nohovername:hover { 
 background-color: inherit;
 }

table.csctable {
    border-width: 0px;
    margin: auto;
}

table.csctable thead {
    position: sticky;
    top: 0;
}

table.csctable thead th {
    background: #99CC66; 
    color: #003366;
    text-align: center;
    padding: 5px;
}

table.csctable td {
    padding: 5px;
}

table.csctable tbody tr:nth-child(odd) {
    /* background: #dddddd; */
    background: rgba(204, 204, 204, 0.7);
}

/* is this more-specific than the above rule?
 * needed to avoid the background being set on
 * the first column of the 'context' view of the
 * columns in the CSCDB list
 */
table.csctable tbody tr td.context ,
  table.csctable tbody td.separator {
    background: #ffffff;
}

table#dbtable td.context {
  vertical-align: top;
}

/* button-style links class needs to defined 
/* http://usabilitypost.com/2012/01/10/pressed-button-state-with-css3/
 */    

.button-link {
    -webkit-user-select:none;
    -moz-user-select:none;
    -ms-user-select:none;
    /* color: #003366; */
    background: #99CC66;
    margin: 0.5em;
    margin-bottom: 0.5em;
    padding: 10px 15px;
    border: 1px solid #003366;
    cursor: pointer;
}

.button-link:hover,  .button-link:focus {
    color: rgba(0, 0, 0, 0.8);

    /* a more materials-like pressed "out" look */
    -webkit-box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.75);
    -moz-box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.75);
    box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.75);
}

.button-link:active {
    -webkit-box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.6);
    -moz-box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.6);
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.6);
    background: #2E5481;
    border: solid 1px #203E5F;
}


/* port over some changes from CIAO - should move into multiple style
   sheets so they can be shared. */

span.tt { font-family: "Inconsolata", "Liberation New", "Droid Sans Mono", "DejaVu Mono", "Courier New", monospace; }


/* Experimental "breadcrumb" support */

.breadcrumbs {
  background: #eeeeee;
  font-family: "Inconsolata", "Liberation New", "Droid Sans Mono", "DejaVu Mono", "Courier New", monospace;
  font-size: smaller;
  margin-right: 1em;
  margin-top: 0.5em;
  position: absolute;
  right: 1em;
}

.breadcrumbs-top {
  top: 0.5em;
}

.breadcrumbs-bottom {
  bottom: 0.5em;
}

/*** ADQL-like rules ***/

/*
For the moment this is essentially just the screen rules
apart for the background color.
*/
pre.adql {
  /* background: rgba(204, 204, 204, 0.7);   gray */
  background: rgba(153, 204, 102, 0.4);  /* opaque #99CC66 */
  border-bottom: thin dashed rgba(0, 0, 0, 0.4);
  border-top: thin dashed rgba(0, 0, 0, 0.4);
  padding: 0.5em 0.5em 0.5em 2em;
  overflow: auto;
  white-space: pre;
}

/* allow ADQL and related blocks to be "labelled" */
div.labelled {
  display: grid;
  grid-template-columns: min-content minmax(0, 1fr);
}

div.labelled .label {
  background: #99CC66;
  grid-column: 1;
  padding: 0 0.2em;
  text-align: center;
  transform: rotate(180deg);
  writing-mode: vertical-lr;
}

div.labelled .screen {
  grid-column: 2;
}

div.labelled .adql {
  grid-column: 2;
}

div.labelled + .labelled {
  margin-top: 1em;
}

.doi {
  font-family: Consolas, Monaco, Lucida Console,
  Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono,
  Courier New, monospace;
}

/* end of stylesheet */
