%border-top-tabs {
  border-bottom: 1px solid #ffffff !important; 
  box-shadow: 0px 1px 0px 0px #dfdfdf; 
}

%tab {
  @include bitmap-border-2px($url-tab-border);
  @include reset-text-styles;
  background-color: $color-window-background !important;
  padding: 0 5px 5px;
}

%tab-container {
  @include bitmap-border-2px($url-tab-container-border);
  background-color: $color-window-background !important;
  padding: 10px;
}

.tabnav-tab,
.UnderlineNav-item,
.UnderlineNav-item.selected,
.pagehead-tabs-item,
.select-menu-tabs a,
.reponav-item {
  @extend %tab;
  z-index: 1;
}

.tabnav ~ .is-visible,
.UnderlineNav + .position-relative,
.tabnav + .gutter,
.tabnav + .follow-list,
.tabnav + .blankslate,
.timeline-comment .write-content,
.timeline-comment .preview-content,
.repository-content {
  @extend %tab-container;
}

.orghead {
  background-color: inherit;
  @include reset-text-styles;

  .orgnav {
    bottom: 3px;
    top: unset;
  }

  .pagehead-tabs-item.selected {
    top: 0;
  }

  .pagehead-tabs-item {
    top: 3px;
    position: relative;    
  }
}

.orghead,
.news .UnderlineNav {
  @extend %border-top-tabs;
}

.select-menu-tabs,
.application-main .UnderlineNav
{  
  @extend %border-top-tabs;
  margin-bottom: -1px;
}

.UnderlineNav.is-stuck {
  padding-top: 10px;
}

.UnderlineNav + .position-relative {
  border-top: none !important;
}

.tabnav,
.timeline-new-comment .comment-form-head {
  margin-bottom: 0;
}

.UnderlineNav-item,
.tabnav-tab,
.tabnav-pr .tabnav-tab,
.select-menu-tabs a,
.reponav-item
{
  border-width: 2px;
  position: relative;
  bottom: 1px;
  color: $color-text;
  text-decoration: none !important;
  padding: 0 5px 5px;
}

.UnderlineNav-item.selected,
.tabnav-tab.selected,
.pagehead-tabs-item.selected,
.select-menu-tabs a.selected,
.reponav-item.selected {
  bottom: 4px;
  height: 35px;
  margin-bottom: -5px;
}

.gutter,
.select-menu-tabs ul,
.tabnav-tabs {
  display: flex;
  position: relative;
  z-index: 1;
}

.gutter {
  padding: 5px !important;
}

.UnderlineNav-item {
  margin-right: 0 !important;
  text-decoration: none !important;
}

.user-profile-nav {
  border-bottom: none;
  background-color: $color-window-background;
}

.UnderlineNav + .position-relative > .mt-4 {
  margin-top: 0 !important;
  padding-top: 24px;
}

.news .UnderlineNav {
  padding-top: 16px;
}
