/* ================================
   CONTACT POPUP MODAL — Like About
================================ */

/* Modal overlay background */
/* Contact popup overlay – add blur */
#contactModal.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  /* —— ADD THESE BLUR RULES —— */
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  /* ———————————————— */
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  transition: opacity 0.3s ease;
}

/* When active, flex-center and fade in */
#contactModal.active {
  display: flex;
  opacity: 1;
}

/* Show modal when .active is applied */
#contactModal.active {
  display: flex;
}

/* Inner modal container */
#contactModal .modal-content {
  background: #fff;
  color: #333;
  padding: 2rem;
  border-radius: 10px;
  max-width: 500px;
  width: 90%;
  position: relative;
  font-family: Georgia, serif;
  font-size: 1rem;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.25);
}

/* Modal heading */
#contactModal h2 {
  margin-top: 0;
  font-size: 1.5rem;
  text-align: center;
}

/* Form field labels */
#contactModal label {
  display: block;
  margin-top: 1rem;
  font-weight: bold;
}

/* Input and textarea styling */
#contactModal input,
#contactModal textarea {
  width: 100%;
  padding: 0.6rem;
  margin-top: 0.3rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
}

/* Submit button */
#contactModal button[type="submit"] {
  margin-top: 1.2rem;
  background-color: #0d1a26;
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
}

/* Hover effect on submit button */
#contactModal button[type="submit"]:hover {
  background-color: #1f3242;
}

/* Close button (X) in corner */
#contactModal .modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
}

/* Response message below form */
.response-message {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: green;
  text-align: center;
}

/* Mobile layout improvements */
@media screen and (max-width: 600px) {
  #contactModal .modal-content {
    padding: 1.5rem;
  }
}

/* ================================
   CAPTCHA INLINE STYLE — Puzzle Look, Math Question
================================ */

#contactModal .captcha-container {
  display: flex;
  justify-content: center;   /* Center horizontally */
  align-items: center;
  gap: 1rem;
  margin-top: 1.2rem;
  flex-wrap: wrap;
  text-align: center;
}


#contactModal .captcha-container label {
  margin: 0;
  font-weight: bold;
  font-family: 'Courier New', Courier, monospace;
  color: #0a2c44;
  background: linear-gradient(145deg, #d6e9ff, #c1d8f5);
  padding: 0.5rem 1rem;
  border-radius: 10px 4px 10px 4px; /* Subtle puzzle edge */
  font-size: 1rem;
  border: 1px dashed #557aa7;
  box-shadow: 0 2px 5px rgba(0,0,0,0.08);
  white-space: nowrap;
}

#contactModal .captcha-container input[type="text"] {
  width: 5ch;
  padding: 0.5rem;
  font-size: 1rem;
  border: 1px solid #557aa7;
  border-radius: 6px;
  background-color: #fdfdfd;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

/* Responsive tweaks for mobile */
@media screen and (max-width: 480px) {
  #contactModal .captcha-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  #contactModal .captcha-container input[type="text"] {
    width: 80px;
  }
}
