@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono&display=swap');

:root {
  --main-color: hsl(206, 99%, 31%);
  --main-color-light: hsl(206, 99%, 45%);

  --control-border-color: #e5e6e7;
  --control-color: #666;
}

body {
  font-family: Roboto, sans-serif;
  font-size: 16px;
  margin: 0;
  padding: 0;
}

main {
  align-items: center;
  background-image: linear-gradient(to bottom, var(--main-color) 45px, transparent 45px),
    linear-gradient(to top, var(--main-color), 45px, transparent 45px);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: calc(5rem + 45px) 0;
}

main h1 {
  text-align: center;
}

main .container {
  width: 350px;
}

.logo {
  display: block;
  margin: 0 auto 5rem;
  max-height: 150px;
}

.row {
  margin: 0.25rem;
  text-align: center;
}

.button-row {
  margin-top: 1rem;
  text-align: center;
}

.hidden {
  display: none;
}

#key-input {
  border-radius: 0;
  border: 1px solid var(--control-border-color);
  color: var(--control-color);
  font-family: 'Roboto Mono', monospace;
  font-size: 1.25rem;
  font-weight: bold;
  padding: 0.25rem 0.5rem;
  text-align: center;
  transition: all 0.25s ease-in-out;
}

#key-input:focus,
#key-input:active {
  border-color: var(--main-color);
  border-radius: 0;
  outline: 0;
}

#submit-form {
  background-color: var(--main-color);
  border-radius: 2px;
  border: 0;
  box-shadow: 0 0.5rem 0.5rem rgba(0, 0, 0, 0.25);
  color: white;
  cursor: pointer;
  font-weight: bold;
  padding: 0.5rem 1rem;
  transition: all 0.25s ease-in-out;
}

#submit-form:disabled {
  background-color: hsl(0, 0%, 80%);
  box-shadow: none;
  cursor: not-allowed;
}

#submit-form:not(:disabled):hover {
  background-color: var(--main-color-light);
  transform: scale(1.05);
}

#output {
  margin-top: 1rem;
}

#error-output {
  background-color: hsl(0, 100%, 93%);
  border-radius: 2px;
  color: #f00;
  padding: 0.5rem;
  text-align: center;
}

#success-output {
  background-color: hsl(206, 99%, 90%);
  border-radius: 2px;
  padding: 0.5rem;
}

#success-output h3 {
  margin-top: 0;
  text-align: center;
}

#key-info {
  display: grid;
  gap: 0.25rem;
  grid-template-columns: 1fr 1fr;
}

.info-label {
  text-align: right;
}

.info-datum {
  font-weight: bold;
}

#error-key,
#success-key {
  font-family: 'Roboto Mono', monospace;
}

#loader {
  animation: pulse 0.5s ease-in-out infinite alternate;
  font-size: 0.8rem;
  margin-top: 3rem;
  text-align: center;
}

@keyframes pulse {
  0% {
    opacity: 0.25;
  }

  100% {
    opacity: 1;
  }
}
