.main-container,
.modal-window,
.modal-container {
  transition: 0.5s;
}

.modal-window {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  color: #000000;
  padding: 48px 40px;
  width: 400px; /* Default width for larger screens */
  max-width: 90%; /* Set maximum width to 90% of viewport width */
  height: auto;
  border-radius: 12px;
  z-index: 9999999;
  display: none; /* Initially hidden */
}

.modal-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none; /* Initially hidden */
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.8);
  z-index: 999999;
}

body.open-modal .modal-container,
body.open-modal .modal-window {
  display: flex; /* Show modal and overlay when body has class open-modal */
}

/* Close Button  */
.close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
  background: transparent;
  border: none;
  font-size: 16px;
  font-weight: bold;
  color: #000000;
  padding: 8px 16px;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.close-button:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

#myModal {
  overflow: hidden;
}

.close {
  color: white;
  text-align: end;
  cursor: pointer;
  font-size: 25px;
  position: absolute;
  right: 20px;
  top: 15px;
}

.close:hover,
.close:focus {
  color: white;
  text-decoration: none;
  cursor: pointer;
}

.pop-btn {
  width: 160px;
  height: 35px;
  background: linear-gradient(to top, #5cb874, #80c792);
  color: #fff;
  border: none;
  outline: none;
  cursor: pointer;
  position: fixed;
  right: -65px;
  top: 50%;
  font-size: 16px;
  box-shadow: 0 15px 30px rgba(92, 184, 116, 0.5);
  overflow: hidden;
  text-transform: uppercase;
  z-index: 9;
  transform: rotate(-90deg) translateY(-19px);
  border-radius: 4px;
  animation: pulsing 2.5s linear infinite;
}

/* Media query for smaller screens */
@media only screen and (max-width: 768px) {
  .modal-window {
    width: 90%; /* Adjust width for smaller screens */
    padding: 40px;
  }
}
