.command {
  background: var(--color-background-storm);
  border-radius: 0.4em;
  display: block;
  max-width: 100%;
  overflow: hidden;
  position: relative;
}

.command pre {
  color: var(--color-turquoise);
  display: block;
  line-height: 1.4em;
  -ms-overflow-style: none;
  overflow-x: auto;
  padding: 0.7em 1.2em;
  scrollbar-width: none;
  white-space: pre;
}

.command pre code {
  line-height: 1;
}

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

.command button {
  display: none;
}

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

.command:before {
  background: linear-gradient(
    90deg,
    rgba(var(--rgb-background-storm), 0) 0,
    var(--color-background-storm) 100%
  );
  left: calc(100% - 1.2em);
}

.command:after {
  background: linear-gradient(
    -90deg,
    rgba(var(--rgb-background-storm), 0) 0,
    var(--color-background-storm) 100%
  );
  right: calc(100% - 1.2em);
}

@media(hover: hover) {

  .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 {
    background: url(../images/copy.svg) center center / 1.2em 1.2em no-repeat;
    cursor: pointer;
    display: block;
    height: 2.8em;
    opacity: 0.25;
    position: absolute;
    right: 0;
    top: 0;
    transition: opacity var(--transition);
    width: 2.8em;
    z-index: 1;
  }

  .command.command--copy:before {
    background: linear-gradient(
      90deg,
      rgba(var(--rgb-background-storm), 0) 0,
      var(--color-background-storm) 33%
    );
    left: calc(100% - 3em);
    width: 3em;
  }

}
