/* ---------------------------------------------------------------
   Sign up popup
   Shared by every page. Opened by any link to /signup
   (see signup-popup.js). Same look as the Contact us popup.
   --------------------------------------------------------------- */

.signup-dialog {
  width: calc(100% - 32px);
  max-width: 520px;
  max-height: calc(100% - 32px);
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #ffffff;
  color: #555555;
  font-family: "Montserrat", Helvetica, Arial, sans-serif;
  box-shadow: 0 20px 60px -15px rgba(58, 150, 175, 0.45);
  overflow: auto;
}

.signup-dialog::backdrop {
  background: rgba(30, 60, 70, 0.55);
  backdrop-filter: blur(2px);
}

.signup-dialog[open] { animation: signup-in .2s ease-out; }
@keyframes signup-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .signup-dialog[open] { animation: none; }
}

/* Stop the page behind from scrolling while the popup is open */
html.signup-open { overflow: hidden; }

/* Top band ------------------------------------------------------ */
.signup-head {
  position: relative;
  background: #eff5fd;
  padding: 28px 64px 24px 32px;
}
.signup-head h2 {
  font-size: 30px;
  line-height: 1.3;
  font-weight: 600;
  color: #3a96af;
  margin: 0 0 8px;
}
.signup-head p {
  font-size: 16px;
  line-height: 1.5;
  margin: 0;
}

.signup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #3a96af;
  cursor: pointer;
  transition: background-color .2s ease;
}
.signup-close:hover { background: rgba(58, 150, 175, 0.12); }
.signup-close:focus-visible { outline: 3px solid #80c8dc; outline-offset: 2px; }
.signup-close svg { width: 22px; height: 22px; }

/* Form ---------------------------------------------------------- */
.signup-form {
  padding: 24px 32px 0;
  display: grid;
  gap: 18px;
}
.signup-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.signup-field { display: grid; gap: 6px; }
.signup-field label {
  font-size: 15px;
  font-weight: 600;
  color: #555555;
}
.signup-field input {
  width: 100%;
  font-family: inherit;
  font-size: 16px;          /* 16px stops phones zooming in on tap */
  line-height: 1.5;
  color: #555555;
  background: #fdfcfe;
  border: 1px solid rgba(58, 150, 175, 0.4);
  border-radius: 5px;
  padding: 11px 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.signup-field input::placeholder { color: #999999; }
.signup-field input:focus {
  outline: none;
  border-color: #3a96af;
  box-shadow: 0 0 0 3px rgba(128, 200, 220, 0.45);
}
.signup-hint { font-size: 13px; margin: 0; }

/* Password box with a Show / Hide button inside it */
.signup-pw { position: relative; }
.signup-pw input { padding-right: 76px; }
.signup-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #3a96af;
  background: transparent;
  border: 0;
  border-radius: 5px;
  padding: 8px 10px;
  cursor: pointer;
}
.signup-toggle:hover { background: rgba(58, 150, 175, 0.1); }
.signup-toggle:focus-visible { outline: 3px solid #80c8dc; outline-offset: 0; }

/* Tick boxes */
.signup-checks { display: grid; gap: 14px; margin-top: 2px; }
.signup-check {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  font-size: 15px;
  line-height: 1.5;
  cursor: pointer;
}
.signup-check input {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  border: 1.5px solid rgba(58, 150, 175, 0.6);
  border-radius: 5px;
  background: #fdfcfe;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.signup-check input:checked {
  background: #3a96af url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 16px no-repeat;
  border-color: #3a96af;
}
.signup-check input:focus-visible { outline: 3px solid #80c8dc; outline-offset: 2px; }
.signup-check a { color: #3a96af; font-weight: 600; }

/* Shown only after someone tries to sign up with a missing or wrong field */
.signup-error {
  display: none;
  font-size: 14px;
  color: #b3261e;
  margin: 0;
}
.has-error > .signup-error { display: block; }
.signup-field.has-error input { border-color: #b3261e; }
.signup-tick.has-error .signup-check input { border-color: #b3261e; }
.signup-tick .signup-error { margin: 6px 0 0 34px; }

.signup-submit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  background: #3a96af;
  border: 0;
  border-radius: 5px;
  padding: 14px 24px;
  margin-top: 4px;
  cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
}
.signup-submit:hover { background: #317f95; }
.signup-submit:active { transform: translateY(1px); }
.signup-submit:focus-visible { outline: 3px solid #80c8dc; outline-offset: 2px; }

.signup-note {
  text-align: center;
  font-size: 14px;
  margin: -8px 0 0;
}

.signup-status {
  font-size: 15px;
  line-height: 1.5;
  color: #3a96af;
  background: #eff5fd;
  border-radius: 5px;
  padding: 12px 14px;
  margin: 0;
}
.signup-status[hidden] { display: none; }

.signup-signin {
  text-align: center;
  font-size: 15px;
  line-height: 1.5;
  margin: 22px 32px 0;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(58, 150, 175, 0.25);
}
.signup-signin a { color: #3a96af; font-weight: 600; }

/* Phones -------------------------------------------------------- */
@media (max-width: 800px) {
  .signup-head { padding: 24px 60px 20px 20px; }
  .signup-head h2 { font-size: 26px; }
  .signup-form { padding: 20px 20px 0; }
  .signup-row { grid-template-columns: 1fr; }
  .signup-signin { margin: 20px 20px 0; padding-bottom: 24px; }
}
