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

@font-face {
  font-family: Waltograph;
  src: url("./files/waltograph42.otf") format("opentype");
}

body {
  background-image: url(./images/bg.png);
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
}

table {
  background: white;
  width: calc(100% - 2rem);
  margin: 1rem;
  font-size: 0.8rem;
  text-align: center;
  max-height: -webkit-fill-available;
  padding: 0.5rem 0;
  border-radius: 3px;
}

nav {
  position: fixed;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 0.5rem;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.5);
  border-top-right-radius: 7px;
}

nav a {
  display: inline-block;
  background: white;
  padding: 0.5rem 1rem;
  border-radius: 3px;
  text-decoration: none;
  text-align: center;
  font-weight: bold;
  font-size: 1em;
  background: rgb(128 67 168 / 70%);
  color: white;
  box-shadow: 0 0 0 1px white inset;
}

nav a.active {
  color: #8043a8;
  background: #fff;
}

tr.increased td:nth-child(2) {
  color: #19b526;
}

tr.decreased td:nth-child(2) {
  color: #d30508;
}

main.logs {
  box-sizing: border-box;
  height: -webkit-fill-available;
  max-height: -webkit-fill-available;
  overflow: scroll;
  padding-bottom: 3rem;
}

.admin .children {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100vw;
  grid-gap: 1rem;
  padding: 1rem;
}

.admin,
.user {
  font-size: 2em;
  display: flex;
  height: 100vh;
  align-items: center;
}

@media (max-width: 414px) {
  .admin,
  .user,
  .logs {
    height: -webkit-fill-available;
    max-height: -webkit-fill-available;
  }
}

.user {
  justify-content: center;
  align-items: center;
}

.name {
  font-family: Waltograph;
  margin: 1rem;
  font-size: 3rem;
  color: #dd1689;
}

.user .name {
  margin-bottom: 0;
}

.child {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0.5rem 1.4rem 0.5rem;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  box-shadow: 0 1px 10px 5px rgb(0 0 0 / 45%);
}

.user .child {
  padding: 1rem 2rem;
}

.child hr {
  width: 100%;
  margin: 20px auto;
  border: 1px dashed #dd1689;
}

.manual-entry {
  font-size: 1rem;
  display: block;
  border-radius: 4px;
  margin: 0;
  padding: 8px;
  background: #8043a8;
  color: white;
  text-align: center;
}

.manual-edit {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.manual-edit.hidden {
  display: none;
}

.manual-edit_card {
  position: relative;
  background: white;
  width: 250px;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 6px 10px 0px rgb(0 0 0 / 25%);
  text-align: center;
}

.manual-edit_card .amount {
  line-height: initial;
}

.manual-edit_card hr {
  border: 1px solid #dd1689;
  margin: 8px 0;
}

.buttons-wrapper {
  display: flex;
  width: 100%;
  justify-content: space-around;
}

.adjustAmount {
  display: block;
  border-radius: 60%;
  box-shadow: 0px 1px 5px 0px rgb(0 0 0 / 25%);
  width: 40px;
  height: 40px;
  background: #8043a8;
  color: #e8e5bb;
  border: none;
  padding: 0;
  line-height: 0;
  font-size: 1.2rem;
  text-align: center;
  text-shadow: 0px 2px 3px rgb(0 0 0 / 45%);
}

.amount {
  line-height: 0;
  color: #0a860a;
  font-weight: bold;
}

.amount.error {
  color: #860a0a;
}

.refresh-wrapper {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 50px;
  height: 50px;
  background: transparent;
}

.refresh {
  position: absolute;
  bottom: 0px;
  right: 0px;
  padding: 1rem 0.7rem 0.7rem 1rem;
  line-height: 0;
  font-size: 1.6rem;
  border-radius: 2rem 0 0 0;
  border: none;
  background: rgba(255, 255, 255, 0.7);
  color: #dd1689;
  box-shadow: 5px 5px 10px 7px black;
}

input[type="number"] {
  font-size: 2rem;
  width: 150px;
  text-align: center;
  padding: 0;
  margin: 0;
}

.submit {
  background: #8043a8;
  border-radius: 4px;
  color: white;
  font-size: 1.2rem;
  text-transform: uppercase;
  padding: 5px 10px;
  margin: auto;
  margin-top: 0.4rem;
}

.submit.disabled {
  background-color: #a8a8a8;
}

.close-modal {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.5);
}

.close-btn {
  position: absolute;
  top: 4px;
  right: 5px;
  font-size: 1.5rem;
  width: 26px;
  text-align: center;
  height: 26px;
  line-height: 28px;
  color: gray;
}
