/** -----------------------------------------
  * GLOBAL - General settings for entire site
  ------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,100..900;1,100..900&display=swap');
:root {
  --base-clr: #151515;
  --base-clr-2: #1a1a1a;
  --base-clr-3: #363636;
  --base-clr-4: #656565;
  --line-clr: #42434a;
  --line-clr-2: #4c4e57;
  --nav-clr: darkgray;
  --nav-border-clr: #b6b6b6b6;
  --selector-clr: rgb(223, 223, 223);
  --selector-clr-2: #ffffff;
  --scale-blue: #194F90;
  --scale-blue-2: #009ade;
  --scale-red: crimson;
  --scale-orange: rgb(255, 102, 0);
  --shadow-box: 3px 4px 5px #222222de;
  --shadow-box-small: 1px 4px 5px #414141c0;
  --text-clr: whitesmoke;
}

* {
  margin: 0;
  padding: 0;
}

html {
  font-family: "Noto Sans", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  font-variant: small-caps no-common-ligatures;
  line-height: 1.24rem;
}

body {
  bottom: 0;
  left: 0;
  min-height: 100vh;
  position: absolute;
  right: 0;
  top: 0;
}

input,
button,
select,
textarea {
  font: inherit;
}

ul {
  white-space: pre;
  list-style: none;
  padding: 0;
  margin: 0;
}

hr {
  margin-top: 0.24rem;
  margin-bottom: 0.48rem;
}

/** ---------------------------------------------
  * Overall grid layout 'container' for all pages
  ----------------------------------------------- */
.container {
  display: grid;
  max-height: 1dvh;
  grid-template-rows: 40px repeat(9, 1fr);
  grid-template-columns: repeat(9, 1fr);
  justify-content: center;
  row-gap: 1rem;
  background-image: url(../img/Scale_blue_vert_word_only.png);
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: bottom right;
  background-size: clamp(240px, 16%, 512px) auto;
  background-color: var(--base-clr);
}

/** -----------------------------------------------
  * Navigation bar at the top of the page
    This is always the top row of the grid
   ?? Would this be better situated in/as a header?
  ------------------------------------------------- */
.navBar {
  grid-row: 1 / 1;
  grid-column: 1 / 11;
  justify-items: center;
  justify-self: center;
  position: sticky;
  top: 0%;
  height: 36px;
  line-height: 32px;
  z-index: 1;
}

.navBar ul {
  display: flex;
  gap: 1px 1vw;
  padding: 2px;
  margin-top: 1rem;
  overflow: clip;
  border-radius: 2rem;
  border-style: outset;
  border-color: var(--nav-border-clr);
  background-color: var(--nav-clr);
  box-shadow: var(--shadow-box);
  filter: brightness(1.24) contrast(0.85) saturate(1.24);
}

.navBar li {
  display: inline-flex;
  padding-inline: 0.16vw;
}

.navBar li a {
  font-weight: 700;
  font-kerning: normal;
  color: black;
  text-decoration: none;
  text-rendering: optimizeLegibility;
}

/** ---------------------------------------------------
  * Dropdown selectors for filter and device info pages
  ----------------------------------------------------- */
.nodeSelections {
  grid-column: 1 / 3;
  display: flex;
  flex-direction: column;
  flex-flow: column;
  flex-wrap: 100%;
  position: sticky;
  top: 6rem;
  width: clamp(12vw, 16vw, 20vw); 
  margin-left: clamp(0.25vw, 1vw, 1.5vw);
  box-shadow: var(--shadow-box);
  border-radius: 8px;
  border: 0.24rem solid var(--line-clr-2);
  background-color: var(--line-clr);
  padding: 4px;
  padding-bottom: 0.85rem;
  opacity: 1;
  color: var(--text-clr);
}

.sideSelector {
  grid-column: 1 / 3;
  grid-row: 2 / 3;
  display: flex;
  flex-direction: column;
  flex-flow: column;
  flex-wrap: wrap;
  position: sticky;
  top: 8rem;
  width: clamp(44%, 61%, 88%);
  margin-left: clamp(1%, 2%, 3%);
  border-radius: 8px;
  border: 0.24rem solid var(--line-clr-2);
  background-color: var(--line-clr);
  box-shadow: var(--shadow-box);
  padding: 4px;
  padding-bottom: 0.85rem;
  opacity: 1;
  color: var(--text-clr);
}

#sideSelectTitle {
  margin-block: 0.24rem;
}

select {
  font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
  color: var(--text-clr);
  width: 100%;
  background-color: var(--line-clr-2);
  border-radius: 0.5rem;
  opacity: 1;
  border: 0.16rem inset var(--base-clr-2);
  padding: 0.24rem;
  margin-top: 0.24rem;
}

select:hover {
  filter: brightness(1.05) saturate(1.05);
}

/** -------------------------------------------------------------
  * Text and misc info presentation grid defs
  - omit using either for flexible placement of new text elements
  --------------------------------------------------------------- */
.blockDisplay {
  grid-column: 4 / 8;
  grid-row: 2 / 3;
  margin-top: 2rem;
  display: inline-block;
  gap: 2rem;
}

.blockDisplay p {
  font-size: 1.2rem;
  color: var(--text-clr);
  margin: 0.5rem;
}

.blockDisplay h1 {
  font-size: 2rem;
  color: var(--text-clr);
  margin: 0.75rem;
}

.blockDisplay2 {
  grid-column: 4 / -4;
  grid-row: 5;
  display: flex;
  background-color: var(--line-clr);
  padding: 1rem;
  border-radius: 8px;
  border: 8px solid var(--line-clr-2);
  box-shadow: var(--shadow-box);
  flex-direction: column;
  flex-flow: column;
  flex-wrap: nowrap;
  justify-self: center;
  align-self: center;
}

.blockDisplay2 h1 {
  font-size: 1.75rem;
  color: var(--text-clr);
  margin: 1rem;
}

.blockDisplay2 p {
  font-size: 1.16rem;
  color: var(--text-clr);
  margin: 1rem;
}

.blockDisplay2 a {
  font-size: 1.24rem;
  color: var(--selector-clr);
  text-decoration: none;
}


/** -------------------------------------------------
  * Output [models] info display components
  - modelDisplay is the parent container for modelBox
  --------------------------------------------------- */
.modelDisplay {
  grid-column: 2 / -2;
  display: grid;
  padding-bottom: 1rem;
  max-height: 1vhi;
  margin-left: 1.24rem;
  margin-top: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(256px, 12%));
  grid-gap: 0.24em;
  opacity: 1;
  transform-origin: 0 0;
}

.modelBox {
  display: block;
  padding: 8px;
  padding-right: 3rem;
  margin: 0.25rem;
  border-radius: 0.5rem;
  border: solid var(--line-clr-2);
  opacity: 1;
  filter: brightness(0.95) saturate(0.95);
  background-color: var(--line-clr-2);
  transition: transform 250ms ease-in-out 50ms;
  color: var(--text-clr);
  animation-name: zoomInSelection;
  animation-iteration-count: 1;
  animation-timing-function: ease-in-out;
  animation-duration: 0.38s;
}

.modelBox:hover {
  text-decoration: none;
  border: solid var(--scale-blue-2);
  filter: brightness(1.1) saturate(1.1);
  transform: scale(1.05, 1.05);
  box-shadow: var(--shadow-box);
}

.modelBox h3 {
  font-size: 1.2rem;
}

#configLink {
  text-decoration: none;
}

/** ----------------------------------------------------------------------
  * Easing all transitions for visual comfort
  - [TODO] this is largely global - should probably be applied differently
  ------------------------------------------------------------------------ */
.primarySelections, 
.secondarySelections, 
.blockDisplay, 
.blockDisplay2,
.nodeSelections,
.sideSelector,
article, 
.submissionBox, 
.submitButton,
input, 
.modelBox, 
.modelDisplay, 
select {
  transition-property: opacity;
  transition-duration: 0.35s;
  transition-timing-function: ease-in;
  
  @starting-style {
    opacity: 0;
  }
}

@keyframes menuSelectorFade {
  0% {
    color: var(--scale-blue);
    filter: drop-shadow(.6px .6px 1px var(--scale-blue-2));
  }
  100% {
    color: black;
  }
}

/* Not needed?  TEST WITHOUT <---  
/*@view-transition {
  navigation: auto;
}*/

/** ----------------------------------------------------------
  * Detailed view for platforms/configs
  - transform-origin default replaced via js to mouse position 
  ------------------------------------------------------------ */
.detailBox {
  grid-column: 1 / 4;
  grid-row: 2 / fit-content;
  display: flex;
  flex-direction: column;
  padding: 8px;
  margin-top: 0.48em;
  border-radius: 8px;
  border: solid var(--line-clr-2);
  opacity: 1;
  background-color: var(--line-clr-2);
  color: var(--text-clr);
  scale: 1;
  transform-origin: inherit;
  transition: transform 250ms ease-in-out 50ms;
  animation-name: zoomInSelection;
  animation-iteration-count: 1;
  animation-timing-function: ease-in-out;
  animation-duration: 0.38s;
}

.detailHeader {
  display: inline-block;
  flex-direction: row;
  flex-wrap: nowrap;
  width: fit-content;
  margin-left: 1rem;
  padding: 4px;
  justify-content: left;
  margin-bottom: 0.5rem;
}

.detailButtonHeader {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  justify-items: center;
  width: 100%;
  margin-block: 0.24rem;
  position: relative;
}

#detailPlatformTitle {
  font-size: 1.6rem;
  font-weight: bold;
  color: var(--text-clr);
  text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.651);
  margin-block: 1.24rem;
  white-space: pre
}

.exportButton,
.compareButton,
.backButton {
  width: 8vw;
  min-width: 80px;
  background-color: var(--line-clr);
  color: var(--text-clr);
  border-radius: 4px;
  border: var(--base-clr) solid 1px;
  cursor: pointer;
}

.backButton {
  margin-left: 0.5vw;
  margin-right: auto;
  justify-self: flex-start;
}

.exportButton {
  margin-left: auto;
  margin-right: 0.5vw;
  justify-self: flex-end;
}

.exportButton:hover,
.compareButton:hover,
.backButton:hover {
  border: solid var(--selector-clr) 1px;
  filter: brightness(1.1) saturate(1.05);
  box-shadow: var(--shadow-box-small);
}

.detailBar {
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  width: 100%;
  padding: 4px;
  padding-inline: 8px;
  border: var(--base-clr) solid 1px;
  border-radius: 4px;
  background-color: var(--base-clr-4);
  box-shadow: var(--shadow-box-small);
  align-items: center;
}

.detailExportPicker {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  min-width: 180px;
  flex-direction: column;
  border: var(--base-clr) solid 1px;
  border-radius: 4px;
  background-color: var(--line-clr-2);
  box-shadow: var(--shadow-box);
  z-index: 100;
}

.detailExportPicker.detailExportPicker--open {
  display: flex;
}

.detailExportPicker-option {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  text-align: left;
  background: transparent;
  color: var(--text-clr);
  border: none;
  border-radius: 0;
  cursor: pointer;
  font: inherit;
}

.detailExportPicker-option:hover {
  background-color: var(--base-clr-4);
}

.detailExportPicker-option:not(:last-child) {
  border-bottom: 1px solid var(--line-clr);
}

#processorImg,
#memoryImg,
#networkImg,
#storageImg,
#gpuImg,
#chassisImg {
  object-fit: contain;
  height: auto;
  width: 1.4rem;
  justify-self: flex-end;
}

/** ---------------------------------------------------------------
  * Zoom for detail view; only used for detailBox launch transition
  ----------------------------------------------------------------- */
@keyframes zoomInSelection {
  0% {
    scale: 0;
  }

  100% {
    scale: 1;
  }
}

/** --------------------------------------------------------
  * Table output for hcldevinfo page - highlight under mouse
  ---------------------------------------------------------- */
#tableOutputDiv {
  grid-row: 2 / 11;
  grid-column: 2 / 11;
  margin-left: 4vw;
  margin-right: clamp(1vw, 2vw, 4vw);
  margin-top: 3rem;
  border-radius: 8px;
  scale: 1;
}

article {
  border: 4px solid transparent;
  border-radius: 10px;
  background-color: var(--line-clr);
  font-variant: no-common-ligatures;
}

#tableOutput {
  table-layout: auto;
  font-family: Arial, Helvetica, sans-serif;
  border-collapse: collapse;
  white-space: normal;
  width: 100%;
}

#tableOutput td,
#tableOutput th {
  padding: 1px;
  overflow: hidden;
}

#tableOutput tr:nth-child(even) {
  background-color: #fafafa;
}

#tableOutput tr:nth-child(odd) {
  background-color: #dfdfdf;
}

#tableOutput tr:hover {
  background-color: #ddd;
  border-color: var(--line-clr);
  border-style: solid;
  border-width: 1px;
  font-weight: bold;
}

#tableOutput th {
  text-align: left;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.651);
  text-transform: uppercase;
  background-color: var(--line-clr);
  color: var(--selector-clr);
}

#tableOutput th.sortable-column {
  padding: 0;
}

.sortable-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  padding: 1px;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: inherit;
  text-shadow: inherit;
  text-transform: inherit;
}

.sortable-header:hover {
  color: var(--selector-clr-2);
}

.sortable-header:focus-visible {
  outline: 2px solid var(--scale-blue-2);
  outline-offset: -2px;
}

.sort-indicator {
  min-width: 1.25rem;
  text-align: center;
}

/*@keyframes unrollSelection {
  0% {
    transform: ;
  }

  100% {
    transform: translateY(25%);
  }
}*/

/** ------------------------------------------------
  * Form elements for part / BOM  / quote submission
  -------------------------------------------------- */
.submissionBox {
  grid-row: 3;
  grid-column: 5 / 6;
  display: flex;
  flex-direction: column;
  width: clamp(20px, 224px, 256px);
  gap: 0.5ex 8px;
  margin-top: 1rem;
  font-size: large;
  border-radius: 8px;
  border: 1rem solid var(--line-clr-2);
  background: var(--line-clr);
}

input {
  border-radius: 0.5rem;
  align-self: center;
  height: fit-content;
  background-color: var(--line-clr-2);
  color: var(--selector-clr);
}

input:hover {
  filter: brightness(1.08) saturate(1.08);
}

.form-item {
  padding-right: 16px;
  padding-left: 5%;
}

.form-item label {
  color: aliceblue;
}

.submitTop {
  margin-top: 1ex;
}

.mfgClass {
  width: 80%;
}

.submitButton {
  width: clamp(92px, 35%, 40%);
  background-color: gainsboro;
  margin-block: 1.24ex;
  color: var(--base-clr);
}

.submitSuccess {
  grid-row: 4;
  grid-column: 4 / 8;
  scale: 1.3;
  align-self: center;
  display: none;
  font-weight: bold;
  font-size: larger;
  margin: 2%;
  color: aliceblue;
}

/** ------------------------------
  * Toggled via submit_listener.js
  -------------------------------- */
.submitSuccess.show {
  display: block;
}
