/*
https://www.freecodecamp.org/news/css-selectors-cheat-sheet/
https://www.w3schools.com/cssref/css_selectors.php
https://www.sliderrevolution.com/resources/slide-menu/
*/

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

iframe {
  display: block;
}


html, body {
  font-family: Arial, Helvetica, sans-serif;
}

body {
  display: block;
  margin: 0 auto;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  align-items: center;
  justify-content: center;
}

body.help {
  background-color: rgb(233, 255, 233);
  width: 93%;
  margin-left: 1rem;
}

body.info {
  background-color: rgb(195, 223, 238);
  width: 93%;
  margin-left: 1rem;
}
body.privacy {
  background-color: wheat;
  width: 95%;
  margin-left: 0.5rem;
}

button {
  border-radius: 16px;
  padding: 4px 8px 4px 8px; 
  border-width: 1px;
}

dialog {
  all: unset;
  display: none;
  overflow-x:hidden;
  overflow-y: scroll;
  position: fixed;
  top: 5%;
  left: 5%;
  right: 0;
  bottom: 5%;
  width: 90%;
  height: 90%;
  margin: 0;
  padding: 2rem 1rem 0 1rem;
  border: none;
  background: white;
  box-sizing: border-box;
}
dialog[open] {
  display: block;
}
dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}

#importDialog, #registerDialog {
  margin: 22% 0 0 0;
  height: 55%;
  padding: 5% 5% 5% 5%;
}

#editDialog, #hintDialog {
  overflow: auto;
  position: fixed;
  height: 67%;
  width: 100%;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  transition: none !important;
  animation: none !important;
}

.button-container {
  margin: 4% 0 0 0;
  display: flex; 
  justify-content: space-between; 
}

.collapsible {
  background-color: lightcyan;
  color: black;
  cursor: pointer;
  padding: 18px;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-size: 15px;
}
.active, .collapsible:hover {
  background-color: lightgray;
}
.content {
  padding: 0 18px;
  display: none;
  overflow: hidden;
  background-color: #f1f1f1;
}
hr {
  height: 1px;
  background-color: gray;
}

h1, h2, h3 {
  margin: 1rem 0 1rem 0;
}

div {
  display: block;
}

button {
  display: block;
  margin: auto;
}

.animateGenerateLeft {
  animation: moveBtnRight 0.25s forwards;
}

.animateGenerateRight {
  animation: moveBtnLeft 0.25s forwards;
}

@keyframes moveBtnRight {
  0% { transform: translateX(55%);}
 100% { transform: translateX(+0%);
 }
}

@keyframes moveBtnLeft {
  0% { transform: translateX(-55%);}
 100% { transform: translateX(+0%);
 }
}

.generate {
  background-color: lightblue;
}
#generateLeft {
  border-radius: 1rem 0 0 1rem;
}
#generateRight {
  border-radius: 0 1rem 1rem 0;
}


#saveDiv {
  z-index: 90;
}

.btnContainer {
  position: absolute;
  top: 0;
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.btn.install {
  display: none;
}

#hamburger {
  display: flex;
  width: 2rem;
  justify-content: center;
  align-items: center;
  text-align: center;
  background-color: yellow;
}

.top-icon {
  flex-grow: 1;
}

.btn {
  max-height: 2.5rem;
  padding: 0.3rem;
  margin: 0rem;
  border-radius: 10%;
  vertical-align: middle;
}

.btn:hover {
  font-weight: bolder;
  background-color: white;
}

.grow {
  transition: all 0.9s ease-in-out;
  transform: scale(2);
}

.shrink {
  transition: all 0.9s ease-in-out;
  transform: scale(0.5);
}

.grow:click {
  transform: scale(1.5);
}

form input {
  margin: 10px auto;
}

form {
  text-align: left;
  align-items: left;
  display: inline-block;
  margin: 0 0 10px 0;
}
p {
  text-align: left;
}

hr {
  height: 4px;
  background-color: gray;
}

#frontContainer, #editContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: calc(100vh - 8%);
  width: 100vw;
  height: 67%;
  position: absolute;
  top: 0;
  overflow: auto;
  z-index: 9;
}
#frontContainer {
  display: block;
  background-color: rgba(255, 178, 102);
}
#editContainer {
  display: none;
  background-color: white;
}

#editLegend {
  width: 90%;
  margin: 1rem 0rem 0 0rem;
}

ul {
  list-style-position: outside;
  padding-left: 2%;
  padding-right: 2%;
}

ul li {
  padding-left: -1em;
  margin-bottom: 0.2em;
  text-align: left;
}

ol {
  list-style-position: outside;
  padding-left: 4%;
}

ol li::marker {
  font-weight: bold;
}

ol li {
  margin-bottom: 0.2em;
}

#passwordInputContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#logop {
  margin: 4rem 0 0rem 0;
  font-size: 1.5rem;
  position: relative;
  padding: 0;
  border: 1px solid #ccc;
  border-radius: 16px;
  text-align: center;
  justify-content: center;
  align-items: center;
  width: 50%;
}

#fingerprint {
  position: relative;
  margin: 6rem 0 1rem 0;
}

#pgHintContainer {
  width: 100%;
  background: rgba(255, 255, 255, 1);
  display: flex;
  justify-content: center;
  align-items: center;
  width: 90%;
  border-radius: 1rem;
  display: flex;
  align-items: stretch;
  box-shadow: 4px 4px 4px 4px lightgrey;
  margin: 0 0 0 0;
}

#pgHintContainer img {
  flex-grow: 1;
  height: 100%;
  object-fit: contain;
}

#editHint, #editSalt, #editPepper, #editLength,
#pgHint, #salt, #pepper, #length {
  width: 100%;
  text-align: center;
  font-size: 1.5rem;
  border-radius: 1rem;
}

.leading-icon {
  position: absolute;
  padding: 0;
  font-size: 1.5rem;
  margin: 0.5rem 0 0 0.5rem;
  background-color: transparent;
  border: transparent;
}

.input {
  font-size: 1.0rem;
  background-color: transparent;
  border-width: 2px;
  text-align: center;
  height: 100%;
  width: 100%;
  border-radius: 1rem;
}

#settingsContainer {
  display: block;
  position: relative;
  width: 90%;
  height: 48%;
  margin: 0 auto;
}

#settings {
  position: relative;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100%;
  width: 100%;
}

#hidesettings iframe {
  width: 100%;
  height: 95%;
  margin: 1rem 0 0 0;
  border-radius: 1rem;
}
.hidden {
  visibility: hidden;
}

#hintLegend, #editLegend {
  width: 90%;
  margin: 5% 5% 5% 5%;
}

.adContainer {
  z-index: 99;
  width: 100%;
  height: 33%;
  display: block;
  position: fixed;
  top: 67%;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: lightyellow;
  border-top: 4pt solid grey;
}

#saltBtn, #pepperBtn, #lengthBtn, #burnBtn, #peakBtn {
  position: relative;
  font-size: 1.5rem;
  vertical-align: center;
  border: none;
  background-color: transparent;
  cursor: pointer;
}

#saltContainer, #pepperContainer, #lengthContainer {
  position: relative;
  align-items: center;
  margin: 5pt 0 5pt 0;
}

#salt, #pepper, #length, #burn, #peak {
  top: 0;
  height: 100%;
  width: 100%;
}
#burn, #peak {
    background-color: rgba(0, 0, 0, 0.1);
}

#pgHint {
  border: none;
}

input[type="number"] {
  flex-grow: 1;
  padding: 0.5rem;
}

.popup {
  position: fixed;
  top: 40%;
  left: 50%;
  width: 80%;
  transform: translate(-50%, -50%);
  background-color: #a6e882;
  padding: 20px;
  border: 0px solid #ccc;
  border-radius: 5px;
  box-shadow: 2px 2px 2px red;
}

#versionContainer {
  position: absolute;
  bottom: 0;
  display: flex;
  justify-content: space-around;
  text-decoration: none;
  vertical-align: middle;
  align-items: center;
  background-color: lightgray;
  height: 4%;
  width: 100%;
  font-size: 1rem;
}

.flex-item {
  display: flex;
}

#version {
  display: flex;
  align-items: center;
  margin: 0 auto;
}

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

/* Modal Styles */

#fileInputModal {
  font-size: 1.2rem;
}
#importFileInput {
  font-size: 1.2rem;
  width: 100%;
  max-width: 300px;
  box-sizing: border-box;
}

.close {
  color: red;
  position: absolute;
  top: 0rem;
  right: 1rem;
  font-size: 2rem;
  font-weight: bold;
}

.topIcons {
  position: absolute;
  z-index: 8;
  top: 0;
  left: 0;
  display: grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 0px;
  height: 3rem;
  width: 100%;
  box-sizing: border-box;
  background-color: lightgray;
  padding: 0 10px;
}

.topIcons img {
  max-width: 100%;
  height: auto;
}

.fp {
  margin: 1rem 0 1rem 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  justify-items: center;
  display: flex;
}
.fp button { 
  width: 100%;
  margin: 0 0.5rem;
  width: 8rem;
  font-size: 1.2rem;
  border-radius: 16px;
  border-width: 1px;
}

.securityContainer {
  position: relative;
  margin: 2rem 0 0 0;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
}

.inputsContainer {
  position: relative;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
}
.inputsContainer.edit {
  margin: -1rem 0 0 0;
}

#hintTitle, #editTitle {
  margin-top: 2rem;
  width: 90%;
  text-align: center;
}

#hintInputs, #editInputs {
  margin-top: 2rem;
}

.container {
  position: relative;
  width: 90%;
  height: 100%;
  height: 3rem;
  border-radius: 1rem;
  margin: 1rem 0 0.5rem 0;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.eye-img {
  width: 1.5rem;
  height: 1.5rem;
}

.password-container {
  display: inline-flex;
  align-items: center;
  justify-content: start;
  position: relative;
}

.password-container input {
  border-radius: 16px;
  border-width: 1px;
  font-size: 1.5rem;
  text-align: center;
  width: 100%;
}

.password-container span {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
}

#masterPasswordDiv, #newPasswordDiv {
  margin: 0;
  padding: 0;
  width: 80%;
}

#newPasswordDiv {
  display: none;
}
#newPasswordDiv.show {
  display: block;
}

.hbtn {
  width: 1.5rem;
  height: 1.5rem;
}

.icon {
  margin: 0 auto;
  width: 1rem;
  height: 1rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: 0px;
  border: 1px solid grey;
}

.cell {
  background-color: rgb(197, 203, 160);
  background-color: transparent;
  padding: 0.5rem 0 0.5rem 0.5rem;
  border-right: 1px solid grey;
  border-bottom: 1px solid grey;
  text-align: left;
}

.cell:nth-child(3n) {
  border-right: none;
}

.cell:nth-child(n + 13) {
  border-bottom: none;
}
