/* === Base popup styling === */
#promo-popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 850px;
  background-color: #fff;
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.25);
  border-radius: 18px;
  overflow: hidden;
  z-index: 1000;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -45%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* === Overlay === */
#popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: none;
  z-index: 999;
}

/* === Layout === */
.popup-content {
  display: flex;
  flex-direction: row;
  width: 100%;
}

/* === Left image === */
.popup-content .left {
  width: 45%;
  position: relative;
}

.popup-content .left img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.popup-content .left .mobile-img {
  display: none;
}

/* === Right content === */
.popup-content .right {
  width: 55%;
  padding: 40px 35px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #222;
}

.popup-content .right h2 {
  font-size: 1.8em;
  margin-bottom: 10px;
  font-weight: 700;
  color: #333;
}

.popup-content .right p {
  font-size: 1em;
  color: #666;
  margin-bottom: 25px;
}

.popup-content .right label {
  font-size: 0.9em;
  font-weight: 500;
  color: #555;
}

.popup-content .right input[type="email"] {
  width: 100%;
  padding: 12px 14px;
  margin-top: 8px;
  margin-bottom: 22px;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 8px;
  transition: border 0.3s ease;
}

.popup-content .right input[type="email"]:focus {
  border-color: #b79b6c;
  outline: none;
}

.popup-content .right input[type="email"]::placeholder {
  color: #838383 !important ;
  opacity: 1;
}

.popup-content .right button {
  padding: 12px 24px;
  background: linear-gradient(135deg, #b79b6c, #a58a5c);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  align-self: flex-start;
}

.popup-content .right button:hover {
  background: linear-gradient(135deg, #a58a5c, #967f58);
  transform: translateY(-1px);
}

/* === Responsive (mobile) === */
@media (max-width: 768px) {
  #promo-popup {
    width: 90%;
    max-width: 400px;
    max-height: 90vh; /* Limit popup height but allow scrolling */
    overflow-y: auto; /* Scroll if content is too tall */
  }

  .popup-content {
    flex-direction: column;
  }

  .popup-content .left {
    width: 100%;
  }

  .popup-content .left .desktop-img {
    display: none;
  }

  .popup-content .left .mobile-img {
    display: block;
    width: 100%;
    height: auto;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
  }

  .popup-content .right {
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Align text to top */
    text-align: center; /* Optional, for mobile layout */
  }

  .popup-content .right h2 {
    font-size: 1.4em;
    margin-bottom: 10px;
  }

  .popup-content .right p {
    font-size: 1em;
    margin-bottom: 20px;
    line-height: 1.5; /* Ensure proper spacing */
  }

  .popup-content .right button {
    width: 100%;
  }
}

.popup-content .right input[type="email"]::placeholder {
  color: #838383 !important ;
  opacity: 1;
}

#popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.8em;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: color 0.2s ease;
    z-index: 1001;
}

#popup-close:hover {
    color: #b79b6c;
}

/* Checkbox container spacing */
.popup-checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

/* Label styling */
.popup-checkbox-container label {
    font-size: 0.9em;
    color: #555;
    cursor: pointer;
}


.popup-checkbox-container input[type="checkbox"] ~ label::before {
  background-image: none !important ;
  border: 1px solid #b79b6c;
  border-radius: 5px;
  outline: none;
}

.popup-checkbox-container input[type="checkbox"]:checked ~ label::before {
	background-image: none;
    background: #b79b6c;
    content: "✔";
    font-size: large;
    text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}