@import url('https://fonts.googleapis.com/css2?family=Fira+Sans&family=Oxygen:wght@700&family=Ubuntu&display=swap');

/* Global styles */

/* Using CSS Variables to be able to change the webapp's color palette */
/* I followed Fireship's channel on youtube to be able to implement this effectively. Full credit in Readme.md */

.dark {
  --bg-clr: #2A231F;
  --font-clr: #D8E1E7;
  --shadow-clr: #00478F;
}

.light {
  --bg-clr: #D8E1E7;
  --font-clr: #2A231F;
  --shadow-clr: #FF5D00;
}

body {
  background-color: var(--bg-clr);
  color: var(--font-clr);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100vh;
} 

h1, h2, h3, h4, h5, h6 {
  font-family: "Ubuntu";
}
section {
  padding: 0.5rem;
}

.hide {
  display: none;
}

/* Style for the theme switcher was done following the video tutorial from 
"Online Tutorials - Pure Css Custom Checkbox Design. Full credit in Readme.md*/

input[type="checkbox"] {
  position: relative;
  width: 60px;
  height: 20px;
  -webkit-appearance: none;
  background: linear-gradient(0deg, #FF5D00, rgb(36, 36, 36));
  outline: none;
  border-radius: 10px;
  box-shadow: 0 0 0 4px #353535, 0 0 0 5px #3e3e3e, inset 0 0 5px rgba(0,0,0,1), 0 5px 10px rgba(0,0,0,.5), inset 0 0 8px rgba(0,0,0,.2);
}

input:checked[type="checkbox"] {
  background: linear-gradient(0deg, #6dd1ff, #00478F);
  box-shadow: 0 0 0 4px #353535, 0 0 0 5px #3e3e3e, inset 0 0 5px rgba(0,0,0,1), 0 5px 10px rgba(0,0,0,.5), inset 0 0 8px rgba(0,0,0,.2);
}

input[type="checkbox"]:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 20px;
  background: linear-gradient(0deg, rgb(36, 36, 36), #999999);
  border-radius: 10px;
  box-shadow: 0 0 0 1px #232323;
  transform: scale(.98, .96);
  transition: .3s;
}

input:checked[type="checkbox"]:before {
  left: 20px;
}

input[type="checkbox"]:after {
  
  content: '';
  position: absolute;
  top: calc(50% - 2px);
  left: 32px;
  width: 2px;
  height: 2px;
  background: #FF5D00;
  border-radius: 50%;
  transition: .3s;
}

input:checked[type="checkbox"]:after {
  background: #63cdff;
  left: 50px;
  box-shadow: 0 0 5px #13b3ff, 0 0 15px #13b3ff;
}

#theme-switch label {
  font-size: 0;
}

label {
  font-weight: bold;
}

.navbar-brand {
  width: 17.5rem;
  height: 3rem;
  background-image: url("../img/icons/logo/my_crypto_logo.png");
  background-position: center center;
  background-size: cover;
  font-size: 0;
}

footer {
  display: flex;
  width: 100%;
  padding: 1% 0 1% 5%;
  justify-content: space-evenly;
}

footer i {
  color: var(--shadow-clr);
  font-size: 2rem;
}

/* Coin badge and dashboard style */

h1 {
  font-size: 2rem;
}

.coin {
  border-style: solid;
  border-width: 1px;
  border-color: var(--shadow-clr);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: end;
  font-family: "Fira Sans";
  padding: .5rem;
  box-shadow: .25rem .25rem .5rem var(--shadow-clr);
  transition: all .3s;
  cursor: pointer;
}

.coin:hover {
  transform: scale(1.1) rotate(-3deg);
  background-color: var(--bg-clr);
}

.coin-icon {
  position: absolute;
  top: .5rem;
  left: .5rem;
  background-position: center center;
  background-size: cover;
  width: 3rem;
  height: 3rem;
  opacity: .9;
  z-index: -1;
}

/* Quiz style */

.quiz-area {
  border-radius: 10px;
  box-shadow: 0 .5rem 1rem var(--shadow-clr);
}

#quiz-title {
  display: flex;
  align-items:center;
  justify-content: center;
  font-family: 'Ubuntu';
  font-size: 1.5rem;
  border-radius: 10px;
  padding: 0 2rem;
  box-shadow: 0 .5rem 1rem var(--shadow-clr);
}

#quiz-info {
  font-size: 1.5rem;
  margin-left: 1rem;
  padding: .5rem;
  border-radius: 30px;
  box-shadow: 0 .5rem 1rem var(--shadow-clr);
  transition: transform .5s ease-in-out;
}

#quiz-info:hover {
  transform: rotate(-360deg) scale(1.25);
  cursor: help;
}

/* Credit for modal Florin Pop. Full Credit in readme.md */

#info-modal-container {
  display: flex;
  align-items: center;
  justify-content: center;
  background:rgba(0, 0, 0, .6);
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index:10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .5s ease;
}

#info-modal {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  color:rgb(0, 0, 0);
  box-shadow: 1rem 1rem 5rem rgb(85, 85, 85);
  max-width: 551px;
  max-height: 50vh;
  width: 80%;
  position: relative;
  border-radius: 8px;
  padding: 15px 5%;
}

#modal-close {
  font-weight: bold;
  position: absolute;
  top: 0;
  right: 0;
  font-size: 2rem;;
  line-height: 2rem;
  width: 2rem;
  height: 2rem;
  cursor: pointer;
}

#info-modal ul {
  margin: 1rem;
  padding: 0;
}

.modal-dialog {
  color: black;
}

.modalButton {
  border-style: solid;
  border-color:black;
}

span {
  border-radius: 5px;;
}

#quiz-image {
  background-image: url("../img/quiz_img/quiz_start_min.jpg");
  border-radius: 5px;
  background-position: center center;
  background-size: cover;
  height: 35vh;
  margin-top: .5rem;
}

#quiz-card {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  margin-top: .5rem;
}

#quiz-question {
  margin-top: .5rem;
  margin-bottom: .5rem;
  font-family: "Oxygen";
  text-align: center;
  font-weight: bold;
}

#quiz-answers {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-top: .5rem;
  margin-bottom: .5rem;
  font-family: "Fira Sans";
  text-align: center;
}

#valid {
  margin-top: 1rem;
  box-shadow: .5rem .5rem 1rem var(--shadow-clr);
}

/* Quiz button style inspired from https://getcssscan.com/css-buttons-examples button 33 */

.quiz-btn {
  color: inherit;
  background-color:inherit;
  text-align: center;
  width: 90%;
  margin: 0.25rem 5%;
  border-radius: 10px;
  box-shadow: 0 .25rem .5rem var(--shadow-clr);
  cursor: pointer;
  transition: all 150ms;
  font-weight: 600;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.quiz-btn:hover {
  box-shadow: rgba(0, 0 ,0, .35) 0 -.5rem .5rem inset, var(--shadow-clr) 0 .25rem .25rem;
  transform: scale(1.05) rotate(-1deg);
}

.quiz-btn:focus {
  outline: none;
}

#quiz-footer {
  margin: .5rem;
  height: 10vh;
  border-radius: 10px;
}

#timer, #score {
  font-weight: bold;
  text-align: center;
}

.correct {
  background-color: #00478F;
  color: #D8E1E7;
  box-shadow: 0 .25rem .5rem #00478F;
}

.wrong {
  background-color: #FF5D00;
  color: #2A231F;
  box-shadow: 0 .25rem .5rem #FF5D00;
}

.results {
  font-size: 1rem;
}

/* Portfolio Styles */

.title {
  box-shadow: .25rem .25rem .5rem var(--shadow-clr); ;
  margin: 5rem auto;
}

#total {
  font-size: 200%;
  font-weight: bold;
}

#coin-select, #inp-value {
  box-shadow: .25rem .25rem .5rem var(--shadow-clr);
  background-color: #D8E1E7;
}

#add-asset {
  border-radius: 0;
}

table {
  width: 100%;
  margin-top: 2rem;
}

table, th, td {
  border-top: 1px solid var(--shadow-clr);
  vertical-align: middle;
  text-align: center;
  font-family: "Fira Sans";
}

td:nth-child(even) {
  background-color: #ff5e0015;
}

td:nth-child(odd) {
  background-color: #00488f15;
}

.asset-icon {
  width: 4rem;
  height: 4rem;
  background-position: center center;
  background-size: cover;
}

.asset-id {
  font-size: 0;
}

.remove-asset {
  color: #FF5D00;
}

.remove-asset i:hover {
  transform: scale(2);
  cursor: pointer;
}

/* 404 Page */

.overlay404 {
  height: 30vh;
  top: 50vh;
  padding: 0;
  background-color: rgba(0, 0, 0, 0.75);
  color:#D8E1E7;
}

#error404 {
  width: 100vw;
  height: 100vh;
  background-color: #0E174F;
  background-image: url("../img/404_background_min.jpg");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}

.btn-404 {
  background-color:#FF5D00;
  font-weight: bold;
  transition: all .3s ease-in-out;
}

.btn-404:hover {
  transform: scale(1.1);
}

/* Contact modal styles */

/* Credit for Pop-up message code to https://www.w3schools.com/howto/howto_js_popup.asp */
.popup .popuptext {
  visibility: hidden;
  width: 160px;
  background-color: #555;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 8px 0;
  position: absolute;
  z-index: 1;
  left: 50%;
}

.popup .popuptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #555 transparent transparent transparent;
}

.popup .show {
  visibility: visible;
  -webkit-animation: fadeIn 1s;
  animation: fadeIn 1s;
}

/* Add animation (fade in the popup) */
@-webkit-keyframes fadeIn {
  from {opacity: 0;} 
  to {opacity: 1;}
}

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

/* Media Queries */
/* For anything smaller than an ipad the #quiz-image is hidden through Bootstrap and #quiz-card takes the extra space */

@media screen and (max-width: 990px) {
  .navbar-brand {
    width: 4rem;
    height: 3rem;
    background-image: url("../img/icons/logo/my_crypto_icon.png");
    background-position: center center;
    background-size: cover;
  }
}

@media screen and (max-width: 767px) {
  #quiz-card {
    height: 50vh;
  }

  .quiz-area {
    margin-top: 2rem;
    height: 80vh;
  }

  #quiz-title {
    font-size: 1rem;
  }

  #quiz-footer {
    height: 10vh;
    font-size: 0.75rem;
  }

  #quiz-answers, #info-modal {
    font-size: .7rem;
  }

  .asset-icon {
    width: 2rem;
    height: 2rem;
  }

  table {
    font-size: 70%;
  }
}

