@import url('https://fonts.googleapis.com/css2?family=Lato&display=swap');

:root {
  --modal-duration: 1s;
  --primary-color: #30336b;
  --secondary-color: #be2edd;
  --white-color: #fff;
  --light-grey-border-color: rgba(200, 200, 200, 0.1);
  --iii-percent-rgba-black: rgba(0, 0, 0, 0.3);
  --vi-percent-rgba-black: rgba(0, 0, 0, 0.6);
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Lato', sans-serif;
  margin: 0;
  transition: transform 0.3s ease-in-out;
}

/* class is in the body element */
body.show-nav {
  /* width of the nav */
  transform: translateX(200px);
}

nav {
  position: fixed;
  background-color: var(--primary-color);
  border-right: 2px solid var(--light-grey-border-color);
  color: var(--white-color);
  top: 0;
  left: 0;
  width: 200px;
  height: 100%;
  z-index: 100;
  /* move nav off the screen */
  transform: translateX(-100%);
}

nav .logo {
  padding: 30px 0;
  text-align: center;
}

nav .logo img {
  height: 75px;
  width: 75px;
  border-radius: 50%;
}

nav ul {
  padding: 0;
  list-style-type: none;
  margin: 0;
}

nav ul li {
  border-bottom: 2px solid var(--light-grey-border-color);
  padding: 20px;
}

/* Add a border to the top li item */
nav ul li:first-of-type {
  border-top: 2px solid var(--light-grey-border-color);
}

/* Add link hover transition effect */
nav ul li a {
  color: var(--white-color);
  background-clip: text;
  background: linear-gradient(
    to right,
    rgb(163, 116, 202),
    rgb(163, 116, 202) 50%,
    var(--white-color) 50%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 100%;
  background-position: 100%;
  transition: background-position 275ms ease;
}

nav ul li a:hover {
  background-position: 0 100%;
}

header {
  background-color: var(--primary-color);
  color: var(--white-color);
  font-size: 130%;
  position: relative;
  padding: 40px 15px;
  text-align: center;
}

header h1 {
  margin: 0;
}

header p {
  margin: 30px 0;
}

button,
input[type='submit'] {
  background-color: var(--secondary-color);
  border: 0;
  border-radius: 5px;
  color: var(--white-color);
  cursor: pointer;
  margin-top: 14px;
  padding: 8px 12px;
}

button:focus {
  outline: none;
}

.toggle {
  background-color: var(--iii-percent-rgba-black);
  top: 20px;
  left: 20px;
  position: absolute;
}

.cta-btn {
  padding: 12px 30px;
  font-size: 20px;
}

.container {
  padding: 15px;
  margin: 0 auto;
  /* control the overall width of the container used space */
  max-width: 100%;
  width: 800px;
}

.modal-container {
  background-color: var(--vi-percent-rgba-black);
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.modal-container .modal-form {
  padding-bottom: 1px;
}

.modal-container.show-modal {
  display: block;
}

.modal {
  background-color: var(--white-color);
  border-radius: 4px;
  box-shadow: 0 0 10px var(--iii-percent-rgba-black);
  position: absolute;
  overflow: hidden;
  /* center modal element to DOM*/
  top: 50%;
  left: 50%;
  /* center modal to element */
  transform: translate(-50%, -50%);
  width: 400px;
  max-width: 100%;
  animation-name: modal-open;
  animation-duration: var(--modal-duration);
}

.modal-header {
  background-color: var(--primary-color);
  color: var(--white-color);
  padding: 15px;
}

.modal-header h3 {
  margin: 0;
  border-bottom: 1px solid #333;
}

.modal-content {
  padding: 20px;
}

/* space out the modal form divs */
.modal-form div {
  margin: 15px 0;
}

.modal-form label {
  display: block;
  margin-bottom: 5px;
}

.modal-form .form-input {
  padding: 8px;
  width: 100%;
}

.close-btn {
  background: transparent;
  font-size: 25px;
  position: absolute;
  top: 0;
  right: 0;
}

@keyframes modal-open {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
