.container {
  display: grid;
  grid-template-rows: 0.25fr 2fr 1fr;
  /* Left: 500px, Middle: 2/3 of remaining, Right: rest */
  gap: 6px;
  /* This adds space between your columns */
  height: 100%;
  overflow: hidden;
}


.data {
  display: flex;
  flex-direction: column;
  overflow-y: hidden;
  height: 100%;
}

.umap-container {
  margin: 6px 12px;
  height: 100%;
  overflow-y: hidden;
  min-height: 0;
}
.scatters .scatter canvas {
  background-color: #111;
}

.tab-tables {
  margin: 6px 12px;
  height: 100%;
  overflow-y: hidden;
  min-height: 0;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.summary {
  display: flex;
  flex-direction: column;
  justify-content: center;

  margin: 6px 12px;
  border: 1px solid lightgray;
  border-radius: 5px;
}

.heading {
  margin: 0;
  font-size: 1.17em;
  margin-block-start: 1em;
  margin-block-end: 1em;
  margin-inline-start: 0px;
  margin-inline-end: 0px;
  /* font-weight: bold; */
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.heading a {
  margin-left: 12px;
}

.scope-card {
  display: flex;
  flex-direction: column;
}

.scope-card .scope-selector {
  margin: 0 6px;
}

.umap-selectors {
  display: flex;
  flex-direction: row;
  justify-content: center;
  padding-bottom: 12px;
  gap: 12px;
}

/* SECOND ROW: UMAP */

.scatters {
  position: relative;
  border: 1px solid gray;
  border-radius: 5px;
  padding: 6px;
}

/* THIRD ROW: hovered data point */
.hovered-point {
  display: flex;
  flex-direction: column;
  padding: 6px;
}

.container .hovered-point .key {
  font-weight: bold;
}

.container .hovered-point .value {
  margin-left: 10px;
}


/* MIDDLE COLUMN */
.container .tab-tables {
  /* padding: 12px 0; */

}

/* SECOND ROW: Tabs */
.container .tab-tables {
  display: flex;
  flex-direction: column;
}

.container .tab-header {
  height: 32px;
  background-color: #f1f1f1;
  border: 1px solid #ccc;
  border-bottom: none;
  /* padding: 10px 20px; */
  cursor: pointer;
  transition: background-color 0.3s;
}

.container .tab-header button {
  height: 32px;
  display: inline-block;
  border: none;
  border-radius: 0;
  margin: 0;
  padding: 6px 24px;
}

.container .tab-header button:hover {
  background-color: #ddd;
  border-color: none;
}

.container .tab-header button:focus,
.container .tab-header button:focus-visible {
  outline: none;
}

.container .tab-header .tab-active {
  background-color: white;
  border-top: 2px solid seagreen;
  border-bottom: none;
  font-weight: bold;
}

@media (prefers-color-scheme: dark) {
  .container .tab-header {
    background-color: #333;
  }

  .container .tab-header button:hover {
    background-color: #333;
  }

  .container .tab-header .tab-active {
    background-color: #444;
  }
}

.tab-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  /* max-width: 650px; */
  /* width: 650px; */
  /* flex-grow: 1; */
  height: calc(100% - 32px);
  /* height: 100%; */
  overflow-y: auto;
  border: 1px solid lightgray;
  padding: 12px;
}

/* 
.container .tab-content table {
  height: 100%;
}
.container .tab-content table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}
.container .tab-content tbody {
  display: block;
  max-height: 100%;
  overflow-y: scroll;
} */
/* .container .tab-content tbody tr {
} */


/* .container .tab-active {
  color: seagreen;
  font-weight: bold;
  background-color: lightgray; 
} */


.tags-box {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-evenly;
}

.new-tag {
  margin: 6px 0;
}

.new-tag form {
  display: inline;
  width: 160px;
  border: 1px solid lightgray;
  padding: 7px;
}

.new-tag input {
  width: 60px;
}

/* Styling for nearest neighbors section */
.search-box input {
  /* height: 24px; */
  width: 350px;
}

.search-box select {
  width: 358px;

}

.tab-neighbors .deselect {
  display: inline-block;
  margin: 5px;
  width: 32px;
}


/* RIGHT COLUMN */
/* FIRST ROW: Selector */

/* SECOND ROW: Clusters */


.slide-bar {
  padding: 6px;
  /* height: 100%; */
}

@media screen and (max-width: 1024px) {
  .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    margin-top: 5px;
  }

  .data {
    width: 100%
  }

  .data,
  .cluster {
    height: auto;
    overflow-y: visible;
  }
  .hovered-point {
    height: 150px;
    max-width: 500px;
  }
}

@media screen and (max-width: 425px) {
  .container {
    width: 100%;
    padding: 5px;
  }

  .cluster {
    width: 100%;
    padding: 5px;
  }

  .summary {
    height: auto;
  }

  .tab-content {
    height: auto;
    margin-top: 40px;
  }

}