body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family:Verdana, Geneva, Tahoma, sans-serif;
  font-size: 12px;
}

input, textarea, select, ul, li {
  font-family:Verdana, Geneva, Tahoma, sans-serif;
  font-size: 12px;
}

textarea {
  /* allow the user to resize textareas vertically, but not horizontally */
  resize: vertical;
  overflow: auto;
}

#globalArrayText {
  resize: both;
  overflow: auto;
}

#modifyGlobalArray {
  width: fit-content;
  height: fit-content;
}

legend {
  font-weight: bold;
}

#content {
  flex: 1;
  padding: 10px;
  padding-bottom: 50px;
}

.hidden-file-input {
    display: none;
}

.custom-file-label {
    display: inline-block;
    padding: 10px 15px;
    cursor: pointer;
    background-color: #f2f2f2;
    border: 1px solid #ccc;
}

.file-picker {
    padding-bottom: 20px;
}

.tabs {
  width: 100%;
  margin: auto;
}

.tab-header {
  display: flex;
  justify-content: start;
  background-color: #ffffff;
}

.tab-button {
  padding: 10px 20px;
  cursor: pointer;
  background: none;
  border: none;
  flex-grow: 1;
  text-align: center;
  position: relative;
  color: #000000;
  font-size: 16px;
  border-bottom: 3px solid transparent;
  transition: width 1s ease, left 1s ease;
}

.tab-button.active {
  background-color: #ffffff;
  font-weight: bold;
  border-bottom: 3px solid #0b3d91;
}

.tab-button:hover {
  background-color: #ffffff;
  border-bottom: 3px solid #aaaaaa;
}

.tab-content {
  display: none;
}

.active {
  display: block;
}

.container {
  display: flex;
  justify-content: space-between;
}

.button-container {
  display: flex;
  justify-content: space-between; 
  width: 200px;
}

.file-stats-box {
  border: 1px solid lightgray;
  position: relative;
  padding: 10px;
  line-height: 20px;
}

.box {
  width: 48%; 
  border: 1px solid lightgray;
  position: relative;
  padding: 10px;
}

.box-full {
  width: 100%; 
  border: 1px solid lightgray;
  position: relative;
  padding: 10px;
}

.box-no-border {
  width: 48%; 
  position: relative;
  padding: 10px;
}

.box-no-border-padding-right {
  width: 48%; 
  position: relative;
  padding-right: 10px;
}

#extra-global-attributes, #extra-var-attributes {
  padding: 10px;
}

fieldset {
    border: 1px solid lightgray;
    margin-top: 10px;
}

.title {
  position: absolute;
  top: -10px;
  left: 10px;
  background: white;
  padding: 0 10px;
  font-weight: bold;
}

.global-attributes {
  padding: 10px;
}

.full-width-label {
  display: block;
  margin-top: 10px;
  margin-bottom: 8px;
}

.full-width-input {
  width: 100%;
  box-sizing: border-box;
}

.centered-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.two-column-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.two-column-left-column {
display: flex;
flex-direction: column;
/*gap: 8px;*/
}

.two-column-right-column {
display: flex;
flex-direction: column;
/*gap: 16px;*/
}

.two-column-section {
margin-bottom: 20px;
}

.file-naming-container {
    display: flex;
    justify-content: space-between;
}
.file-naming-container input {
    width: calc(33% - 10px);  /* Adjusts for any gaps */
}

.margin-below-input {
    margin-bottom: 8px;
}

dialog {
  border: 1px solid #aaa;
  border-radius: 5px;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
  padding: 20px;
  width: 400px;
}

.dialogButtonsDiv {
  display: flex;
  padding-top: 24px;
  align-items: right;
  justify-content: right;
}
/* variable attributes page, from Bernie's skteditor JS */


#varLeftPanel {
  height: 50%;
  width: 20%;
  float: left;
}

#varRightPanel {
  height: 50%;
  width: 80%;
  float: right;
}

#varBottomPanel {
  height: 300px;
  width: 100%;
  float: left;
}

#varSelect {
  width: 100%;
  overflow: scroll;
}

#cdfSpecification {
  width: 100%;
}

#varNameDiv {
  width: 100%;
  float: left;
  margin: 5px;
}

#varDataTypeDiv {
  float: left;
  margin: 5px;
}

#varRecVarDiv {
  float: left;
  margin: 5px;
}

#varDimensionsDiv {
  float: left;
  margin: 5px;
}

#varCompressionDiv {
  float: left;
  margin: 5px;
}

#varSparseRecDiv {
  float: left;
  margin: 5px;
}

#varPadValueDiv {
    float: left;
    margin: 5px;
}

#varFillValueDiv {
  float: left;
  margin: 5px;
}
  
#varDescriptionUncertainty {
  width: 40%;
  float: left;
}

#varDescription {
  width: 100%;
  float: left;
}
/*
#valueUncertainty {
  width: 100%;
  float: left;
}

#plusUncertainty {
  width: 50%;
  float: left;
}

#minusUncertainty {
  width: 50%;
  float: left;
}
 */
#valueUncertainty fieldset {
  display: flex;
  flex-wrap: wrap; 
}

#plusUncertainty, #minusUncertainty {
  flex: 1 1 48%;
  margin-bottom: 8px;
}

/* for screens smaller than 1160px */
@media (max-width: 1160px) {
  #plusUncertainty, #minusUncertainty {
      flex: 1 1 100%;
  }
}


#axisInformation {
  width: 60%;
  float: right;
}

#label1Div {
  float: left;
  margin: 5px;
}

#label1Div, #label2Div, #label3Div {
  flex: 1;
}

#label1 {
  width: 100%;
}
#label2 {
  width: 100%;
}
#label3 {
  width: 100%;
}

#scale-format-units {
  display: flex;
  justify-content: space-between;
}

#scaleType, #format, #units, #scaleTypeTable, #formatTable, #unitsTable, #label1Table, #label2Table, #label3Table {
  flex: 1;
  width: 100%;
}

#label1TableDiv {
  height: 80px;
  overflow: auto;
}

#label2Div {
  float: left;
  margin: 5px;
}

#label2TableDiv {
  height: 80px;
  overflow: auto;
}

#label3Div {
  float: left;
  margin: 5px;
}

#label3TableDiv {
  height: 80px;
  overflow: auto;
}

#scaleTypeDiv {
  float: left;
  margin: 5px;
  flex: 1;
}

#scaleTableDiv {
  height: 80px;
  overflow: auto;
}

#formatDiv {
  float: left;
  margin: 5px;
  flex: 1;
}

#formatTableDiv {
  height: 80px;
  overflow: auto;
}

#unitsDiv {
  float: left;
  margin: 5px;
  flex: 1;
}

#unitsTableDiv {
  height: 80px;
  overflow: auto;
}


#plotInformation {
  width: 30%;
  float: left;
}

#plotInfoDiv {
  float: left;
}

/*
#varTypeDiv {
  float: left;
  flex: 1;
}

#displayTypeDiv {
  float: right;
  flex: 1;
}

#plotInfoTopDiv {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}
*/

#plotInfoTopDiv {
  display: flex;
  flex-wrap: wrap;
}

#varTypeDiv, #displayTypeDiv {
  flex: 1 1 48%;
  margin-bottom: 8px;
}

@media (max-width: 1300px) {
  #varTypeDiv, #displayTypeDiv {
      flex: 1 1 100%; 
  }
}

#displayArgumentsDiv {
  clear: both;
  margin-top: 20px; /* might be too much now that we're setting margin-bottom on the divs above */
}

/*
#displayArgumentsDiv {
  float: left;
}
*/

#dependsDiv {
  flex: 1;
  max-width: 20%;
  float: left;
  overflow: auto;
  margin: 0px 5px 0px 0px;
}

#virtualVariable {
  width: 25%;
  float: left;
  overflow: auto;
  display: none;
}

#componentsTableDiv {
  height: 130px;
  width: 100px;
  overflow: auto;
}

#values {
  height: 300px;
  width: 15%;
  float: left;
  overflow: auto;
}

#valuesTableDiv {
  height: 190px;
  overflow: auto;
}

#validMinMax {
  height: 360px;
  max-width: 25%;
  float: left;
}

#validMinTableDiv {
  height: 120px;
  width: 100%;
  overflow: auto;
}

#validMaxTableDiv {
  height: 120px;
  width: 100%;
  overflow: auto;
}


#varBottomAdditional {
  clear: both;
  width: 100%;
}

#emptyBottom {
  width: 100%;
  height: 30px;
  display: flex;
}

.site-header {
  display: flex;
  align-items: center;
  gap: 20px; 
}

.menu-bar {
  background-color: white;
  overflow: hidden;
  width: 500px;
}

.menu-item {
  float: left;
  overflow: hidden;
}

.menu-item > span {
  display: block;
  color: black;
  text-align: center;
  padding: 4px 16px;
  text-decoration: none;
  cursor: pointer;
}

.submenu {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1;
  cursor: pointer;
  margin: 0; 
  padding: 0; 
}

.submenu li {
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  color: black;
}

.submenu li:hover {
  background-color: #ddd;
}

#variables-menu-item {
  display: none;
}

/* #newAttName {
  text-transform: uppercase;
} */

/* the following is for the dimension table in the "Create New Variable" dialog */
table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

th, td {
  text-align: center;
  padding: 2px;
}

.newVarSizeText {
  width: 4em;
}

/* disable all elements in a div */
.disabled-div * {
  pointer-events: none;
  opacity: 0.4;
  cursor: not-allowed;
}

.num-chars {
  padding-top: 16px;
  width: 6em;
}

#uploadValuesInput {
  display: none;
}

.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border-left-color: #0b3d91;
  animation: spin 1s ease infinite;
  position: absolute;
  top: 50%;
  left: 50%;
  margin-top: -20px;
  margin-left: -20px;
}

@keyframes spin {
  0% {
      transform: rotate(0deg);
  }
  100% {
      transform: rotate(360deg);
  }
}

#empty-space {
  height: 50px; 
}

#validationOutputPanel {
  position: fixed;
  bottom: 0;
  width: 100%;
  height: 50px; 
  background-color: #f0f0f0;
  border-top: 0px solid #ccc;
}

#resizeHandle {
  position: absolute;
  width: 100%;
  height: 3px;
  cursor: ns-resize;
  background-color: #0b3d91;
  z-index: 1;
}

#resizeHandle::after {
  content: "Messages";
  position: absolute;
  top: -10px; /* Move it slightly up to center between resize handle and panel */
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 20px;
  color: #ffffff;
  background-color: #0b3d91;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 3px;
  padding: 2px;
  cursor: ns-resize;
}

#validationOutput {
  white-space: pre-wrap;
  position: relative;
  height: calc(100% - 10px);
  padding: 10px;
  overflow: auto;
}

#validationButtonDiv {
  display: flex;
  justify-content: flex-end; 

}

#validationSaveButton, #validationClearButton {
  float: right; 
  margin: 10px; 
}

#closeWelcome, #createNewFileWelcome, #openExistingCDFFileWelcome, #openExistingNetCDFFileWelcome, #openExistingSKTFileWelcome, #openExistingJSONFileWelcome, #openExistingFileWelcome, #openExistingFromURL {
  height: 5em;
}

.button-height {
  height: 5em;
}

.dialog-header {
  display: flex; 
  align-items: center;
}

.dialog-error {
  height: 1.5em; 
  margin-right: 10px;
}

#fileCompressionWarning {
  padding: 6px;
  font-size: smaller;
}

.istp_flag {
  border: 1.5px solid red;
}

.smallerText {
  font-size: smaller;
  padding-top: 6px;
}

.varListContainer {
  height: 400px;
  overflow: hidden;
  border: 1px solid #000;
}

#varsListArrange {
  height: 100%;
  overflow-y: auto;
}

.sortable-selected {
  background-color: lightgray;
}

.centered-gzip-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#globalLinks {
  padding: 10px;
  line-height: 30px;
}

.globalLinksButtons {
  float: right;
}

a:link {
  color: #0b3d91;
}

a:visited {
  color: #0b3d91;
}

#varListNewAttContainer {
  display: none;
}

#labelVarListNewAtt {
  display: none;
}

.removeGlobalLinkButton {
  margin-left: 8px;
}

.global-link-handle {
	cursor: move;
	cursor: -webkit-grabbing;
}

.dialogButtonsDiv button {
  margin: 4px;
}

.information {
  line-height: 2;
}

#label1Button, #label2Button, #label3Button, #scaleTypeButton, #formatButton, #unitsButton {
  width: 18px;
  height: 18px;
  border: none;
  background-color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  padding: 0;
}

#selectLablAxisType, #selectScaleType, #selectFormat, #selectUnits {
  width: 15px;
  border: 0px;
  padding: 0px;
  background-color: #ffffff;
}

.buttonIcons {
  margin: 0;
  padding: 0;
}

.globalArrayButtons, .removeGlobalAttributes, .variableArrayButtons, .removeVariableAttributes{
  width: 18px;
  height: 18px;
  border: none;
  background-color: #ffffff;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  padding: 0;
  margin: auto;
  vertical-align: middle;
}

.variable-buttons {
  display:flex;
  justify-content: center;
}

/*! override some USWDS styles */
button:not([disabled]):not(.tab-button):focus {
  outline:0rem solid #ffffff;
  outline-offset:0rem;
  border: 1.5px solid #0b3d91;
}
li:not([disabled]):focus {
  outline:0rem solid #ffffff;
  outline-offset:0rem;
  border: 1.5px solid #0b3d91;
}
span:not([disabled]):focus {
  outline:0rem solid #ffffff;
  outline-offset:0rem;
  border: 1.5px solid #0b3d91;
}
input:not([disabled]):focus {
  outline:0px solid #0b3d91;
  outline-offset:0rem;
  border: 1.5px solid #0b3d91;
}
textarea:not([disabled]):focus {
  outline:0px solid #0b3d91;
  outline-offset:0rem;
  border: 1.5px solid #0b3d91;
}
select:not([disabled]):focus {
  outline:0px solid #0b3d91;
  outline-offset:0rem;
  border: 1.5px solid #0b3d91;
}

.usa-banner__header-text {
  font-size:12px;
}

.usa-banner__inner-eg {
  width: 100%;
  padding-left:1rem;
  padding-right:1rem;
  margin-left:auto;
  margin-right:auto;
  padding-left:1rem;
  padding-right:1rem;
  display:flex;
  flex-wrap:wrap;
  align-items:flex-start;
  justify-content: center;  /* horizontally center items */
  align-items: center;      /* vertically center items */
  text-align: center;       /* center text content */
}

.usa-banner__button-text {
  font-size:12px;
}

.usa-banner__guidance {
  font-size:12px;
}

.usa-media-block__body {
  font-size:16px;
}

button.tab-button:not([disabled]):focus {
  outline: 0rem solid #ffffff;
  outline-offset: 0rem;
  background-color: #ffffff;
  border-bottom: 3px solid #0b3d91;
}

.grid-col-1 {
  justify-content: center; 
  display: flex;
}

/* File Comparison Dialog Styles */
.comparison-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.file-selection-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.file-selection-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.file-selection-column label {
  font-weight: bold;
  margin-bottom: 5px;
}

.file-selection-column input[type="file"] {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #f9f9f9;
}

.file-name-display {
  font-size: 11px;
  color: #666;
  font-style: italic;
  min-height: 16px;
  padding: 2px 0;
}

.comparison-options {
  background-color: #f5f5f5;
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.comparison-options h4 {
  margin: 0 0 10px 0;
  font-weight: bold;
}

.comparison-options input[type="checkbox"] {
  margin-right: 8px;
}

.comparison-options label {
  margin-bottom: 5px;
  display: inline-block;
}

.comparison-results {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 15px;
  max-height: 400px;
  overflow-y: auto;
}

.comparison-results h4 {
  margin: 0 0 10px 0;
  font-weight: bold;
}

#comparisonOutput {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  white-space: pre-wrap;
  line-height: 1.4;
}

.diff-added {
  background-color: #d4edda;
  color: #155724;
  padding: 2px 4px;
  border-radius: 2px;
}

.diff-removed {
  background-color: #f8d7da;
  color: #721c24;
  padding: 2px 4px;
  border-radius: 2px;
}

.diff-modified {
  background-color: #fff3cd;
  color: #856404;
  padding: 2px 4px;
  border-radius: 2px;
}

.diff-section {
  margin-bottom: 15px;
  border-left: 3px solid #007bff;
  padding-left: 10px;
}

.diff-section-title {
  font-weight: bold;
  color: #007bff;
  margin-bottom: 5px;
}

#fileComparisonDialog {
  min-width: 850px;
  max-width: 90vw;
}
