/*
 * Sign In / Sign Up — Sport2Work account shell.
 *
 * WP JobSearch keeps ownership of every account form, field, switch and
 * submission. This file scopes the visual treatment to the dedicated auth
 * page and preserves native visibility/interaction states.
 */

.s2w-marketplace-native--auth .s2w-auth {
  padding-block: clamp(3rem, 5vw, 4.75rem) clamp(4rem, 7vw, 6.5rem);
  background:
    linear-gradient(135deg, rgba(247, 247, 245, .94) 0, rgba(255, 255, 255, 0) 52rem),
    var(--s2w-white);
}

.s2w-marketplace-native--auth .s2w-auth::before {
  top: 2rem;
  right: -5rem;
  width: min(23vw, 18rem);
  opacity: .05;
}

/* One full-width flow on every viewport: intro first, native account UI below. */
.s2w-marketplace-native--auth .s2w-auth__layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.75rem, 3vw, 2.75rem);
  width: min(100% - 48px, 90rem);
  margin-inline: auto;
}

.s2w-marketplace-native--auth .s2w-auth__intro {
  min-width: 0;
  max-width: none;
}

.s2w-marketplace-native--auth .s2w-auth__intro .s2w-eyebrow {
  margin-bottom: .85rem;
  color: var(--s2w-ink);
  font-size: .76rem;
  font-weight: var(--s2w-weight-bold);
  letter-spacing: .08em;
  line-height: 1.35;
  text-transform: uppercase;
}

.s2w-marketplace-native--auth .s2w-auth__intro h1 {
  max-width: 18ch;
  margin: 0 0 1rem;
  color: var(--s2w-ink);
  font-size: clamp(3rem, 5vw, 4.75rem);
  line-height: .98;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.s2w-marketplace-native--auth .s2w-auth__lede {
  max-width: 72ch;
  margin: 0;
  color: var(--s2w-text-secondary);
  font-size: clamp(1rem, 1.35vw, 1.1rem);
  line-height: 1.7;
}

.s2w-marketplace-native--auth .s2w-auth__audiences {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: clamp(1.5rem, 2.5vw, 2rem);
}

.s2w-marketplace-native--auth .s2w-auth__audience {
  position: relative;
  min-width: 0;
  padding: 1.15rem 1.25rem 1.15rem 1.45rem;
  border: 1px solid var(--s2w-border);
  border-radius: var(--s2w-radius-md);
  background: rgba(255, 255, 255, .9);
}

.s2w-marketplace-native--auth .s2w-auth__audience::before {
  position: absolute;
  top: 1rem;
  bottom: 1rem;
  left: 0;
  width: 4px;
  border-radius: 0 999px 999px 0;
  background: var(--s2w-primary);
  content: "";
}

.s2w-marketplace-native--auth .s2w-auth__audience-kicker {
  display: block;
  margin-bottom: .35rem;
  color: var(--s2w-text-secondary);
  font-size: .72rem;
  font-weight: var(--s2w-weight-bold);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.s2w-marketplace-native--auth .s2w-auth__audience strong {
  display: block;
  color: var(--s2w-ink);
  font-size: 1rem;
  line-height: 1.4;
}

.s2w-marketplace-native--auth .s2w-auth__audience p {
  margin: .4rem 0 0;
  color: var(--s2w-text-secondary);
  font-size: .92rem;
  line-height: 1.58;
}

.s2w-marketplace-native--auth .s2w-auth__panel {
  width: 100%;
  min-width: 0;
  padding: clamp(1.35rem, 3vw, 3rem);
  border: 1px solid var(--s2w-border-strong);
  border-top: 4px solid var(--s2w-primary);
  border-radius: var(--s2w-radius-lg);
  background: var(--s2w-white);
  box-shadow: 0 20px 58px rgba(20, 20, 20, .07);
}

.s2w-marketplace-native--auth .s2w-auth__panel::after {
  display: table;
  clear: both;
  content: "";
}

/* Keep native WP JobSearch layout/visibility logic; normalize only its canvas. */
.s2w-marketplace-native--auth .s2w-auth__panel .jobsearch-login-registration-form,
.s2w-marketplace-native--auth .s2w-auth__panel .jobsearch-login-box,
.s2w-marketplace-native--auth .s2w-auth__panel .login-form,
.s2w-marketplace-native--auth .s2w-auth__panel .pt-register {
  max-width: 100%;
  box-sizing: border-box;
}

.s2w-marketplace-native--auth .s2w-auth__panel .jobsearch-login-registration-form,
.s2w-marketplace-native--auth .s2w-auth__panel .jobsearch-login-box {
  width: 100%;
  margin: 0;
}

.s2w-marketplace-native--auth .s2w-auth__panel .jobsearch-login-box {
  border-color: var(--s2w-border);
  background: transparent;
}

.s2w-marketplace-native--auth .s2w-auth__panel h2,
.s2w-marketplace-native--auth .s2w-auth__panel h3,
.s2w-marketplace-native--auth .s2w-auth__panel h4 {
  color: var(--s2w-ink);
  letter-spacing: -.025em;
  line-height: 1.12;
}

.s2w-marketplace-native--auth .s2w-auth__panel h2 {
  font-size: clamp(1.65rem, 3vw, 2.15rem);
}

/* Readable body, helper and legal copy on white backgrounds. */
.s2w-marketplace-native--auth .s2w-auth__panel p,
.s2w-marketplace-native--auth .s2w-auth__panel small,
.s2w-marketplace-native--auth .s2w-auth__panel .description,
.s2w-marketplace-native--auth .s2w-auth__panel .help-block,
.s2w-marketplace-native--auth .s2w-auth__panel .jobsearch-user-form-info,
.s2w-marketplace-native--auth .s2w-auth__panel .jobsearch-form-info,
.s2w-marketplace-native--auth .s2w-auth__panel .jobsearch-checkbox label,
.s2w-marketplace-native--auth .s2w-auth__panel .terms-privacy,
.s2w-marketplace-native--auth .s2w-auth__panel .jobsearch-terms-privacy {
  color: var(--s2w-text-secondary);
  line-height: 1.62;
}

/* Native helper copy is #999 in Careerfy; raise both contrast and text size. */
.s2w-marketplace-native--auth .s2w-auth__panel .enter-userpass-txt,
.s2w-marketplace-native--auth .s2w-auth__panel .pt-register > span {
  color: var(--s2w-text-secondary) !important;
  font-size: .875rem;
  line-height: 1.5;
}

/* Careerfy can ship white role/field labels with stronger declarations. */
.s2w-marketplace-native--auth .s2w-auth__panel label,
.s2w-marketplace-native--auth .s2w-auth__panel legend {
  color: var(--s2w-ink) !important;
  font-weight: var(--s2w-weight-semibold);
}

.s2w-marketplace-native--auth .s2w-auth__panel input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),
.s2w-marketplace-native--auth .s2w-auth__panel select,
.s2w-marketplace-native--auth .s2w-auth__panel textarea,
.s2w-marketplace-native--auth .s2w-auth__panel .selectize-input,
.s2w-marketplace-native--auth .s2w-auth__panel .select2-selection {
  max-width: 100%;
  min-height: 50px;
  box-sizing: border-box;
  border: 1px solid var(--s2w-border-strong);
  border-radius: var(--s2w-radius-md);
  background: var(--s2w-white);
  color: var(--s2w-ink);
  font-size: 1rem;
}

/*
 * Production keeps the Sign Up controls at Careerfy's native height. Preserve
 * that vertical rhythm while retaining this page's contrast, borders and focus.
 */
.s2w-marketplace-native--auth .s2w-auth__panel .pt-register input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),
.s2w-marketplace-native--auth .s2w-auth__panel .pt-register select,
.s2w-marketplace-native--auth .s2w-auth__panel .pt-register textarea,
.s2w-marketplace-native--auth .s2w-auth__panel .pt-register .selectize-input,
.s2w-marketplace-native--auth .s2w-auth__panel .pt-register .select2-selection {
  min-height: 0;
}

/* Native Country/State placeholders are real select text, not ::placeholder. */
.s2w-marketplace-native--auth .s2w-auth__panel select.countries,
.s2w-marketplace-native--auth .s2w-auth__panel select.states {
  color: var(--s2w-text-secondary) !important;
}

.s2w-marketplace-native--auth .s2w-auth__panel input::placeholder,
.s2w-marketplace-native--auth .s2w-auth__panel textarea::placeholder {
  color: var(--s2w-text-muted);
  opacity: 1;
}

/* Select2 can reintroduce its own low-contrast placeholder on mobile. */
.s2w-marketplace-native--auth .s2w-auth__panel .select2-selection__placeholder {
  color: var(--s2w-text-muted) !important;
  opacity: 1;
}

.s2w-marketplace-native--auth .s2w-auth__panel .select2-selection__rendered,
.s2w-marketplace-native--auth .s2w-auth__panel .selectize-input > *,
.s2w-marketplace-native--auth .s2w-auth__panel option {
  color: var(--s2w-ink);
}

.s2w-marketplace-native--auth .s2w-auth__panel input:focus,
.s2w-marketplace-native--auth .s2w-auth__panel select:focus,
.s2w-marketplace-native--auth .s2w-auth__panel textarea:focus,
.s2w-marketplace-native--auth .s2w-auth__panel .select2-container--focus .select2-selection,
.s2w-marketplace-native--auth .s2w-auth__panel .selectize-input.focus {
  border-color: var(--s2w-accent);
}

.s2w-marketplace-native--auth .s2w-auth__panel input:focus-visible,
.s2w-marketplace-native--auth .s2w-auth__panel select:focus-visible,
.s2w-marketplace-native--auth .s2w-auth__panel textarea:focus-visible,
.s2w-marketplace-native--auth .s2w-auth__panel a:focus-visible,
.s2w-marketplace-native--auth .s2w-auth__panel button:focus-visible,
.s2w-marketplace-native--auth .s2w-auth__panel [tabindex]:focus-visible {
  outline: 3px solid var(--s2w-accent);
  outline-offset: 2px;
}

.s2w-marketplace-native--auth .s2w-auth__panel input[type="checkbox"],
.s2w-marketplace-native--auth .s2w-auth__panel input[type="radio"] {
  accent-color: var(--s2w-ink);
}

.s2w-marketplace-native--auth .s2w-auth__panel input:disabled,
.s2w-marketplace-native--auth .s2w-auth__panel select:disabled,
.s2w-marketplace-native--auth .s2w-auth__panel textarea:disabled {
  background: var(--s2w-surface-2);
  color: var(--s2w-text-secondary);
  opacity: 1;
}

/* Native validation messages: visible without relying on color alone. */
.s2w-marketplace-native--auth .s2w-auth__panel .jobsearch-error,
.s2w-marketplace-native--auth .s2w-auth__panel .jobsearch-error-msg,
.s2w-marketplace-native--auth .s2w-auth__panel .jobsearch-form-error,
.s2w-marketplace-native--auth .s2w-auth__panel .jobsearch-field-error,
.s2w-marketplace-native--auth .s2w-auth__panel .error {
  color: #8f1d16;
  font-weight: var(--s2w-weight-semibold);
}

.s2w-marketplace-native--auth .s2w-auth__panel .jobsearch-alert,
.s2w-marketplace-native--auth .s2w-auth__panel .alert-danger,
.s2w-marketplace-native--auth .s2w-auth__panel .jobsearch-warning {
  border-color: #b42318;
  background: #fff4f2;
  color: #7a1812;
}

.s2w-marketplace-native--auth .s2w-auth__panel .alert-success,
.s2w-marketplace-native--auth .s2w-auth__panel .jobsearch-success {
  border-color: var(--s2w-success);
  background: #f2faf5;
  color: #185f3c;
}

.s2w-marketplace-native--auth .s2w-auth__panel a {
  color: var(--s2w-accent);
  text-decoration-thickness: .08em;
  text-underline-offset: .18em;
}

.s2w-marketplace-native--auth .s2w-auth__panel a:hover {
  color: var(--s2w-ink);
}

.s2w-marketplace-native--auth .s2w-auth__panel .jobsearch-login-submit-btn,
.s2w-marketplace-native--auth .s2w-auth__panel .jobsearch-reset-password-submit-btn,
.s2w-marketplace-native--auth .s2w-auth__panel .jobsearch-register-submit-btn {
  min-height: 50px;
  border: 1px solid var(--s2w-primary);
  border-radius: var(--s2w-radius-pill);
  background: var(--s2w-primary);
  color: var(--s2w-ink);
  font-weight: var(--s2w-weight-bold);
  box-shadow: none;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.s2w-marketplace-native--auth .s2w-auth__panel .jobsearch-login-submit-btn:hover,
.s2w-marketplace-native--auth .s2w-auth__panel .jobsearch-reset-password-submit-btn:hover,
.s2w-marketplace-native--auth .s2w-auth__panel .jobsearch-register-submit-btn:hover {
  border-color: var(--s2w-ink);
  background: var(--s2w-ink);
  color: var(--s2w-white);
  transform: translateY(-1px);
}

.s2w-marketplace-native--auth .s2w-auth__panel .lost-password,
.s2w-marketplace-native--auth .s2w-auth__panel .login-form-btn,
.s2w-marketplace-native--auth .s2w-auth__panel .reg-tologin-btn {
  color: var(--s2w-accent);
  font-weight: var(--s2w-weight-semibold);
  text-decoration: underline;
  text-decoration-thickness: .08em;
  text-underline-offset: .18em;
}

.s2w-marketplace-native--auth .s2w-auth__panel .lost-password:hover,
.s2w-marketplace-native--auth .s2w-auth__panel .login-form-btn:hover,
.s2w-marketplace-native--auth .s2w-auth__panel .reg-tologin-btn:hover {
  color: var(--s2w-ink);
}

.s2w-marketplace-native--auth .s2w-auth__panel .jobsearch-user-form-coltwo,
.s2w-marketplace-native--auth .s2w-auth__panel .jobsearch-user-form-coltwo-full,
.s2w-marketplace-native--auth .s2w-auth__panel .jobsearch-employer-profile-form {
  min-width: 0;
}

@media (max-width: 48rem) {
  .s2w-marketplace-native--auth .s2w-auth {
    padding-block: 2.5rem 4rem;
  }

  .s2w-marketplace-native--auth .s2w-auth__layout {
    gap: 1.5rem;
    width: min(100% - 24px, 90rem);
  }

  .s2w-marketplace-native--auth .s2w-auth__intro h1 {
    max-width: 12ch;
    font-size: clamp(2.45rem, 12vw, 3.4rem);
  }

  .s2w-marketplace-native--auth .s2w-auth__audiences {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 1.35rem;
  }

  .s2w-marketplace-native--auth .s2w-auth__panel {
    padding: 1rem;
    border-radius: var(--s2w-radius-md);
    box-shadow: var(--s2w-shadow-xs);
  }

  .s2w-marketplace-native--auth .s2w-auth__panel .jobsearch-user-form-coltwo,
  .s2w-marketplace-native--auth .s2w-auth__panel .jobsearch-user-form-coltwo-full {
    width: 100%;
    float: none;
  }

  .s2w-marketplace-native--auth .s2w-auth__panel .jobsearch-login-submit-btn,
  .s2w-marketplace-native--auth .s2w-auth__panel .jobsearch-reset-password-submit-btn,
  .s2w-marketplace-native--auth .s2w-auth__panel .jobsearch-register-submit-btn {
    width: 100%;
  }
}

/* The native 50% login/register grid becomes too narrow on tablets. */
@media (min-width: 48rem) and (max-width: 56.25rem) {
  .s2w-marketplace-native--auth .s2w-auth__panel .jobsearch-login-registration-form > .jobsearch-row > .jobsearch-column-6 {
    width: 100%;
    float: none;
  }
}

/* Keep account choices above the form on wide screens and the login first on phones. */
@media (min-width: 48rem) {
  .s2w-marketplace-native--auth .s2w-auth__audiences { order: 1; margin-top: 0; }
  .s2w-marketplace-native--auth .s2w-auth__panel { order: 2; }
}
@media (max-width: 47.999rem) {
  .s2w-marketplace-native--auth .s2w-auth__audiences { margin-top: 0; }
}
