/* ----------------------------------
* Tabs
* ---------------------------------- */
[role="tablist"] {
  margin: 0;
  padding: 0;
  position: absolute;
  width: 100%;
  height: 100%;
}

[role="tablist"] > [role="tab"] {
  list-style: none;
  margin: 0;
  padding: 0;
  float: left;
}

/* Items calcs */
[role="tablist"][data-items="2"] > [role="tab"] {
  width: 50%;
}

[role="tablist"][data-items="3"] > [role="tab"] {
  width: 33.33%;
}

[role="tablist"][data-items="4"] > [role="tab"] {
  width: 25%;
}

[role="tablist"][data-items="5"] > [role="tab"] {
  width: 20%;
}

[role="tablist"] > [role="tab"] > a {
  text-decoration: none;
  text-align: center;
  float: left;
  width: 100%;
  position: relative;
  background: #eceae9;
  border-bottom: 1px solid #dfdfdf;
  color: #a5a5a0;
  font-size: 1.4rem;
  height: 3.9rem;
  line-height: 3.9rem;
}

[role="tablist"] > [role="tab"] > a.icon {
  font-size: 0;
}

[role="tablist"] > [role="tab"] > a.icon:before {
  color: #a5a5a0;
  line-height: 3.9rem;
  margin-left: -1.5rem;
}

[role="tablist"] > [role="tab"] > a.icon:after {
  display: none;
}

[role="tablist"] > [role="tab"] > a:active {
  color: #003144;
  background: rgba(0,0,0,0.3);
}

[role="tablist"] > [role="tab"] > a.icon:active:before {
  color: #003144;
}

/* Disabled state */
[role="tablist"] > [role="tab"][aria-disabled="true"] > a,
[role="tablist"] > [role="tab"][aria-disabled="true"] > a:before {
  pointer-events: none;
  color: rgba(165,165,160,0.3);
}

/* Selected state */
[role="tablist"] > [role="tab"]:target > a,
[role="tablist"] > [role="tab"][aria-selected="true"] > a {
  color: #003144;
}
[role="tablist"] > [role="tab"]:target > a.icon:before,
[role="tablist"] > [role="tab"][aria-selected="true"] > a.icon:before {
  color: #003144;
}

[role="tablist"] [role="tabpanel"] {
  position: absolute;
  top: 4rem;
  left: 0;
  visibility: hidden;
  width: 100%;
  height: calc(100% - 4rem);
  z-index: 10;
  display: block;
  overflow: auto;
}

[role="tablist"] :target [role="tabpanel"],
[role="tablist"] [aria-selected="true"] [role="tabpanel"] {
  z-index: 1;
  visibility: visible;
}

/* Position bottom */
[role="tablist"].bottom > [role="tab"] {
  height: 100%;
}

[role="tablist"].bottom  > [role="tab"] > a {
  position: relative;
  height: 3.9rem;
  top: calc(100% - 4rem);
  border-top: 1px solid #dfdfdf;
  border-bottom: none;
}

[role="tablist"].bottom [role="tabpanel"] {
  top: 0;
}

/* ----------------------------------
 * Filters
 * ---------------------------------- */

[role="tablist"][data-type="filter"] {
  display: inline-block;
  width: 100%;
  list-style: none;
  padding: 0;
  margin: -0.4rem 0 0 0;
  position: relative;
  height: 4rem;
}

[role="tablist"][data-type="filter"] > [role="tab"] {
  float: left;
  text-align: center;
  -moz-box-sizing: border-box;
  color: #737272;
  border-top: 0.4rem solid transparent;
  border-left: none;
}

[role="tablist"][data-type="filter"] > [role="tab"] > a {
  display: block;
  padding: 0 0.5rem;
  text-decoration: none;
  color: #737272;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #eceae9;
  font-weight: normal;
  font-size: 1.6rem;
  height: 3.4rem;
  line-height: 3.6rem;
  width: auto;
  float: none;
  border-bottom: solid 0.1rem #dfdfdf;
  border-left: solid 0.1rem #dfdfdf;
}

[role="tablist"][data-type="filter"] > [role="tab"]:first-child > a {
  border-left: none;
}

/* Selected state */
[role="tablist"][data-type="filter"] > [role="tab"]:target,
[role="tablist"][data-type="filter"] > [role="tab"][aria-selected="true"] {
  border-top-color: #ff6633;
}

[role="tablist"][data-type="filter"] > [role="tab"]:target > a,
[role="tablist"][data-type="filter"] > [role="tab"][aria-selected="true"] > a {
  color: #000;
  font-weight: 500;
  background: #f1f3f2;
  border-bottom: solid 0.1rem #f1f3f2;
}

[role="tablist"][data-type="filter"] > [role="tab"] > a:active {
  background: rgba(0,0,0,0.3);
}

