@import 'variables';

/**
 * code-group
 */
.code-group-nav {
  margin-top: 0.85rem;

  // 2 * margin + border-radius of <pre> tag
  margin-bottom: calc(-1.7rem - 6px);
  padding-top: 10px;
  padding-bottom: calc(1.7rem - 6px);
  padding-left: 10px;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;

  background-color: var(--c-code-group-tab-bg);

  @media (max-width: $MQMobileNarrow) {
    margin-right: -1.5rem;
    margin-left: -1.5rem;
    border-radius: 0;
  }
}

.code-group-nav-tab {
  padding: 5px;
  border: 0;

  background-color: transparent;
  color: var(--c-code-group-tab-title);

  font-weight: 600;
  font-size: 0.85em;
  line-height: 1.4;

  cursor: pointer;

  &:focus {
    outline: none;
  }

  &:focus-visible {
    outline: 1px solid var(--c-code-group-tab-outline);
  }

  &.active {
    border-bottom: var(--c-code-group-tab-active-border) 1px solid;
  }
}

/**
 * code-group-item
 */
.code-group-item {
  display: none;

  &.active {
    display: block;
  }

  > pre {
    background-color: #ffa500;
  }
}
