/*
 * Companion styles for the AsciiDoc tabs extension (asciidoc-extensions/tabs.js),
 * paired with ui/supplemental/js/tabs.js.
 *
 * Selectors/structure are the canonical tabs-block `styles.css` (OpenDevise /
 * Dan Allen, MIT), whose example palette is stark black/white. Here the colors
 * are mapped onto the ownCloud brand palette from owncloud.css (--oc-navy) and
 * the stock Antora UI neutrals so tabs read as part of the branded theme.
 */
.tabs ul {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0 -0.25rem 0 0;
  padding: 0;
}

.tabs li {
  align-items: center;
  border: 1px solid #dbdbdb;
  border-bottom: 0;
  cursor: pointer;
  display: flex;
  font-weight: bold;
  height: 2.5rem;
  line-height: 1;
  margin-right: 0.25rem;
  padding: 0 1.5rem;
  position: relative;
}

.tabs.ulist li {
  margin-bottom: 0;
}

.tabs li + li {
  margin-top: 0;
}

/* inactive tabs: brand navy, so the active tab reads as "lifted" */
.tabset.is-loading .tabs li:not(:first-child),
.tabset:not(.is-loading) .tabs li:not(.is-active) {
  background-color: var(--oc-navy, #041e42);
  color: #fff;
}

/* the accent line under the active tab that hides the panel border seam */
.tabset.is-loading .tabs li:first-child::after,
.tabs li.is-active::after {
  background-color: #fff;
  content: "";
  display: block;
  height: 3px; /* Chrome doesn't always paint the line accurately, so add a little extra */
  position: absolute;
  bottom: -1.5px;
  left: 0;
  right: 0;
}

.tabset > .content {
  border: 1px solid #dbdbdb;
  padding: 1.25rem;
}

.tabset.is-loading .tab-pane:not(:first-child),
.tabset:not(.is-loading) .tab-pane:not(.is-active) {
  display: none;
}

.tab-pane > :first-child {
  margin-top: 0;
}
