/* 1. Section layout and shared spacing */
#waitlist {
  color: #ffffff;
  line-height: 1.5;
  scroll-margin-top: 5rem;
}

#waitlist .waitlist-content,
#waitlist-form,
#waitlist .waitlist-row,
#waitlist .waitlist-footer {
  display: grid;
}

#waitlist-form,
#waitlist .waitlist-field,
#waitlist fieldset,
#waitlist input:not([type="checkbox"]),
#waitlist select {
  min-width: 0;
}

#waitlist .waitlist-content {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.1fr);
  gap: 2rem;
  width: 100%;
  max-width: 1400px;
  margin: 1rem auto 0;
  padding: 2rem 4rem 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
}

#waitlist .waitlist-intro {
  padding-top: 1rem;
}

#waitlist h2,
#waitlist legend,
#waitlist a {
  color: inherit;
}

#waitlist h2 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
}

#waitlist .waitlist-intro p {
  margin: 0;
  max-width: 34ch;
  font-size: 0.95rem;
  line-height: 1.6;
}

#waitlist-form {
  align-content: start;
  gap: 0.75rem;
  font-size: 0.875rem;
}

#waitlist .waitlist-row,
#waitlist .waitlist-footer {
  gap: 1.5rem;
}

#waitlist .waitlist-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

/* 2. Labels, product checkboxes and form controls */
#waitlist .waitlist-field > label,
#waitlist #waitlist-pvs-other-field > label,
#waitlist legend {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
}

#waitlist fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

#waitlist fieldset label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
  cursor: pointer;
}

#waitlist input[type="checkbox"] {
  flex-shrink: 0;
  accent-color: #04447e;
}

#waitlist input:not([type="checkbox"]),
#waitlist select {
  box-sizing: border-box;
  width: 100%;
  padding: 0.4rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 0.35rem;
  font: inherit;
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.12);
}

#waitlist input::placeholder {
  color: rgba(255, 255, 255, 0.65);
  opacity: 1;
}

#waitlist select option {
  color: #04447e;
  background-color: #ffffff;
}

#waitlist #waitlist-pvs-other-field {
  margin-top: 0.75rem;
}

#waitlist .waitlist-footer {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  margin-top: 0.5rem;
}

/* 3. Privacy text, consent and submit action */
#waitlist .waitlist-privacy p,
#waitlist .waitlist-consent {
  font-size: 0.75rem;
}

#waitlist .waitlist-privacy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
}

#waitlist a {
  text-decoration: underline;
}

#waitlist .waitlist-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.6rem;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
}

#waitlist .waitlist-consent input {
  margin-top: 0.2rem;
}

#waitlist .btn-container {
  margin: 0;
  text-align: right;
}

#waitlist .btn {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.25rem;
  border: 1px solid #ffffff;
  border-radius: 1.25rem;
  font: inherit;
  color: #ffffff;
  background-color: transparent;
}

#waitlist .btn:hover {
  background-color: rgba(255, 255, 255, 0.12);
}

#waitlist .btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* 4. Focus and submission feedback */
#waitlist input:focus-visible,
#waitlist select:focus-visible,
#waitlist .btn:focus-visible {
  outline: 2px solid #00d9d9;
  outline-offset: 3px;
}

#waitlist-status:empty {
  display: none;
}

#waitlist-status:not(:empty) {
  grid-column: 2;
  margin: 0;
}

/* 5. Responsive layout; use the same outer spacing as the product section. */
@media screen and (max-width: 1300px) {
  #waitlist {
    width: 100%;
    margin-inline: 0;
  }
}

@media screen and (max-width: 1000px) {
  #waitlist .waitlist-content {
    grid-template-columns: minmax(0, 1fr);
  }

  #waitlist .waitlist-intro {
    padding-top: 0;
  }

  #waitlist .waitlist-intro p {
    max-width: none;
  }

  #waitlist-status:not(:empty) {
    grid-column: 1;
  }
}

@media screen and (max-width: 850px),
       screen and (max-height: 500px) and (orientation: landscape) {
  #waitlist .waitlist-content {
    padding-inline: 1rem;
  }

  #waitlist .waitlist-row,
  #waitlist .waitlist-footer {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  #waitlist .btn-container {
    text-align: left;
  }
}
