/* ==========================================================
 * tab.scss
 * Tab styles
 *
 * Author: Yann Gouffon, yann@antistatique.net
 * Date:   2014-04-30 15:31:37
 *
 * Copyright 2014 Federal Chancellery of Switzerland
 * Licensed under MIT
 =========================================================== */

ul.nav-tabs {
  margin-top: 0;
}

.nav-tabs > li {
  margin-left: 0;

  > a,
  > a:hover,
  > a:focus,
  &.active > a,
  &:active > a:hover,
  &:active > a:focus {
    border-radius: 0;
    box-sizing: border-box;
    background-color: $smoke;
    color: $empress;
    border: 1px solid $silver;
    margin: 0;
    padding-top: 10px;
  }

  + li {
    > a {
      border-left-width: 0 !important;
    }
  }

  > a:hover,
  > a:focus,
  &.active > a,
  &.active > a:hover,
  &.active > a:focus {
    color: $venetian-red;
    background-color: $smoke;

    &::before {
      content: '';
      display: block;
      height: 3px;

      position: absolute;
      top: -1px;
      left: -1px;
      right: -1px;

      background-color: $venetian-red;
    }
  }

  &.active > a,
  &.active > a:hover,
  &.active > a:focus {
    background-color: $white;
    border-bottom-color: transparent;
    box-sizing: padding-box;
  }
}


.nav-tabs-alphabet li {
  width: 3.5% !important;

  a {
    padding-right: 0;
    padding-left: 0;
    text-align: center;
  }
}


.tab-content {
  padding: 20px 0;

  .tab-content {
    border: 1px solid $silver;
    border-top-color: transparent;
    padding: 20px;
  }

  &.tab-border {
    border-right: 1px solid $silver;
    border-left: 1px solid $silver;
    border-bottom: 1px solid $silver;
    padding-left: 1em;
    padding-right: 1em;
  }
}


.collapsify {
  a[data-toggle="collapse"] {
    border-top: 3px solid $venetian-red;
    border-bottom: 1px solid $white;
    border-right: 1px solid $silver;
    border-left: 1px solid $silver;
    font-size: 16px;
    padding: 12px 25px;
    color: $black;
    transition: all 0.2s;

    &:before {
      color: $black;
    }
    &:hover {
      text-decoration: none;
    }
    &:first-child {
      border-top: 3px solid $venetian-red;
    }
  }

  a[data-toggle="collapse"].collapse-closed {
    border-top: 0px solid $white;
    border-bottom: 1px solid $silver;
    color: $empress;

    &:before {
      content: get-font-icon('greater');
      color: $empress;
    }

    &:first-child {
      border-top: 1px solid $silver;
    }
  }

  div[class*="col"],
  .collapse {
    border-bottom: 1px solid $silver;
    border-right: 1px solid $silver;
    border-left: 1px solid $silver;
    margin: 0 !important;
    padding: 0 20px;
    transition: all 0.2s;
  }

  .collapse.in {
    padding-bottom: 20px;
  }
}
