:root {
  --accent: rgb(23, 158, 173);
  --secondary: #8D8D8D;
  --foreground: rgb(46, 49, 52);
  --background: rgb(238, 238, 238);
  --black: rgb(33, 33, 33);
  --white: rgb(250, 250, 250);
  --banca-header-height: 120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --foreground: rgb(238, 238, 238);
    --background: rgb(46, 49, 52);
    --black: rgb(250, 250, 250);
    --white: rgb(33, 33, 33);
    }
}

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  text-align: center;
  min-height: 100vh;
  font-family: Poppins;
  color: var(--foreground);
  background-color: var(--background);
  overflow-x: hidden;
  overflow-y: auto;
}

main {
  flex-grow: 1;
  z-index: 1;
  font-size: 1.1em;
}

.home {
  position: fixed;
  top: 36px;
  left: 36px;
}

.home img {
  height: 60px;
}

h1 {
  font-size: 2.6em;
  font-weight: 700;
  font-family: Nunito;
  color: var(--accent);
  line-height: 35px;
  padding-top: 6px;
}

h2 {
  font-weight: 500;
}

h3 {
  color: var(--accent);
  font-weight: 300;
}

nav, nav a {
  top: 0;
  left: 0;
  height: 120px;
  display: flex;
  flex-direction: row;
  
}

nav img {
  position: relative;
  height: 60px;
  top: 36px;
  left: 36px;
}

nav img.product {
  height: 55px;
  margin-left: -20px;
  margin-top: -3px;
}

nav h1 {
  font-size: 3em;
  font-weight: 500;
  line-height: 22px;
  margin-left: 55px;
  color: var(--foreground);
  align-self: flex-end;
}

.separator {
  border-left: 1px solid var(--foreground);
  margin: 36px 0px 36px 50px;
}

.featured, .legal, .release {
  text-align: left;
  padding: 36px;
  padding-bottom: 60px;
  margin: 20px auto;
  background: var(--white);
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.featured, .release {
  max-width: 800px;
}

.legal {
  max-width: calc(480px + 2 * 18px);
}

.featured h1 {
  color: var(--foreground);
  font-weight: 500;
  margin: 4px 0;
}

.featured h3 {
  margin-top: 0;
}

.featured h4 {
  font-weight: 300;
}

.featured h4.success_message {
  color: var(--accent);
}

.featured h4.failed_message {
  color: red;
}

.featured div {
  display: flex;
  flex-direction: row;
  justify-content: center;
}

.featured div img {
  height: 130px;
  margin: 0 40px;
}

.featured div div {
  display: flex;
  flex-direction: column;
}

.featured div h3 {
  max-width: 640px;
}

.featured #app-store {
  height: 40px;
  margin: 0;
}

.release ul, p {
  font-weight: lighter;
}

.release ul {
  padding-left: 20px;
}

.release div.screenshots {
  display: flex;
  flex-direction: row;
}

.release div.screenshots figure {
  max-width: 50%;
  margin: 0;
}

.release div.screenshots figure img {
  min-height: 420px;
  max-height: 420px;
}

.release div.screenshots figure figcaption {
  font-weight: lighter;
  text-align: center;
  margin-top: -30px;
}

.legal h1 {
  margin-top: 0;
}

.legal h2 {
  max-width: 480px;
}

.legal p {
  max-width: 480px;
  font-weight: 300;
  text-align: justify;
}

footer {
  display: flex;
  height: 50px;
  margin-top: auto;
  padding: 30px;
  text-align: center;
  justify-content: center;
  align-items: flex-end;
}

a {
  font-weight: 300;
  text-decoration: none;
  color: var(--accent);
}

a.tip {
  font-size: 14.4px;
  display: block;
  margin: 0 40px 30px 40px;
}

footer a {
  margin: 8px 20px;
}

a.secondary {
  color: var(--foreground);
  font-weight: 200;
  font-size: 0.9em;
}

.button_bar {
  width: 300px;
  display: flex;
  margin-top: 20px;
  margin-left: auto;
  font-size: 0.9em;
}

button {
  font-weight: bold;
  font-size: 1em;
  padding: 10px 20px;
  margin: 18px;
  border: none;
  border-radius: 6px;
  background-color: var(--accent);
  color: var(--background);
  cursor: pointer;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button.destructive {
  background-color: var(--background);
  color: gray;
}

.progress_indicator {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 3px solid var(--accent);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.inviter_tag {
  font-size: 0.7em;
  font-weight: 300;
  border-radius: 8px;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 2px 9px;
  margin-left: 8px;
}

.invited_tag {
  font-size: 0.7em;
  font-weight: 300;
  border-radius: 8px;
  background-color: var(--accent);
  color: var(--white);
  padding: 2px 9px;
  margin-left: 8px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@media (max-width: 768px) {
  .featured h1 {
    font-size: 2.5em;
  }
  nav h1 {
    font-size: 2.5em;
    line-height: 36px;
    text-align: start;
    white-space: nowrap;
  }
  .featured div, footer {
    flex-direction: column;
  }
  .button_bar {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 30px auto -10px auto;
  }
}

.banca {
  padding: 0 48px 24px 48px;
}

.banca .header {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  padding: 0 48px;
  z-index: 1000;
  width: 100%;
  height: var(--banca-header-height);
  align-items: center;
  justify-content: space-between;
  background-color: var(--background);
}

.banca h2 {
  font-size: 1.8em;
  font-weight: 500;
  color: grey;
  margin-top: 0;
}

.banca .file-uploader {
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0.6;
  color: grey;
  border: 2px dashed var(--accent);
  border-radius: 9px;
  text-align: center;
  position: fixed;
  top: 20px;
  right: 40px;
  width: 180px;
  height: 40px;
  padding: 18px;
  font-size: 0.8em;
  transition: all 0.3s ease;
}

.banca .file-uploader.dragging {
  color: white;
  background-color: var(--accent);
  border-color: white;
}

.banca .uploading-animation {
  display: flex;
  justify-content: center;
  align-items: center;
}

.banca .transactions-grid {
  display: table;
  width: 100%;
  color: gray;
  font-size: small;
  font-weight: lighter;
  max-height: 500px;
  overflow-y: auto;
  position: relative;
}

.banca .transactions-grid .grid-row {
  display: table-row;
  background-color: var(--white);
}

.banca .transactions-grid .grid-row:nth-child(even) {
  background-color: var(--background);
}

.banca .transactions-grid .grid-row:first-child {
  color: grey;
  font-weight: bold;
  background-color: var(--background);
  position: sticky;
  top: var(--banca-header-height);
  z-index: 10;
  box-shadow: 0 6px 6px 0 rgba(0, 0, 0, 0.1);
}

.banca .transactions-grid .grid-row:first-child .grid-cell:nth-child(4),
.banca .transactions-grid .grid-row:first-child .grid-cell:nth-child(5) {
  text-align: right;
}

.banca .transactions-grid .grid-cell {
  display: table-cell;
  padding: 5px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.banca .transactions-grid .grid-cell:nth-child(1) {
  width: 110px;
}

.banca .transactions-grid .grid-cell:nth-child(2) {
  max-width: 190px;
}

.banca .transactions-grid .grid-cell:nth-child(3) {
  max-width: calc(100vw - 2 * 24px - 110px - 2 * 128px - 190px);
}

.banca .transactions-grid .grid-cell.money {
  font-family: 'Courier New', Courier, monospace;
  width: 110px;
  text-align: right;
  padding-left: 18px;
}

.banca .transactions-grid .grid-row.red {
  background-color: rgb(255, 230, 230);
}

.banca .transactions-grid .grid-row.red .grid-cell:last-child.money {
  color: red;
  font-weight: bold;
}

.banca .transactions-grid .grid-row.green {
  background-color: rgb(230, 255, 230);
}

.banca .transactions-grid .grid-row.green .grid-cell:nth-child(4).money {
  color: rgb(0, 170, 0);
  font-weight: bold;
}

.banca .transactions-grid .grid-row.loading {
  background-color: var(--background);
}

.banca .transactions-grid .grid-row.loading-cell {
  display: table-cell;
  padding: 5px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
} 

@media (prefers-color-scheme: dark) {
  .banca .transactions-grid .grid-row:first-child {
    box-shadow: 0 6px 6px 0 rgba(23, 158, 173, 0.1);
  }
  .banca .transactions-grid .grid-row.red {
    background-color: rgb(70, 20, 20);
  }
  .banca .transactions-grid .grid-row.red .grid-cell:last-child.money {
    color: rgb(255, 99, 99);
  }
  .banca .transactions-grid .grid-row.green {
    background-color: rgb(20, 70, 20);
  }
  .banca .transactions-grid .grid-row.green .grid-cell:nth-child(4).money {
    color: rgb(92, 232, 92);
  }
}