.vim-generator {
  box-sizing: border-box;
  width: 100%;
}

.vim-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vim-label,
.vim-name-input {
  box-sizing: border-box;
  display: block;
  width: 100%;
}

.vim-name-input,
.vim-submit,
.vim-download,
.vim-reset {
  font: inherit;
}

.vim-name-input {
  min-height: 48px;
  padding: 10px 14px;
}

.vim-submit,
.vim-download,
.vim-reset {
  align-items: center;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  min-height: 48px;
  padding: 10px 20px;
  text-decoration: none;
}

.vim-complete .vim-submit {
  display: none;
}

.vim-actions {
  display: flex;
  gap: 12px;
  width: 100%;
}

.vim-download,
.vim-reset {
  border-radius: 12px;
  transition: opacity .2s ease, transform .2s ease;
}

.vim-download {
  background: #2f2f2f;
  border: 1px solid #2f2f2f;
  color: #fff;
  flex: 1 1 auto;
  font-weight: 600;
}

.vim-download::before {
  content: '\2193';
  font-size: 1.15em;
  margin-inline-end: 8px;
}

.vim-reset {
  background: transparent;
  border: 1px solid #ded7ce;
  color: inherit;
  flex: 0 0 auto;
}

.vim-reset::before {
  content: '\21bb';
  font-size: 1.1em;
  margin-inline-end: 8px;
}

.vim-download:hover,
.vim-download:focus-visible,
.vim-reset:hover,
.vim-reset:focus-visible {
  opacity: .88;
  transform: translateY(-1px);
}

.vim-submit:disabled {
  cursor: wait;
  opacity: .7;
}

.vim-spinner {
  display: none;
  height: 16px;
  margin-inline-start: 9px;
  width: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: vim-spin .7s linear infinite;
}

.vim-loading .vim-spinner {
  display: inline-block;
}

.vim-message,
.vim-result {
  margin-top: 12px;
}

.vim-message:empty,
.vim-result:empty {
  display: none;
}

.vim-error {
  color: #b42318;
}

.vim-success {
  color: #067647;
}

@media (max-width: 480px) {
  .vim-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .vim-download,
  .vim-reset {
    width: 100%;
  }
}

@keyframes vim-spin {
  to { transform: rotate(360deg); }
}
