@import url("https://fonts.googleapis.com/css2?family=Ubuntu+Sans:wght@100..800&display=swap");

*,
*::before,
*::after {
  box-sizing: border-box;
  background-repeat: no-repeat;
}

::before,
::after {
  text-decoration: inherit;
  vertical-align: inherit;
}

body {
  margin: 0;
  font-family:
    "Ubuntu Sans",
    system-ui,
    -apple-system,
    sans-serif,
    "Apple Color Emoji",
    "Segoe UI Emoji",
    "Segoe UI Symbol",
    "Noto Color Emoji";
  font-weight: 400;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body {
  width: 100%;
  margin: 0;
}

main {
  flex-grow: 1;
}

body {
  width: 100%;
  margin: 0;
}

main {
  display: block;
}

body > header,
body > main,
body > footer {
  padding-block: 1rem;
}

section {
  margin-bottom: 1rem;
}

.container {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  padding-right: 1rem;
  padding-left: 1rem;
}

@media (min-width: 576px) {
  .container {
    max-width: 510px;
    padding-right: 0;
    padding-left: 0;
  }
}
@media (min-width: 768px) {
  .container {
    max-width: 700px;
  }
}
@media (min-width: 1024px) {
  .container {
    max-width: 950px;
  }
}
@media (min-width: 1280px) {
  .container {
    max-width: 1200px;
  }
}
@media (min-width: 1536px) {
  .container {
    max-width: 1450px;
  }
}

.grid {
  grid-column-gap: 1rem;
  grid-row-gap: 1rem;
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .grid {
    grid-template-columns: repeat(auto-fit, minmax(0%, 1fr));
  }
}
.grid > * {
  min-width: 0;
}

.header {
}
.logo {
}
.footer {
  padding: 1rem;
  font-size: smaller;
  text-align: center;
}

@keyframes wave {
  0% {
    transform: rotate(0deg);
  }

  10% {
    transform: rotate(16deg);
  }

  20% {
    transform: rotate(-6deg);
  }

  30% {
    transform: rotate(16deg);
  }

  40% {
    transform: rotate(-4deg);
  }

  50% {
    transform: rotate(16deg);
  }

  60% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(0deg);
  }
}

h1::before {
  content: "\01F44B";
  font-size: 100%;
  margin-right: 0.3em;
  animation: wave 2.1s 0.6s 1;
  transform-origin: 75% 75%;
  display: inline-block;
}

h2.translit::before {
  content: "\1F1FA\1F1E6";
  font-size: 100%;
  margin-right: 0.3em;
  display: inline-block;
}

h2.amount2words::before {
  content: "\1FA99";
  font-size: 100%;
  margin-right: 0.3em;
  display: inline-block;
}

h2.classificator::before {
  content: "\1F6E0\FE0F";
  font-size: 100%;
  margin-right: 0.3em;
  display: inline-block;
}

h2 {
  display: block;
  margin: 0;
  max-width: 45ch;
  padding: 0.5rem;
}

p {
  display: block;
  margin: 0;
  max-width: 70ch;
  padding: 0.5rem;
}

input[type="text"],
output {
  border: 1px solid #ccc;
  border-radius: 0.25rem;
  padding: 1rem;
  font-size: min(max(1rem, 4vw), 18px);
  outline: none;
  width: 100%;
  resize: vertical;
  overflow-y: auto;
  min-height: 3.3em;
  background-color: #fff;
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
  margin-top: 0.5rem;
}

input[type="text"]:hover {
  border-color: #a11;
}
select,
button[type="submit"] {
  padding: 5px;
  margin-top: 1rem;
}
label {
  font-weight: bold;
}

input[type="text"]:focus,
output:focus {
  border-color: #4d90fe;
  box-shadow: 0 0 5px rgba(77, 144, 254, 0.5);
}

output {
  display: block;
}

output.list ul {
  font-size: smaller;
}

#translit-input,
#translit-output,
#amount2words-input,
#amount2words-output,
#classificator-input,
#classificator-output {
  padding: 0.5rem;
}

[class^="icon"] {
  width: 15px;
  height: 15px;
  position: relative;
  top: 5px;
  margin-right: 5px;
}

@media (prefers-color-scheme: dark) {
  body {
    background-color: #212121;
    color: #e5e1cf;
  }
  output {
    color: #000;
  }

  a {
    color: darkorange;
  }
}
