/* signup
   Guest account creation (Figma "Onboarding Desktop" > "Guest user to free
   account holder"): the Join modal (pitch 18474:331245, partner code
   18474:331351, methods 18474:331453) and the full-page sign-up / verify
   screens (18474:331084, 18474:331107). */

/* --- Join modal --- */

.join-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
}

.join-modal {
  width: 551px;
  max-width: 100%;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 24px 40px 40px;
  border-radius: 12px;
  border: 2px solid var(--navy-border);
  background: var(--navy-mid);
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

.join-modal.compact {
  gap: 24px;
}

.join-form {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.join-modal p {
  margin: 0;
}

.join-modal-top {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.join-modal-top.tight {
  gap: 8px;
}

.join-modal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 40px;
}

.join-modal-row.end {
  justify-content: flex-end;
}

.join-icon-btn {
  width: 40px;
  height: 40px;
  padding: 8px;
  border: 0;
  border-radius: 40px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.join-icon-btn.back {
  width: 24px;
  height: 24px;
  padding: 0;
}

.join-modal-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.join-modal-title {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 500;
  line-height: 1.2;
}

.join-eyebrow {
  color: var(--gold);
  font-size: 16px;
}

.join-title {
  color: var(--white);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
}

.join-body {
  color: var(--light-gray);
  font-size: 18px;
  line-height: 1.4;
}

.join-modal-bottom {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.join-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.join-btn,
.join-method,
.signup-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 8px 24px;
  border-radius: 40px;
  border: 1px solid var(--navy-border);
  font-family: inherit;
  font-size: 16px;
  line-height: 25px;
  text-decoration: none;
  cursor: pointer;
}

.join-btn.primary,
.signup-btn {
  background: var(--white);
  color: var(--navy-mid);
  font-weight: 500;
}

.join-btn.secondary {
  background: transparent;
  color: var(--white);
  font-weight: 600;
}

.join-btn:disabled,
.join-method:disabled,
.signup-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.join-method {
  background: var(--white);
  color: #000;
  font-weight: 400;
  line-height: 1.4;
}

.join-method.sso {
  color: #212121;
}

.join-link,
.signup-link {
  align-self: center;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--white);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 25px;
  cursor: pointer;
}

.join-field,
.signup-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.join-field label,
.signup-field label {
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  line-height: 17px;
}

.join-field input,
.signup-field input {
  height: 40px;
  padding: 8px;
  border-radius: 4px;
  border: 1px solid var(--control-border);
  background: var(--navy-card-secondary);
  color: var(--white);
  font-family: inherit;
  font-size: 16px;
  line-height: 25px;
  outline: none;
}

.join-field input:focus,
.signup-field input:focus {
  border-color: var(--figma-green);
}

.join-field input::placeholder,
.signup-field input::placeholder {
  color: var(--light-gray);
}

.join-error,
.signup-error {
  margin: 0;
  color: #D1817E;
  font-size: 14px;
  line-height: 20px;
}

/* --- Full-page sign-up --- */

.signup-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(139.5deg, var(--navy-start) 3.2%, var(--navy-mid) 47.24%, var(--navy-end) 108.89%);
}

.signup-top {
  height: 80px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 80px;
  border-bottom: 1px solid var(--navy-border);
  background: var(--navy-mid);
}

.signup-top a {
  display: flex;
}

.signup-back {
  width: 40px;
  height: 40px;
  padding: 8px;
  border: 0;
  border-radius: 40px;
  background: var(--navy-card);
  cursor: pointer;
}

/* Fixed width so the logo stays centered between back and Cancel. */
.signup-back,
.signup-cancel {
  flex: 0 0 69px;
}

.signup-back {
  flex-basis: 40px;
  margin-right: 29px;
}

.signup-cancel {
  justify-content: flex-end;
  padding: 0 8px;
  color: var(--white);
  font-size: 16px;
  font-weight: 500;
  line-height: 25px;
  text-decoration: underline;
}

.signup-progress {
  height: 4px;
  flex-shrink: 0;
  background: var(--navy-card-secondary);
}

.signup-progress-fill {
  height: 100%;
  border-radius: 8px;
  background: var(--gold);
  transition: width 0.3s ease;
}

.signup-main {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

.signup-card {
  width: 610px;
  max-width: 100%;
  padding: 40px;
  border-radius: 12px;
  background: var(--navy-card);
  animation: groove-page-enter 0.25s ease-out;
}

.signup-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.signup-form > :not(.signup-btn, .signup-link, .groove-code) {
  align-self: stretch;
}

.signup-heading {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.signup-heading p {
  margin: 0;
}

.signup-title-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 500;
  line-height: 1.2;
}

.signup-eyebrow {
  color: var(--gold);
  font-size: 16px;
}

.signup-title {
  color: var(--white);
  font-size: 40px;
}

.signup-subtitle {
  color: #C5CFDD;
  font-size: 18px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.signup-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.signup-helper {
  margin: 0;
  color: var(--white);
  font-size: 14px;
  line-height: 20px;
}

.signup-consent {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--white);
  font-size: 16px;
  line-height: 1.4;
  cursor: pointer;
}

.signup-consent input {
  position: absolute;
  opacity: 0;
  width: 24px;
  height: 24px;
  margin: 0;
}

.signup-check {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  padding: 1px;
  border-radius: 2px;
  border: 1px solid var(--control-border);
  background: transparent;
  box-sizing: border-box;
}

.signup-consent input:checked + .signup-check {
  background: var(--figma-green);
}

.signup-consent input:focus-visible + .signup-check {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

.signup-check img {
  display: block;
  margin: -1px;
}

.signup-btn {
  width: 342px;
  max-width: 100%;
}

/* --- Verification code boxes (also usable outside sign-up) --- */

.groove-code {
  position: relative;
  display: flex;
  gap: 8px;
}

.groove-code-box {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  border: 1px solid var(--control-border);
  background: var(--navy-card-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 16px;
  font-weight: 500;
}

.groove-code:focus-within .groove-code-box.current {
  border-color: var(--figma-green);
}

.groove-code-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  border: 0;
  padding: 0;
  font-size: 16px;
  cursor: text;
}

@media (max-width: 640px) {
  .join-modal {
    padding: 24px;
  }

  /* Six 40px boxes need 280px; let them shrink inside a 240px card. */
  .groove-code {
    max-width: 100%;
  }

  .groove-code-box {
    flex: 0 1 40px;
    min-width: 0;
  }

  .signup-top {
    padding: 0 16px;
  }

  .signup-card {
    padding: 24px;
  }

  .signup-title {
    font-size: 32px;
  }
}

/* Titles rendered as headings (WCAG 1.3.1): drop the browser's heading
   margins/bold so they look as they did as <p>. */
.signup-title,
.join-title {
  margin: 0;
  font-weight: 500;
}
