/* ----------------------------------
* Tabs
* ---------------------------------- */

[role="tablist"] {
  margin: 0;
  padding: 0;
  position: absolute;
  width: 100%;
  height: 100%;
  font-family: "Open Sans", Sans-serif;
}

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

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

[role="tablist"][data-items="3"] > [role="tab"] {
  width: calc(100% / 3);
}

[role="tablist"][data-items="4"] > [role="tab"] {
  width: calc(100% / 4);
}

[role="tablist"][data-items="5"] > [role="tab"] {
  width: calc(100% / 5);
}

[role="tablist"] > [role="tab"] > a {
  font-size: 1.3rem;
  text-decoration: none;
  line-height: 4rem;
  text-align: center;
  color: #FFF;
  float: left;
  width: 100%;
  background: #000 no-repeat center top;
  position: relative;
  color: #fff;
}

[role="tablist"] > [role="tab"] > a:active {
  background-color: #008aaa;
  color: #fff;
}

[role="tablist"] > [role="tab"][aria-disabled="true"] > a:active {
  background-color: #000;
}

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

[role="tablist"] > [role="tab"] > a.icon:after {
  content: '';
  width: 100%;
  height: 100%;
  position: absolute;
  background: none no-repeat center top;
  left: 0;
  z-index: 1;
}


/* Selected state */
[role="tablist"] > [role="tab"]:target > a {
  color: #62c6f5
}

[role="tablist"] > [role="tab"]:target > a.icon:after {
  background-position: center -4rem;
}

/* Disabled state */
[role="tablist"] > [role="tab"][aria-disabled="true"] > a {
  color: #4d4d4d;
}

[role="tablist"] > [role="tab"][aria-disabled="true"] > a.icon:after {
  background-position: center -8rem;
}

[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"] {
  z-index: 1;
  visibility: visible;
}

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

[role="tablist"].bottom  > [role="tab"] > a {
  position: relative;
  height: 4rem;
  top: calc(100% - 4rem);
}

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

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

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

[role="tablist"][data-type="filter"]:before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 0.2rem;
  background: url(tabs/images/ui/shadow.png) repeat-x left bottom;
}

[role="tablist"][data-type="filter"] > [role="tab"] {
  float: left;
  text-align: center;
  -moz-box-sizing: border-box;
  color: #737272;
  border-bottom: solid 1px #999;
}

[role="tablist"][data-type="filter"] > [role="tab"] > a {
  display: block;
  padding: 1.3rem 0.5rem;
  text-decoration: none;
  color: #737272;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background-color: transparent;
  font: bold 1.4rem/1em "Open Sans", Sans-serif;
  width: auto;
  float: none;
}

/* Selected state */
[role="tablist"][data-type="filter"] > [role="tab"]:target {
  background: #fff;
  border: solid 1px #999;
  border-top: none;
  color: #000;
}

[role="tablist"][data-type="filter"] > [role="tab"]:target > a {
  color: #000;
}

[role="tablist"][data-type="filter"] > [role="tab"] > a:active {
  background-color: #008aaa;
  color: #fff;
}

/* Bottom position */
[role="tablist"][data-type="filter"].bottom:before {
  bottom: 100%;
  top: auto;
  background-image: url(tabs/images/ui/shadow-revert.png);
}

[role="tablist"][data-type="filter"].bottom > [role="tab"] {
  border-bottom: none;
  border-top: solid 1px #999;
}
[role="tablist"][data-type="filter"].bottom > [role="tab"] > a {
  height: auto;
}
