.salary-map {
  padding: 1rem;
  font-size: 1rem;
  font-family: "Prompt", sans-serif;
  color: var(--ui-color-light);
  background-color: var(--brand-color-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-flow: column;
}

/* Header */
.salary-map .salary-map-header {
  max-width: 1440px;
  width: 100%;
  display: flex;
  flex-flow: column;
}

.salary-map .salary-map-search h1 {
  width: 60%;
  margin-top: 1rem;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.08rem;
  line-height: 1.25rem;
}

.salary-map .state-search-container {
  margin-top: 1rem;
  padding: 0.5rem 1.5rem;
  position: relative;
  display: flex;
  border: 1px solid var(--ui-color-light);
  border-radius: 0.5rem;
  justify-content: space-between;
}

.salary-map .visually-hidden {
  display: none;
}

.salary-map .salary-map-search .state-search-container input {
  width: 100%;
  font-size: 1rem;
  font-family: "Prompt", sans-serif;
  color: var(--ui-color-light);
  background: transparent;
  border: none;
}

.salary-map .salary-map-search .state-search-container input:focus {
  outline: none;
  color: var(--ui-color-light);
}

.salary-map .salary-map-search .state-search-container input[type="text"] {
  caret-color: var(--ui-color-light);
}

.salary-map .state-search-container input::placeholder {
  color: var(--ui-color-off-light);
  opacity: 0.75;
}

.salary-map .state-search-container img {
  opacity: 0.75;
}

.salary-map #suggestions {
  top: 41px;
  left: 0;
  list-style: none;
  padding: 0;
  margin: 0;
  position: absolute;
  width: 100%;
  border-radius: 0 0 4px 4px;
  max-height: 150px;
  overflow-y: auto;
  background-color: var(--brand-color-medium);
  z-index: 1000;
}

.salary-map #suggestions li {
  padding: 10px 24px;
  cursor: pointer;
  color: var(--ui-color-light);
}

.salary-map #suggestions li:hover,
#suggestions li.autocomplete-active {
  background-color: var(--brand-color-light);
}

.salary-map .state-search-container button {
  display: flex;
  align-content: center;
  justify-content: center;
}

/* Map visualization */
.salary-map .salary-map-view {
  margin-top: 1rem;
  font-size: 1rem;
  display: flex;
  gap: 2rem;
  color: var(--ui-color-off-light);
}

.salary-map .salary-map-view button {
  color: var(--ui-color-off-light);
  opacity: 0.5;
}

.salary-map .salary-map-view button.view {
  font-weight: 500;
  font-style: italic;
  cursor: pointer;
}

.salary-map .salary-map-view button.view-selected {
  font-weight: 600;
  opacity: 1;
  border-bottom: 1px solid var(--ui-color-light);
}

.salary-map .salary-map-content {
  max-width: 1440px;
  width: 100%;
  display: flex;
  flex-flow: column-reverse;
  gap: 2rem;
}

.salary-map .salary-map-description {
  margin-top: -2rem;
}

/* Visualization */
/* .salary-map .salary-map-visualization {
  height: 30rem;
} */

.salary-map .salary-map-visualization .visualization-view {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.salary-map .salary-map-visualization .visualization-view.list-view {
  margin: 2rem 0;
}

/* Map */
#map-view {
  border: 1px solid rgba(255, 255, 255, .2);
}

/* List */
.salary-map .salary-map-visualization .list-view {
  background-color: var(--brand-color-dark);
  display: flex;
  flex-flow: column;
  align-items: flex-end;
}

.salary-map .salary-map-visualization .list-header {
  width: min-content;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}

.salary-map .salary-map-visualization .list-view .list-sort {
  width: max-content;
  color: var(--ui-color-light);
}

.salary-map .salary-map-visualization .sort-select {
  margin-left: 5px;
  padding: 5px;
  background-color: var(--brand-color-dark);
  color: var(--ui-color-light);
  border: 1px solid white;
  border-radius: 4px;
}

.salary-map .nasm-list-view {
  padding-bottom: 1rem;
  width: 100%;
  max-height: 60vh;
  border-radius: 0.5rem;
  overflow: scroll;
  scroll-behavior: smooth;
}

.table-scroll-container {
  max-height: 400px; /* Adjust height as needed */
  overflow: scroll;
  margin-bottom: 1rem;
}

/* Custom scrollbar styles for the nasm-list-view div */
.salary-map .nasm-list-view::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

.salary-map .nasm-list-view::-webkit-scrollbar-thumb {
  background-color: var(--brand-color-highlight);
  background-clip: padding-box;
}

.salary-map .nasm-list-view::-webkit-scrollbar-track {
  border-right: 2px solid var(--ui-color-mid-light);
  border-bottom: 2px solid var(--ui-color-mid-light);
}

.salary-map .salary-map-visualization .list-view .list-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 0.5rem;
  overflow: hidden;
}

.salary-map .salary-map-visualization .list-view .list-th {
  width: 1px;
  height: 1px;
  position: absolute;
  left: -9999px;
  overflow: hidden;
}

.salary-map .salary-map-visualization .list-view .list-td {
  width: 21rem;
  padding: 10px 40px;
  color: var(--ui-color-light);
}

.salary-map .salary-map-visualization .list-view .list-button {
  margin-right: 10px;
  margin-bottom: 10px;
}

.salary-map .salary-map-visualization .list-view .list-announcement {
  position: absolute;
  left: -9999px;
}

/* Description */
.salary-map-description-container {
  display: flex;
  gap: 0.75rem;
}

.salary-map-additional-details {
  margin-bottom: 0.5rem;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.08rem;
}

.salary-map-description-left,
.salary-map-description-right {
  width: 50%;
}

.salary-map-title {
  text-transform: uppercase;
}

.salary-map .salary-map-description h2 {
  width: 20rem;
  margin-top: 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.08rem;
  line-height: 1.25rem;
  color: var(--brand-color-highlight);
}

.salary-map h2.salary-map-salary {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.salary-map .salary-map-divider {
  margin: 1rem 0 2rem;
  border-bottom: 1px solid #f5f5f590;
}

.salary-map .salary-map-description h3 {
  height: 3rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.4rem;
  letter-spacing: 0.08rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.salary-map .salary-map-description h3 svg {
  max-width: 2.5rem;
}

.left-description span, .right-description span {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.4rem;
  letter-spacing: 0.08rem;
}

.salary-map .salary-map-description h3:not(:first-of-type) {
  margin-top: 2rem;
}

.salary-map .salary-map-description p {
  line-height: 1.5rem;
  opacity: 0.9;
}

.salary-map .salary-map-description .nasm-primary-btn {
  margin: 2rem 0 3rem;
}

/* Vis */

.salary-map .salary-map-visualization {
  width: 100%;
  height: 450px;
  margin-bottom: 2rem;
  position: relative;
}

.salary-map #heat-map,
.salary-map #chart-div {
  width: 100%;
  height: 100%;
}

/* Styling for the table */
.salary-map .list-table {
  width: 100%;
  border-collapse: collapse;
}

/* Style for table cells */
.salary-map .list-td,
.list-th {
  padding: 10px;
  text-align: left;
  width: calc(
    100% / 3
  ); /* Three columns in total (each contains State-Salary pair) */
}

/* Hide the table header visually */
.salary-map thead {
  display: none;
}

/* Table rows are flex containers */
.salary-map tbody tr {
  display: flex;
}

/* Styling for the selected state-salary cell */
.salary-map .list-td.selected {
  border: 2px solid var(--brand-color-highlight); /* Optional: add a border to make it more visible */
}

/* Alternating row colors with CSS */
.salary-map tbody tr:nth-child(odd) {
  background-color: #1d5a94; /* First background color */
}

.salary-map tbody tr:nth-child(even) {
  background-color: #2471b7; /* Second background color */
}

.salary-map .list-td {
  position: relative; /* Required for positioning the pseudo-element */
  padding: 10px;
}

.salary-map .list-td::after {
  content: "";
  position: absolute;
  top: 10px; /* Cut off 3px from the top */
  bottom: 10px; /* Cut off 3px from the bottom */
  right: 0;
  width: 2px;
  background-color: #ccc; /* Color of the border */
}

.salary-map .list-td:last-child::after {
  display: none; /* Remove the border on the last cell in the row */
}

.salary-map .list-view {
  width: 100%;
}

.salary-map .list-header {
  margin-bottom: 10px;
}

.salary-map .list-sort {
  margin-right: 10px;
}

.salary-map .sort-select {
  padding: 5px;
  font-size: 14px;
}

.salary-map .list-table {
  width: 100%;
  border-collapse: collapse;
}

.salary-map .list-th,
.list-td {
  padding: 10px;
  text-align: left;
}

.salary-map .list-td {
  display: flex;
  justify-content: space-between; /* Push the state and salary to opposite ends */
  padding: 10px;
}

.salary-map .state-name {
  text-align: left; /* Align state to the left */
}

.salary-map .salary-value {
  text-align: right; /* Align salary to the right */
}

.salary-map .list-table {
  width: 100%;
  border-collapse: collapse;
}

.salary-map .list-th,
.list-td {
  padding: 10px;
  text-align: left;
}

/* Tablet Portrait */
@media only screen and (min-width: 768px) {
  .salary-map .salary-map-visualization {
    height: 700px;
  }

  .salary-map .salary-map-visualization .visualization-view.list-view {
    margin: 0;
  }
}

/* Tablet Landscape */
@media only screen and (min-width: 1024px) {
  .salary-map .salary-map-header {
    padding-bottom: 1rem;
    flex-flow: row;
    justify-content: space-between;
    border-bottom: 1px solid #f5f5f590;
  }

  .salary-map .salary-map-search h1 {
    width: 100%;
  }
  .salary-map .salary-map-search {
    width: 29.5rem;
  }

  .salary-map .salary-map-search h4 {
    width: 100%;
  }
  .salary-map .salary-map-view {
    margin-right: 4rem;
    align-items: center;
  }
  .salary-map .salary-map-content {
    flex-flow: row;
  }
  .salary-map .salary-map-description {
    margin-top: 1rem;
    max-width: 20rem;
    gap: 2rem;
  }

  .salary-map .salary-map-visualization {
    height: 730px;
    margin-top: 1.5rem;
  }
}

/* Desktop */
@media only screen and (min-width: 1440px) {
  .salary-map .salary-map-visualization {
    margin-top: 2rem;
  }

  .salary-map .nasm-list-view {
    overflow: hidden;
    overflow-y: scroll;
  }
}

.nasm-chart-color-tip {
  margin: 1rem 0;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  gap: 1rem;

}

.chart-tip-left,
.chart-tip-right {
  display: flex;
  gap: 1rem;
}

.nasm-chart-color-tip p {
  font-family: "Prompt", sans-serif;
  font-size: 1rem;
}

.tip-color-left,
.tip-color-right {
  display: block;
  width: 1.5rem;
  height: 1.5rem;
}

.tip-color-left {
  background-color: #2471B7;
}

.tip-color-right {
  background-color: #1D5A94;
}
/* Tablet Portrait */
@media only screen and (min-width: 768px) {
}

/* Tablet Landscape */
@media only screen and (min-width: 1024px) {
  .chart-color-tip {
    justify-content: flex-end;
  }
}

/* Desktop */
@media only screen and (min-width: 1440px) {
}
