/**
 * OWNERSHIP: resources/css/frontend/auth.css
 * Scoped Sign In / Register / Forgot Password layout and form controls.
 *
 * Uses Customize UI tokens from FrontendTheme (injected on .zype-auth /
 * .zype-form-center). Does not emit a competing palette. No global input
 * selectors. Page auth fills its theme/container width (not a plugin page cap).
 *
 * Loaded as handle zype_auth_layout after zype_login / zype_sign_up / zype-theme
 * so equal-specificity theme input/button rules cannot undo the split.
 *
 * Outer page/content width is owned by the active theme and containing
 * WordPress layout (constrained / wide / full / Group). Do not set a
 * page-level max-width or margin:auto container on .zype-auth--page.
 *
 * Selectors are written to beat theme `.wp-site-blocks input[type=email]` and
 * `button[type=submit]` color rules without using a second stylesheet.
 */

.zype-auth {
  --zype-auth-gap: clamp(48px, 7vw, 120px);
  --zype-auth-input-height: 48px;
  --zype-auth-radius: 2px;
  --zype-auth-text: var(--zype-modal-title, #272424);
  --zype-auth-muted: var(--zype-transaction-description, #60626B);
  --zype-auth-surface: var(--zype-modal-table-item-background, #FFFFFF);
  --zype-auth-border: var(--zype-modal-table-item-border, #D9D8E0);
  --zype-auth-accent: var(--zype-button-text, #00A5DF);
  --zype-auth-accent-border: var(--zype-button-border, #00A5DF);
  --zype-auth-button-bg: var(--zype-button-background, #FFFFFF);
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  color: var(--zype-auth-text);
  text-align: left;
}

.zype-auth *,
.zype-auth *::before,
.zype-auth *::after {
  box-sizing: border-box;
}

.zype-auth.zype-form-center,
.zype-auth.zype-auth--page.zype-form-center {
  text-align: left;
}

/*
 * Page auth fills the theme/container width. Modal/AJAX roots stay compact
 * inside their dialog host and must not invent a second page container.
 */
.zype-auth.zype-auth--page {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.zype-auth--page .zype-auth-layout,
.zype-auth--page .zype-auth-layout.content-wrap,
.zype-auth--page .zype-auth-layout.signup-wrap,
.zype-auth--page .zype-auth-layout.user-action-wrap {
  display: grid;
  /* ~42% form / ~58% support — resilient so children cannot force overflow */
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
  gap: var(--zype-auth-gap);
  align-items: start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.zype-auth-form-column,
.zype-auth-support-column {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.zype-auth--page .zype-auth-form-column .user-wrap,
.zype-auth--page .zype-auth-form-column .holder-main,
.zype-auth--page .zype-auth-form-column .row,
.zype-auth--page .zype-auth-form-column .row > div {
  display: block;
  float: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-left: 0;
  margin-right: 0;
}

.zype-auth-heading,
.zype-auth .title.zype-title,
.zype-auth .zype-custom-title {
  margin: 0 0 1.25rem;
  color: var(--zype-auth-text);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.zype-auth-form,
.zype-auth .user-form,
.zype-auth .field-section {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.zype-auth--page .zype-auth-form,
.zype-auth--page .user-form {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.zype-auth-field,
.zype-auth .zype-input-wrap,
.zype-auth.zype-form-center .zype-input-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0 0 1rem;
}

.zype-auth-label {
  display: block;
  margin: 0 0 0.4rem;
  color: var(--zype-auth-text);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
}

.zype-auth input.zype-auth-input,
.zype-auth input.zype-input-text,
.zype-auth.zype-form-center input.zype-input-text,
.wp-site-blocks .zype-auth input.zype-auth-input,
.wp-site-blocks .zype-auth input[type="email"].zype-auth-input,
.wp-site-blocks .zype-auth input[type="password"].zype-auth-input,
.wp-site-blocks .zype-auth input[type="text"].zype-auth-input {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  min-height: var(--zype-auth-input-height);
  height: auto;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--zype-auth-border);
  border-radius: var(--zype-auth-radius);
  background-color: var(--zype-auth-surface);
  color: var(--zype-auth-text);
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0.01em;
  text-shadow: none;
  appearance: none;
  -webkit-appearance: none;
}

.zype-auth input.zype-auth-input:focus,
.zype-auth input.zype-auth-input:focus-visible,
.zype-auth input.zype-input-text:focus,
.zype-auth input.zype-input-text:focus-visible,
.wp-site-blocks .zype-auth input.zype-auth-input:focus,
.wp-site-blocks .zype-auth input.zype-auth-input:focus-visible {
  border-color: var(--zype-auth-accent-border);
  outline: 2px solid var(--zype-auth-accent-border);
  outline-offset: 2px;
}

.zype-auth-input::placeholder,
.zype-auth .zype-input-text::placeholder {
  color: var(--zype-auth-muted);
  opacity: 0.85;
}

.zype-auth-input:-webkit-autofill,
.zype-auth-input:-webkit-autofill:hover,
.zype-auth-input:-webkit-autofill:focus,
.zype-auth .zype-input-text:-webkit-autofill,
.zype-auth .zype-input-text:-webkit-autofill:hover,
.zype-auth .zype-input-text:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--zype-auth-text);
  caret-color: var(--zype-auth-text);
  box-shadow: 0 0 0 1000px var(--zype-auth-surface) inset;
  -webkit-box-shadow: 0 0 0 1000px var(--zype-auth-surface) inset;
  transition: background-color 99999s ease-out;
}

.zype-auth button.zype-auth-submit,
.zype-auth button.zype-button,
.zype-auth button.zype-custom-button,
.zype-auth.zype-form-center button.zype-button,
.wp-site-blocks .zype-auth button.zype-auth-submit,
.wp-site-blocks .zype-auth button.zype-auth-submit[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: 100%;
  min-height: 44px;
  margin: 0.25rem 0 0;
  padding: 10px 20px;
  border: 2px solid var(--zype-auth-accent-border);
  border-radius: var(--zype-auth-radius);
  background-color: var(--zype-auth-button-bg);
  color: var(--zype-auth-accent);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
  text-shadow: none;
  cursor: pointer;
}

.zype-auth button.zype-auth-submit:hover,
.zype-auth button.zype-auth-submit:focus,
.zype-auth button.zype-auth-submit:focus-visible,
.zype-auth button.zype-button:hover,
.zype-auth button.zype-button:focus,
.wp-site-blocks .zype-auth button.zype-auth-submit[type="submit"]:hover,
.wp-site-blocks .zype-auth button.zype-auth-submit[type="submit"]:focus {
  color: var(--zype-auth-accent);
  border-color: var(--zype-auth-accent-border);
  background-color: var(--zype-auth-button-bg);
  outline: 2px solid var(--zype-auth-accent-border);
  outline-offset: 2px;
}

.zype-auth-links {
  margin: 1rem 0 0;
}

.zype-auth-links p,
.zype-auth .to-forgot-password,
.zype-auth .to-sign-up,
.zype-auth .to-sign-in {
  margin: 0.5rem 0 0;
  color: var(--zype-auth-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.zype-auth-links a,
.zype-auth .to-forgot-password a,
.zype-auth .to-sign-up a,
.zype-auth .to-sign-in a,
.zype-auth-support-cta a {
  color: var(--zype-auth-accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  border-bottom: none;
  box-shadow: none;
}

.zype-auth-links a:hover,
.zype-auth-links a:focus,
.zype-auth-links a:focus-visible,
.zype-auth .to-forgot-password a:hover,
.zype-auth .to-sign-up a:hover,
.zype-auth .to-sign-in a:hover,
.zype-auth-support-cta a:hover,
.zype-auth-support-cta a:focus,
.zype-auth-support-cta a:focus-visible {
  color: var(--zype-auth-accent);
  box-shadow: none;
  outline: 2px solid var(--zype-auth-accent-border);
  outline-offset: 2px;
}

.zype-auth .error-section,
.zype-auth .success-section,
.zype-auth .zype_flash_messages {
  max-width: 100%;
  margin: 0 0 0.75rem;
  text-align: left;
  color: var(--zype-auth-text);
}

.zype-auth .error-section:empty,
.zype-auth .success-section:empty,
.zype-auth .zype_flash_messages:empty {
  display: none;
  margin: 0;
}

.zype-auth .signup-note {
  margin: 0 0 1rem;
  color: var(--zype-auth-muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.zype-auth .signup-note a {
  color: var(--zype-auth-accent);
}

.zype-auth-support-column {
  padding: 0.25rem 0 0;
}

.zype-auth-support-eyebrow {
  margin: 0 0 0.5rem;
  color: var(--zype-auth-accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-transform: uppercase;
}

.zype-auth-support-title {
  margin: 0 0 0.85rem;
  color: var(--zype-auth-text);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 600;
  line-height: 1.25;
}

.zype-auth-support-copy {
  margin: 0 0 1.1rem;
  max-width: min(100%, 48ch);
  color: var(--zype-auth-muted);
  font-size: 1rem;
  line-height: 1.55;
}

.zype-auth-support-benefits {
  margin: 0 0 1.15rem;
  padding: 0 0 0 1.15rem;
  max-width: min(100%, 48ch);
  color: var(--zype-auth-muted);
  font-size: 0.98rem;
  line-height: 1.5;
}

.zype-auth-support-benefits li + li {
  margin-top: 0.55rem;
}

.zype-auth-support-cta {
  margin: 0;
  color: var(--zype-auth-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.zype-auth--modal .zype-auth-layout,
.zype-auth--modal .content-wrap {
  display: block;
  grid-template-columns: none;
}

.zype-auth--modal .zype-auth-form-column {
  width: 100%;
}

.zype-auth--modal .zype-auth-form,
.zype-auth--modal .user-form {
  max-width: 100%;
}

/* Tablet: keep two columns; tighten the gap while space remains usable. */
@media (max-width: 1100px) {
  .zype-auth--page {
    --zype-auth-gap: clamp(28px, 4vw, 64px);
  }
}

/* Small / mobile: stack form first, support second. Fix width — do not clip. */
@media (max-width: 719px) {
  .zype-auth--page .zype-auth-layout,
  .zype-auth--page .zype-auth-layout.content-wrap,
  .zype-auth--page .zype-auth-layout.signup-wrap,
  .zype-auth--page .zype-auth-layout.user-action-wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.75rem;
  }

  .zype-auth--page .zype-auth-form,
  .zype-auth--page .user-form {
    max-width: 100%;
  }

  .zype-auth-support-column {
    border-top: 1px solid var(--zype-auth-border);
    padding-top: 1.5rem;
  }

  .zype-auth-support-copy,
  .zype-auth-support-benefits {
    max-width: 100%;
  }
}

@media (max-width: 430px) {
  .zype-auth-heading,
  .zype-auth .title.zype-title {
    font-size: 1.6rem;
    margin-bottom: 1rem;
  }

  .zype-auth button.zype-auth-submit,
  .zype-auth button.zype-button {
    padding: 10px 16px;
  }
}
