/* Base page styling */
html, body, .container, form {
  width: 100% !important;
  max-width: none;
  margin: 1px;
  padding: 2px;
  box-sizing: border-box;
  font-size: 16px;
}

/* Headings */
h2 {
  margin-bottom: 0.5em;
}

/* Label and form controls */
label {
  display: block;
  margin-top: 1.5em;
  font-weight: bold;
}

input,
textarea {
  display: block;
  width: 100%;
  padding: 0.5em;
  margin-top: 0.5em;
  box-sizing: border-box;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 4px;
  max-width: 320px;
}

/* Larger textarea */
textarea {
  min-height: 250px;  /* increased height */
  resize: vertical;
  max-width: 600px; 
  font-size: 1.3em !important;       /* make the typing text larger */
  line-height: 1.4 !important;       /* improve readability */
}

/* CAPTCHA image and reload link */
img.captcha {
  display: block;
  margin: 1em 0;
  cursor: pointer;
  border: 1px solid #888;
  max-width: 100%;
}
a#reload_captcha {
  display: inline-block;
  margin-bottom: 1em;
  font-size: 0.9em;
  color: #007BFF;
  text-decoration: none;
}
a#reload_captcha:hover {
  text-decoration: underline;
}

/* Submit button */
button {
  margin-top: 1.5em;
  padding: 0.7em 1.2em;
  font-size: 1em;
  background-color: #007BFF;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

button:hover {
  background-color: #0056b3;
}

/* Feedback messages */
.message {
  margin-top: 1em;
  padding: 0.8em;
  display: none;
  border-radius: 4px;
  text-align: center;
}

/* ────────── SUCCESS OVERLAY ────────── */
#success_message {
  display: none ;                  /* hidden until we show it */
  position: fixed !important;                /* overlay the viewport */
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  background: #e0ffe0 !important;
  border: 2px solid #0a0 !important;
  border-radius: 8px !important;
  padding: 1.5em 2em !important;
  font-size: 2em !important;                 /* big text */
  color: #060 !important;
  text-align: center !important;
  z-index: 9999 !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
  max-width: 90vw !important;
  word-break: break-word !important;
}

/* ────────── BACKDROP DIMMING ────────── */
body.success-shown::before {
  content: "" !important;
  position: fixed !important;
  top: 0 !important; left: 0 !important;
  width: 100vw !important; height: 100vh !important;
  background: rgba(0,0,0,0.4) !important;
  z-index: 9998 !important;
}

/* ────────── RETURN HOME BUTTON ────────── */
#success_message #return_home {
  margin-top: 0.5em !important;
  padding: 0.6em 1.2em !important;
  font-size: 0.8em !important;
  background-color: #0a0 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 4px !important;
  cursor: pointer !important;
}

#success_message #return_home:hover {
  background-color: #060 !important;
}

.message.error {
  background: #ffe0e0;
  border: 1px solid #a00;
  text-align: center;
}

/* Optional: even wider on very large screens */
@media (min-width: 1200px) {
  body {
    max-width: 14000px;
    width: 80%;
  }
}