* {
  box-sizing: border-box;
}

@keyframes fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}

html {
  font-size: 16px;
  height: 100%;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", Arial, Helvetica, sans-serif;
  font-size: .875rem;
  background-color: #161616;
  color: #FFF;
  height: 100%;
  display: flex;
  flex-direction: column;
}

h1 {
  margin: 6rem 0 4rem;
  text-align: center;
  font-weight: 300;
  font-size: 36px;
  letter-spacing: 0;
  animation: fadein 0.5s;
}

main {
  flex: 1;
  margin: 0 auto;
  max-width: 1320px;
  width: 100%;
}

footer {
  padding: 1rem;
  color: #6c757d;
  text-align: center;
  border-top: 1px solid #212529;
  font-size: 14px;
}

a,
a:visited {
  color: #FFF;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

select,
input,
textarea {
  background-color: #262626;
  color: #f4f4f4;
  border: none;
  border-bottom: 1px solid #6f6f6f;
  transition: background-color 70ms cubic-bezier(0.2, 0, 0.38, 0.9),outline 70ms cubic-bezier(0.2, 0, 0.38, 0.9);
  outline: 2px solid transparent;
  outline-offset: -2px;
  letter-spacing: .16px;
  width: 100%;
  line-height: 1.125rem;
  font-weight: 400;
  font-family: inherit;
}

select:focus,
select:active,
input:focus,
input:active,
textarea:active,
textarea:focus {
  outline: 2px solid #fff;
}

select,
input {
  font-size: .875rem;
  height: 2.5rem;
  padding: 0 1rem;
}

select {
  width: 300px;
  min-width: 300px;
  max-width: 300px;
  padding: 0;
}

textarea {
  padding: 0.6875rem 2.5rem 0.6875rem 1rem;
  resize: none;
  font-size: 20px;
  min-width: 10rem;
  min-height: 2.5rem;
}

textarea::placeholder {
  font-size: 14px;
}

textarea:active,
textarea:focus {
    outline: 2px solid #fff;
}

button {
  background-color: #0f62fe;
  border-color: #0f62fe;
  color: #fff;
  font-size: 0.875rem;
  letter-spacing: 0.16px;
  line-height: 1.125rem;
  border: none;
  border-width: 3px;
  border-style: solid;
  border-color: rgba(0,0,0,0);
  padding: 6px 16px;
  margin-top: 3px;
  transition: all 70ms cubic-bezier(0, 0, 0.38, 0.9);
  margin-top: 10px;
  animation: fadein 2s;
}

button:hover {
  background-color: #0353e9;
}

button:active {
  background-color: #002d9c;
}

.app {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 50px;
  position: relative;
  margin-bottom: 60px;
  padding: 0 50px 50px;
  width: 100%;
  animation: fadein 1s;
}

@media (min-width: 1024px) {
  .app {
    flex-direction: row;
  }
}

.form-section {
  position: relative;
  width: 100%;
}

@media (min-width: 1024px) {
  .form-section {
    width: 300px;
  }
}

@media (min-width: 1280px) {
  .form-section {
    width: 45%;
    max-width: 600px;
  }
}

.dropdown {
  display: inline-block;
  width: 300px;
  min-width: 300px;
  max-width: 300px;
}

.selected-item {
  border: none;
  border-bottom: 1px solid #6f6f6f;
}

.selected-item,
.option {
  width: 100%;
  height: 2.5rem;
  cursor: pointer;
  color: #f4f4f4;
  display: flex;
  align-items: center;
  padding: 0 3rem 0 1rem;
  background: #262626;
  position: relative;
  line-height: 14px;
  letter-spacing: 0.16px;
}

.option:hover {
  background: #353535;
}

.open-close-arrow {
  transition: transform 100ms;
}

.open-close-arrow.active {
  transform: rotate(180deg);
}

.open-close-arrow svg {
  height: 100%;
}

.dropdown-content {
  position: absolute;
  display: flex;
  flex-direction: column;
  min-width: 600px;
  box-shadow: 0px 8px 16px 0px black;
  z-index: 1;
  background: #262626;
  transition: all 0.25s ease-in-out;
  visibility: hidden;
  opacity: 0;
  z-index: 10;
}

.dropdown-content.active {
  opacity: 1;
  visibility: visible;
}

.search-bar {
  position: relative;
}

.dropdown .icon {
  position: absolute;
  top: 0;
  right: 1rem;
  bottom: 0;
  height: 100%;
}

.clear-icon {
  cursor: pointer;
}

.check-icon {
  display: none;
}

.check-icon.active {
  display: block;
}

.copy-button {
  position: absolute;
  cursor: pointer;
  top: 50px;
  right: 15px;
  z-index: 1;
}

.copy-button .tooltip {
  visibility: hidden;
  background-color: white;
  color: black;
  text-align: center;
  padding: 5px 0;
  line-height: 14px;
  border-radius: 0.125rem;
  width: 80px;
  top: 130%;
  left: 50%;
  margin-left: -40px;
  position: absolute;
  z-index: 1;
}

.copy-button .tooltip::after {
  content: " ";
  position: absolute;
  bottom: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: transparent transparent white transparent;
}

.copy-button.active .tooltip {
  visibility: visible;
}

.textarea-wrapper {
  position: relative;
  display: flex;
  width: 100%;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

textarea.output  {
  cursor: default;
}

.columns {
  display: flex;
  flex-direction: row;
}

.info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.detected {
  font-size: 16px;
  display: flex;
  align-items: center;
}

.detected .language {
  margin-right: 5px;
}

.detected .confidence {
  font-size: 80%;
}

.detected .confidence .value {
  display: inline-block;
}

.detected .confidence .value::first-letter {
  text-transform: capitalize;
}

.detected .confidence .value.low {
  color: #ffb3b8;
}

.detected .confidence .value.medium {
  color: #fddc69;
}

.detected .confidence .value.high {
  color: #a7F0ba;
}
