/*
Adapted from https://css-tricks.com/transformer-tabs/
*/

.tabs-container > section {
  display: none; /* Hide sections by default */
  padding: 1rem;
}
.tabs-container > section.active {
  display: block; /* Display active section */
}

.tabs ul {
  list-style: none;
  padding: 0;
  margin: 0;
  border-bottom: 3px solid dimgray;
}
.tabs li {
  display: inline-block;
  padding: 0;
  vertical-align: bottom;
}
.tabs a {
  display: inline-block;
  border: 1px solid dimgray;
  border-radius: 6px 6px 0 0;
  border-bottom-color: transparent;
  text-decoration: none;
  padding: 0.5rem;
}
.tabs a.active {
  border-bottom: 3px solid white;
  position: relative;
  bottom: -3px;
}

/* Switch to accordion menu on small screens */
@media (max-width: 399px) {
  .tabs ul {
    border-bottom: 3px solid transparent;
    overflow: hidden;
    position: relative;
  }
  .tabs ul.open {
    border-bottom-color: dimgray;
  }
  .tabs ul::after {
    content: "☰"; /* "Three Line Menu Navicon" shows up */
    position: absolute;
    top: 11px;
    right: 15px;
    z-index: 2;
    pointer-events: none;
  }
  .tabs li {
    display: block; /* One link per "row" */
  }
  .tabs a {
    position: absolute; /* Stack links on top of each other */
    top: 3px;
    left: 0;
    width: 100%;
    height: 100%;
  }
  .tabs a.active {
    z-index: 1; /* Active tab is on top */
    background: white;
  }
  .tabs ul.open a {
    position: relative;
    display: block;
  }
  .tabs ul.open a.active {
    border-bottom-color: white
  }
}
