/**
 * @file
 * Styles for vertical tabs.
 */

.vertical-tabs {
  position: relative;
  margin: 10px 0;
  border: 1px solid #bdbdbd;
  border-radius: 4px;
  background: #e6e5e1;
}

.vertical-tabs__menu {
  float: left; /* LTR */
  width: 240px;
  margin: 0 -100% -1px 0; /* LTR */
  padding: 0;
  list-style-type: none;
  border-bottom: 1px solid #ccc;
  line-height: 1;
  [dir="rtl"] & {
    float: right;
    margin: 0 0 -1px -100%;
  }
}

.vertical-tabs__menu-item {
  position: relative;
  &.is-selected {
    z-index: 1;
    overflow-x: hidden;
    width: 100%;
    border-right: 1px solid #fcfcfa; /* LTR */
    border-bottom: 1px solid #b3b2ad;
    box-shadow: 0 5px 5px -5px hsl(0, 0%, 0%, 0.3);
  }
  &.last {
    border-bottom: none;
  }
  &.first a {
    border-top-left-radius: 4px; /* LTR */
    [dir="rtl"] & {
      border-top-left-radius: 0;
      border-top-right-radius: 4px;
    }
  }
  [dir="rtl"] &.is-selected {
    border-right: none;
    border-left: 1px solid #fcfcfa;
  }
  &:focus,
  &:active {
    z-index: 2;
  }
  & a {
    display: block;
    padding: 10px 15px 15px;
    text-decoration: none;
    border-bottom: 1px solid #b3b2ad;
    background-color: #f5f5ef;
    text-shadow: 0 1px hsl(0, 0%, 100%, 0.6);
  }
  &:last-child a {
    border-bottom: 0;
  }
  &.is-selected a,
  & a:hover,
  & a:focus {
    background: #fcfcfa;
    text-shadow: none;
  }
  & a:focus {
    outline: none;
    & .vertical-tabs__menu-item-title {
      text-decoration: underline;
    }
  }
  & a:active .vertical-tabs__menu-item-title,
  &.is-selected a:focus .vertical-tabs__menu-item-title {
    text-decoration: none;
  }
  &.is-selected a {
    padding-left: 11px; /* LTR */
    text-decoration: none;
    color: #004f80;
    border-bottom: none;
    [dir="rtl"] & {
      padding-right: 11px;
      padding-left: 15px;
    }
    &:hover,
    &:focus {
      color: #007ecc;
      background: #fcfcfa;
    }
    &:focus {
      border-left: 4px solid #007ecc;
    }
  }
}

[data-vertical-tabs-panes] {
  background-color: #fcfcfa;
}

.vertical-tabs__panes {
  margin: 0 0 0 240px; /* LTR */
  padding: 10px 15px 10px 15px;
  border-left: 1px solid #a6a5a1; /* LTR */
  border-top-right-radius: 4px; /* LTR */
  border-bottom-right-radius: 4px; /* LTR */
  [dir="rtl"] & {
    margin: 0 240px 0 0;
    border-right: 1px solid #a6a5a1;
    border-left: none;
    border-radius: 4px 0 0 4px;
  }
  &::after {
    display: table;
    clear: both;
    content: "";
  }
}

.vertical-tabs__pane {
  margin: 0;
  padding: 0;
  color: #595959;
  border: 0;
}

.vertical-tabs__menu-item-summary {
  display: block;
  padding-top: 0.4em;
  color: #666;
}

.vertical-tabs__pane > summary {
  display: none;
}
