/* The Modal (background) */
.modal-categories {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 9999; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: hidden;
  background-color: rgb(0, 0, 0); /* Fallback color */
  background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */
}

/* Modal Content/Box */
.modal-categories-content {
  background-color: #dddddd;
  opacity: 0.9;
  margin: 3% auto; /* Adjusted to keep modal vertically centered */
  padding: 20px;
  border: 2px solid #dbab83;
  border-radius: 10px;
  width: 80%; /* Could be more or less, depending on screen size */
  height: 90vh; /* 90% of the viewport height */
  overflow-y: auto; /* Enable vertical scrolling within the modal */
  box-shadow: 0 4px 8px 0 rgba(255, 255, 255, 0.2),
    0 6px 20px 0 rgba(255, 255, 255, 0.19);
}

/* Modal Category Heading */
.modal-category-heading {
  width: auto;
  font-size: 2em;
  font-weight: semi-bold;
  color: #000;
  margin-bottom: 0.5em;
  text-shadow: 2px 2px 2px #dbab83;
  stroke: #000;
  stroke-width: 0.5px;
  text-decoration: none;
  transition: all 300ms;
}

.modal-category-heading:hover {
  color: #dbab83;
  text-shadow: 2px 2px 2px #000;
}

/* The Close Button */
.modal-categories-close {
  color: #aaa;
  float: right;
  font-size: 48px;
  font-weight: bold;
  margin-right: 20px;
}

.modal-categories-close:hover,
.modal-categories-close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

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

.fade-in {
  animation: fadeIn 0.5s;
}

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

.fade-out {
  animation: fadeOut 0.5s;
}
