/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

@import url("chrome://global/skin/design-system/text-and-typography.css");

h1 {
  margin: 3em 0 1em;
}

.certificate-tabs {
  display: flex;
  text-align: center;
  border: 1px solid var(--card-border-color);
  border-radius: var(--border-radius-small) var(--border-radius-small) 0 0;
  border-bottom: 1px solid var(--card-border-color);
  box-shadow: var(--card-box-shadow);
}

.info-groups {
  display: none;
  outline: none;
  background-color: var(--background-color-box);
  box-shadow: var(--card-box-shadow);
  margin-bottom: 2em;
  border: 1px solid var(--card-border-color);
  border-top: none;
  border-radius: var(--border-radius-small) var(--border-radius-small) 0 0;
}

.info-groups.selected {
  display: block;
}

.tab {
  margin: 0;
  border-radius: 0;
  padding: 18px;
  padding-bottom: 15px; /* compensate for border-bottom below */
  border: none;
  border-bottom: 3px solid transparent;
  background-color: var(--background-color-box);
  color: var(--text-color);
  flex: 1 1 auto;
  text-overflow: ellipsis;
  overflow: hidden;
  font-size: 1.1em;
}

/* .tab can be LTR (by `dir="auto"`) for `about:certificate?cert=`
   pages, so set the border-radius according to the parent's direction. */
.certificate-tabs:dir(rtl) > .tab:first-of-type,
.certificate-tabs:dir(ltr) > .tab:last-of-type {
  border-top-right-radius: 4px;
}

.certificate-tabs:dir(ltr) > .tab:first-of-type,
.certificate-tabs:dir(rtl) > .tab:last-of-type {
  border-top-left-radius: 4px;
}

.certificate-tab:focus-visible {
  z-index: 1;
  outline: var(--focus-outline);
}

.tab:hover {
  border-bottom-color: var(--card-border-color);
}

.tab.selected {
  border-bottom-color: currentColor;
  color: var(--color-accent-primary);
  text-overflow: unset;
  overflow: visible;
}
