@keyframes action-enter {
  from {
    transform: rotate(-90deg);
    opacity: 0;
    animation-timing-function: ease-out;
  }
}

@keyframes action-leave {
  from {
    transform: rotate(0deg);
    opacity: 1;
    animation-timing-function: ease-out;
  }
}

.results {
  display: grid;
  grid-template-columns: [text] 1fr [copy-button] auto [download-button] auto;
  background: rgba(0, 0, 0, 0.9);
  font-size: 1rem;

  @media (min-width: 400px) {
    font-size: 1.2rem;
  }

  @media (min-width: 600px) {
    font-size: 1.4rem;
  }

  &:focus {
    outline: none;
  }
}

.result-data {
  grid-row: 1;
  grid-column: text;
  display: flex;
  align-items: center;
  padding: 0 10px;
  white-space: nowrap;
  overflow: hidden;
}

.download-right {
  grid-template-columns: [copy-button] auto [text] 1fr [download-button] auto;
}

.download-left {
  grid-template-columns: [download-button] auto [text] 1fr [copy-button] auto;
}

.stack-right {
  & .result-data {
    padding: 0 15px;
  }
}

.result-title {
  display: flex;
  align-items: center;
  margin-right: 0.4em;
}

.size-delta {
  font-size: 0.8em;
  font-style: italic;
  position: relative;
  top: -1px;
  margin-left: 0.3em;
}

.size-increase {
  color: #e35050;
}

.size-decrease {
  color: #50e3c2;
}

.download {
  grid-row: 1;
  grid-column: download-button;
  background: #34b9eb;
  --size: 38px;
  width: var(--size);
  height: var(--size);
  display: grid;
  align-items: center;
  justify-items: center;
}

.download-link {
  animation: action-enter 0.2s;
  grid-area: 1/1;
}

.download-link-disable {
  pointer-events: none;
  opacity: 0;
  transform: rotate(90deg);
  animation: action-leave 0.2s;
}

.download-icon,
.copy-icon {
  color: #fff;
  display: block;
  --size: 24px;
  width: var(--size);
  height: var(--size);
  padding: 7px;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.7));
}

.spinner {
  --color: #fff;
  --delay: 0;
  --size: 22px;
  grid-area: 1/1;
}

.copy-to-other {
  grid-row: 1;
  grid-column: copy-button;
  composes: unbutton from global;
  composes: download;

  background: #656565;
}
