/* This file handles all "navbar-like" content tabs, such as the tabs in "Manage My Favourites"*/

ul.source_item_tabs {
  list-style-type: none;

  margin: 20px 0 0;
  padding: 0;

  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  border: 1px solid var(--polaris_blue);
  background-color: gainsboro;

  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: stretch;
  flex: 0 0 40px;
  height: 40px;
  width: 100%;

  @media (max-width: 600px) {
    display: grid;
    height: auto;
    justify-content: normal;
  }
}

/* specific fix for 'View all Maps' page, since there are so many tabs on that page*/
/* TODO: use bootstrap to enforce global styling instead of needing fixes for specific pages*/
#maplist_container ul.source_item_tabs {
  border-radius: 5px;

  @media (max-width: 900px) {
    display: grid;
    height: auto;
    justify-content: normal;
  }
}

ul.benchmark_tabs, ul.predifened_markets_tabs, ul.compare_profiles_tabs, ul.maplist_tabs, ul#ranking_variable_tabs {
  margin-top: 0px;
}


li.source_tab.active {
  background-color: var(--polaris_blue);

  a {
    color: white;
  }
}

ul.source_item_tabs li.source_tab {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition-duration: 0.3s;
  transition-property: background-color;
  transition-timing-function: ease-in-out;

  border-bottom: 1px solid var(--polaris_blue);
  border-right: none;

  @media (min-width: 601px) {
    border-bottom: none;
    border-right: 1px solid var(--polaris_blue);
  }
}

/* see above comment about specific fixes for 'View All Maps' page*/
/* TODO: use bootstrap to enforce global styling instead of needing fixes for specific pages*/
#maplist_container ul.source_item_tabs li.source_tab {
  border-bottom: 1px solid var(--polaris_blue);
  border-right: none;
  width: 100%;

  @media (min-width: 900px) {
    border-bottom: none;
    border-right: 1px solid var(--polaris_blue);
  }
}

ul.source_item_tabs li.source_tab:last-child {
  border-right: none;
  border-bottom: none;

  @media (min-width: 601px) {
    border-bottom: none;
    border-right: none;
  }
}

#maplist_container ul.source_item_tabs li.source_tab:last-child {
  border-bottom: none;

  @media (min-width: 900px) {
    border-bottom: none;
    border-right: none;
  }
}

ul.tradearea_tabs li.source_tab, ul.mapping_upload_tabs li.source_tab {
  font-size: 0.9em;
}

/* Style the links inside the list items */
li.source_tab a {
  overflow: hidden;
  box-sizing: border-box;
  text-align: center;
  color: black;
  font-weight: bold;
  text-decoration: none;
  line-height: 120%;
  padding: 0px 5px;

  transition-duration: 0.3s;
  transition-property: color;
  transition-timing-function: ease-in-out;

  /* the use of webkit-box here is because we need to clamp to 2 lines of text in order to handle overflow.*/
  /* this only works because source_item_tabs (container) has a fixed height, and because font-size*/
  /* does not change drastically. This lets us clamp to 2 lines of text and handle overflow*/
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


li.source_tab:not(.active):hover {
  background-color: #c5c5c5;
}
