* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, Sans-Serif;
  background: #eeeded;
  line-height: 1.3;
}

.container {
  background: #f7f7f7;
  width: 95%;
  max-width: 380px;
  margin: 20vh auto;
  border-radius: 12px;
  padding: 10px 20px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
}

.container > div {
  margin: 15px 0;
}

.input {
  width: 40%;
  font-size: 32px;
  margin-top: 15px;
  padding: 5px 10px;
  background: #eeeded;
  border: none;
  outline: none;
  border-radius: 12px;
}

.select {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.select .currency {
  display: flex;
  width: 120px;
  height: 50px;
  justify-content: space-evenly;
  align-items: center;
  border: 1px solid #aaa;
  border-radius: 12px;
}

.select .currency img {
  width: 36px;
  border-radius: 8px;
}

.select .currency select {
  background: none;
  border: none;
  outline: none;
  font-weight: bold;
  font-size: 16px;
}

.select .swap {
  padding: 10px 12px;
  margin: 40px 0 36px;
  border-radius: 12px;
  cursor: pointer;
  border: none;
  font-size: 20px;
  background: none;
}

button[type="button"] {
  font-size: 18px;
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 10px 0;
  background: #ddd;
  margin-bottom: 10px;
}

/* CREDIT: https://dev.to/afif/i-made-100-css-loaders-for-your-next-project-4eje */
.loader {
  font-weight: bold;
  font-family: sans-serif;
  font-size: 30px;
  animation: l1 1s linear infinite alternate;
}

.loader:before {
  content: "Loading...";
}

@keyframes l1 {
  to {
    opacity: 0;
  }
}

.error {
  font-weight: bold;
  font-family: sans-serif;
  font-size: 20px;
  animation: l1 1s linear infinite alternate;
}

.error:before {
  content: "Connection error ⛔";
}

@keyframes l1 {
  to {
    opacity: 0;
  }
}

.result {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 10px auto;
  width: 200px;
  font-size: 20px;
}

.result p:first-of-type {
  align-self: start;
}

.result p:last-of-type {
  align-self: end;
  font-size: 24px;
  font-weight: bold;
  margin-top: 10px;
}
