.command-container {
  display: grid;
  gap: 0.3em;
}

.command-container h4 {
  font-size: var(--font-size-xx-small);
  font-weight: 600;
  letter-spacing: var(--letter-spacing);
  margin-top: -0.325em;
}



.command {
  background: var(--color-grey-light);
  border: 1px solid var(--color-grey);
  border-radius: 0.4em;
  display: block;
  font-family: var(--font-family-monaspace-neon);
  font-feature-settings: normal;
  font-size: var(--font-size-xxx-small);
  font-style: normal;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.4em;
  max-width: 100%;
  overflow: hidden;
  position: relative;
  width: min(100%, 44em);
}

.command pre {
  display: block;
  -ms-overflow-style: none;
  overflow-x: auto;
  padding: 0.7em 1.2em;
  scrollbar-width: none;
  white-space: pre;
}

.command pre code {
  background: none;
  border: none;
  border-radius: initial;
  display: initial;
  font-size: inherit;
  padding: 0;
}

.command pre::-webkit-scrollbar {
  display: none;
}

.command button {
  background: url('../images/general/icon-copy.svg') center center / 1em auto no-repeat;
  cursor: pointer;
  display: none;
  height: 2.8em;
  opacity: 0.3;
  position: absolute;
  right: 0;
  top: 0;
  width: 2.8em;
  z-index: 1;
}

.command:before,
.command:after {
  content: '';
  height: 100%;
  pointer-events: none;
  position: absolute;
  top: 0;
  width: 1.2em;
}

.command:before {
  background: linear-gradient(
    90deg,
    transparent,
    var(--color-grey-light)
  );
  right: 0;
}

.command:after {
  background: linear-gradient(
    -90deg,
    transparent,
    var(--color-grey-light)
  );
  left: 0;
}



@media(hover: hover) {

  .command.command--copy {
    transition: transform var(--transition);
    will-change: transform;
  }

  .command.command--copy button {
    transition: opacity var(--transition);
  }

  .command.command--copy button:focus,
  .command.command--copy button:hover {
    opacity: 1;
  }

  .command.command--copy:has(button:active) {
    transform: scale(1.01);
  }

}



@media(min-width: 64em) {

  .command.command--copy {
    transition: transform var(--transition);
    will-change: transform;
  }

  .command.command--copy pre {
    padding-right: 2.8em;
  }

  .command.command--copy button {
    display: block;
  }

  .command.command--copy:before {
    background: linear-gradient(
      90deg,
      transparent,
      var(--color-grey-light) 30%
    );
    width: 4em;
  }

}
