/* signup.css */

/* Vertical layout + brand background for the signup page. */
body.signup-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: #2a6a4f;
}

/* Center the signup card within the viewport. */
#signupMain {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3em 1.5em;
  box-sizing: border-box;
}

/* Raised card containing the signup form. */
#signupCard {
  width: 100%;
  max-width: 760px;
  background-color: #fff;
  border-radius: 16px;
  padding: 2.5em;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  color: #2a2a2a;
}

/* Primary headline for the signup page. */
.signup-header h1 {
  margin: 0;
  font-size: 2rem;
  color: #2a6a4f;
}

/* Supporting intro text under the headline. */
.signup-header p {
  margin-top: 0.5em;
  color: #4a4f4b;
  font-size: 1rem;
}

/* Stack form fields vertically with consistent spacing. */
#signupForm {
  margin-top: 2em;
  display: flex;
  flex-direction: column;
  gap: 1.2em;
}

/* Labels for text inputs. */
.form-group label {
  font-size: 0.95em;
  color: #444;
}

/* Base styling for signup inputs. */
.form-group input {
  width: 100%;
  margin-top: 0.35em;
  padding: 0.85em;
  border-radius: 8px;
  border: 1px solid #cfd8d5;
  font-size: 1em;
  box-sizing: border-box;
  background-color: #fdfdfb;
}

/* Focus outline for inputs. */
.form-group input:focus {
  outline: 2px solid #2a6a4f;
  border-color: transparent;
}

/* Fieldset for consent/communication preferences. */
.consent-group {
  border: 1px solid #d7ddd9;
  border-radius: 12px;
  padding: 1.4em;
  background-color: #f7fbf2;
  display: flex;
  flex-direction: column;
  gap: 0.8em;
}

/* Legend label above the consent fieldset. */
.consent-group legend {
  font-weight: 600;
  font-size: 1em;
  color: #2a6a4f;
  padding: 0 0.3em;
  margin-bottom: 0;
}

/* Layout for each checkbox + copy block. */
.checkbox-option {
  display: flex;
  align-items: flex-start;
  gap: 0.7em;
  font-size: 0.95em;
  color: #2a2a2a;
  margin: 0;
}

/* Slightly enlarge checkboxes for easier tapping. */
.checkbox-option input[type="checkbox"] {
  margin-top: 0.25em;
  transform: scale(1.1);
}

/* Reset spacing for checkbox descriptions. */
.checkbox-option p {
  margin: 0;
}

/* Links/buttons within the consent copy. */
.checkbox-option a,
.checkbox-option button {
  color: #1c7c62;
  font-weight: 600;
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: inherit;
}

/* Underline inline links on hover. */
.checkbox-option a:hover,
.checkbox-option button:hover {
  text-decoration: underline;
}

/* Primary signup submit button. */
#createAccountBtn {
  margin-top: 0.6em;
  padding: 0.95em;
  border-radius: 10px;
  border: none;
  font-size: 1.05em;
  background-color: #2a6a4f;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out;
}

/* Hover effect for active submit button. */
#createAccountBtn:hover:not(:disabled) {
  background-color: #21513c;
  transform: translateY(-1px);
}

/* Dim the submit button when disabled. */
#createAccountBtn:disabled {
  background-color: #9fb2ab;
  color: #f1f1f1;
  cursor: not-allowed;
}

/* Modal overlay used for the consent explanation. */
.modal {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5em;
  z-index: 3000;
}

/* Display modal when .open is added. */
.modal.open {
  display: flex;
}

/* Dialog styling inside the modal overlay. */
.modal-content {
  background-color: #fff;
  border-radius: 14px;
  padding: 2em;
  max-width: 620px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  color: #20332c;
}

/* Modal heading color. */
.modal-content h2 {
  margin-top: 0;
  color: #2a6a4f;
}

/* Paragraph spacing within the modal body. */
.modal-body p {
  line-height: 1.5em;
  margin-bottom: 1em;
}

/* Close button positioned at the top-right. */
.modal-close {
  position: absolute;
  top: 1em;
  right: 1em;
  background: none;
  border: none;
  font-size: 1.6em;
  cursor: pointer;
  color: #4a4f4b;
}

/* On mobile, tighten padding and stack checkbox content. */
@media (max-width: 600px) {
  #signupCard {
    padding: 1.8em;
  }

  .checkbox-option {
    flex-direction: column;
    gap: 0.3em;
  }

  .checkbox-option input[type="checkbox"] {
    margin-top: 0;
  }
}
