/* Popup container */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.popup-content {
  position: relative;
  background-color: #fff;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  width: auto;
  max-width: 500px; /* Adjust max-width for desktop */
  max-height: 90vh; /* Use viewport height */
  overflow-y: auto; /* Allow vertical scroll if needed, but image should fit */
  display: flex;
  flex-direction: column;
}

.popup-content img {
  max-width: 85%;
  height: auto;
  border-radius: 10px;
  object-fit: contain; /* Ensure the whole image is visible */
  max-height: calc(90vh - 150px); /* Adjust based on other content height */
  margin: 0 auto;
}

@media screen and (max-width: 768px) {
  .popup-content {
    width: 80%;
  }
  .popup-content img {
    max-height: calc(80vh - 150px); /* Adjust for smaller screens */
  }
}

#countdown {
  font-size: 1.8em;
  margin-bottom: 16px;
}

.popup-buttons {
  margin-top: 20px;
}

.popup-buttons a,
.popup-buttons button {
  display: inline-block;
  padding: 10px 20px;
  margin: 0 10px;
  border: none;
  border-radius: 200px;
  text-decoration: none;
  color: #fff;
  cursor: pointer;
}

.btn-details {
  background-color: #007bff;
}

.btn-close-popup {
  background-color: #ffdaddff;
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #d20015ff;
  font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
  .popup-content {
    padding: 15px;
  }

  #countdown {
    font-size: 1.3em;
  }

  .popup-buttons a,
  .popup-buttons button {
    padding: 8px 15px;
    margin: 5px;
  }
}

@media (max-width: 480px) {
  .popup-content {
    padding: 10px;
  }

  #countdown {
    font-size: 1em;
  }

  .popup-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .popup-buttons a,
  .popup-buttons button {
    width: 80%;
    margin: 5px 0;
  }
}