/*
 * marnamic authentication.
 *
 * One canonical visual contract for:
 * - the standalone HivePress login page,
 * - login, registration and password-request modals,
 * - desktop and mobile.
 *
 * Keep auth dimensions here. Generic form rules in style.css remain the base
 * layer, while this file is the single final auth-specific layer.
 */

body.wp-child-theme-marnamic {
  --marnamic-auth-panel-width: 680px;
  --marnamic-auth-register-width: 720px;
  --marnamic-auth-form-width: 520px;
  --marnamic-auth-panel-bg: rgba(15, 25, 27, 0.96);
  --marnamic-auth-field-bg: rgba(11, 21, 23, 0.82);
  --marnamic-auth-border: rgba(161, 192, 195, 0.28);
  --marnamic-auth-border-strong: rgba(161, 192, 195, 0.4);
  --marnamic-auth-shadow: 0 28px 72px rgba(0, 0, 0, 0.42);
}

/* -------------------------------------------------------------------------
 * Shared auth form
 * ---------------------------------------------------------------------- */

body.wp-child-theme-marnamic
:is(
  .hp-form--user-login,
  .hp-form--user-register,
  .hp-form--user-password-request
) {
  display: grid !important;
  box-sizing: border-box !important;
  width: min(100%, var(--marnamic-auth-form-width)) !important;
  max-width: var(--marnamic-auth-form-width) !important;
  gap: 0 !important;
  margin: 0 auto !important;
  padding: 0 !important;
  color: var(--marnamic-ui-text, #f1e9dd) !important;
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  text-align: left !important;
}

body.wp-child-theme-marnamic
.hp-form--user-register {
  width: min(100%, 560px) !important;
  max-width: 560px !important;
}

body.wp-child-theme-marnamic
:is(
  .hp-form--user-login,
  .hp-form--user-register,
  .hp-form--user-password-request
)
.hp-form__header {
  width: 100% !important;
  margin: 0 0 22px !important;
  padding: 0 !important;
  color: var(--marnamic-ui-text-muted, rgba(241, 233, 221, 0.72)) !important;
  text-align: center !important;
}

body.wp-child-theme-marnamic
:is(
  .hp-form--user-login,
  .hp-form--user-register,
  .hp-form--user-password-request
)
.hp-form__description {
  max-width: 50ch !important;
  margin: 0 auto !important;
  color: inherit !important;
  font-size: 0.96rem !important;
  font-weight: 500 !important;
  line-height: 1.55 !important;
}

body.wp-child-theme-marnamic
:is(
  .hp-form--user-login,
  .hp-form--user-register,
  .hp-form--user-password-request
)
.hp-form__messages:empty {
  display: none !important;
}

body.wp-child-theme-marnamic
:is(
  .hp-form--user-login,
  .hp-form--user-register,
  .hp-form--user-password-request
)
.hp-form__messages:not(:empty) {
  display: block !important;
  margin: 0 0 16px !important;
  padding: 12px 14px !important;
  color: var(--marnamic-ui-text, #f1e9dd) !important;
  background: rgba(255, 123, 123, 0.1) !important;
  border: 1px solid rgba(255, 123, 123, 0.42) !important;
  border-radius: var(--marnamic-ui-radius-sm, 6px) !important;
  line-height: 1.45 !important;
}

/* A verified-email registration is a successful next step, not an error.
 * HivePress adds --success after the 201 response, but the generic auth
 * message rule above is intentionally broad and would otherwise keep the
 * red error treatment. Flatten the generated inner div as well so the
 * confirmation reads as one calm status panel instead of nested boxes. */
body.wp-child-theme-marnamic
:is(
  .hp-form--user-login,
  .hp-form--user-register,
  .hp-form--user-password-request
)
.hp-form__messages.hp-form__messages--success {
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  color: var(--marnamic-ui-text, #f1e9dd) !important;
  background: rgba(104, 211, 145, 0.12) !important;
  border: 1px solid rgba(104, 211, 145, 0.5) !important;
  border-left: 4px solid var(--marnamic-success, #68d391) !important;
}

body.wp-child-theme-marnamic
:is(
  .hp-form--user-login,
  .hp-form--user-register,
  .hp-form--user-password-request
)
.hp-form__messages.hp-form__messages--success::before {
  flex: 0 0 auto;
  color: var(--marnamic-success, #68d391);
  content: "\f00c";
  font-family: "Font Awesome 5 Free";
  font-size: 1.15em;
  font-weight: 800;
  line-height: 1.25;
}

body.wp-child-theme-marnamic
:is(
  .hp-form--user-login,
  .hp-form--user-register,
  .hp-form--user-password-request
)
.hp-form__messages.hp-form__messages--success > div {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 !important;
  color: inherit !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-weight: 600 !important;
}

body.wp-child-theme-marnamic
:is(
  .hp-form--user-login,
  .hp-form--user-register,
  .hp-form--user-password-request
)
.hp-form__fields {
  display: grid !important;
  box-sizing: border-box !important;
  width: 100% !important;
  gap: 14px !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.wp-child-theme-marnamic
:is(
  .hp-form--user-login,
  .hp-form--user-register,
  .hp-form--user-password-request
)
.hp-form__field {
  position: relative !important;
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

body.wp-child-theme-marnamic
:is(
  .hp-form--user-login,
  .hp-form--user-register,
  .hp-form--user-password-request
)
.hp-form__field:not(.hp-form__field--checkbox):not(.hp-form__field--captcha)
.hp-field__label {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

body.wp-child-theme-marnamic
:is(
  .hp-form--user-login,
  .hp-form--user-register,
  .hp-form--user-password-request
)
:is(
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="search"],
  input[type="url"],
  input[type="tel"]
) {
  display: block !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: none !important;
  height: 56px !important;
  min-height: 56px !important;
  max-height: 56px !important;
  padding: 0 18px !important;
  color: var(--marnamic-ui-text, #f1e9dd) !important;
  background: var(--marnamic-auth-field-bg) !important;
  background-image: none !important;
  border: 1px solid var(--marnamic-auth-border-strong) !important;
  border-radius: var(--marnamic-ui-radius-md, 8px) !important;
  box-shadow: none !important;
  font-family: var(--marnamic-font-body, inherit) !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
}

body.wp-child-theme-marnamic
:is(
  .hp-form--user-login,
  .hp-form--user-register,
  .hp-form--user-password-request
)
:is(
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="search"],
  input[type="url"],
  input[type="tel"]
)::placeholder {
  color: rgba(241, 233, 221, 0.56) !important;
  opacity: 1 !important;
}

body.wp-child-theme-marnamic
:is(
  .hp-form--user-login,
  .hp-form--user-register,
  .hp-form--user-password-request
)
:is(
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="search"],
  input[type="url"],
  input[type="tel"]
):is(:focus, :focus-visible) {
  outline: 0 !important;
  border-color: var(--marnamic-ui-primary, #e7fd87) !important;
  box-shadow: 0 0 0 3px rgba(231, 253, 135, 0.2) !important;
}

body.wp-child-theme-marnamic
:is(
  .hp-form--user-login,
  .hp-form--user-register
)
.hp-form__field--password
input {
  padding-right: 58px !important;
}

body.wp-child-theme-marnamic
:is(
  .hp-form--user-login,
  .hp-form--user-register
)
.hp-form__field--password
.hp-field__icon {
  position: absolute !important;
  top: 50% !important;
  right: 8px !important;
  bottom: auto !important;
  display: grid !important;
  box-sizing: border-box !important;
  width: 40px !important;
  min-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  place-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--marnamic-ui-text-muted, rgba(241, 233, 221, 0.72)) !important;
  background: rgba(161, 192, 195, 0.06) !important;
  border: 0 !important;
  border-radius: var(--marnamic-ui-radius-sm, 6px) !important;
  box-shadow: none !important;
  text-decoration: none !important;
  transform: translateY(-50%) !important;
}

body.wp-child-theme-marnamic
:is(
  .hp-form--user-login,
  .hp-form--user-register
)
.hp-form__field--password
.hp-field__icon:is(:hover, :focus-visible) {
  color: var(--marnamic-ui-primary-text, #132124) !important;
  background: var(--marnamic-ui-primary, #e7fd87) !important;
}

body.wp-child-theme-marnamic
:is(
  .hp-form--user-login,
  .hp-form--user-register
)
.hp-form__field--password
.hp-field__icon
:is(i, svg) {
  display: inline-grid !important;
  width: 1em !important;
  height: 1em !important;
  place-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  color: currentColor !important;
  fill: currentColor !important;
  line-height: 1 !important;
  opacity: 1 !important;
  vertical-align: middle !important;
}

body.wp-child-theme-marnamic
:is(
  .hp-form--user-login,
  .hp-form--user-register
)
.hp-form__field--password
.hp-field__icon
:is(i, svg)::before {
  display: block !important;
  margin: 0 !important;
  line-height: 1 !important;
}

body.wp-child-theme-marnamic
:is(
  .hp-form--user-login,
  .hp-form--user-register,
  .hp-form--user-password-request
)
.hp-form__footer {
  display: grid !important;
  box-sizing: border-box !important;
  width: 100% !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 16px !important;
  align-items: stretch !important;
  justify-items: stretch !important;
  margin: 24px 0 0 !important;
  padding: 0 !important;
  text-align: center !important;
}

body.wp-child-theme-marnamic
:is(
  .hp-form--user-login,
  .hp-form--user-register,
  .hp-form--user-password-request
)
.hp-form__footer
> * {
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin-inline: 0 !important;
  justify-self: stretch !important;
}

body.wp-child-theme-marnamic
:is(
  .hp-form--user-login,
  .hp-form--user-register,
  .hp-form--user-password-request
)
:is(
  .hp-form__button,
  .hp-form__footer > button,
  .hp-form__footer > .button,
  button[type="submit"],
  input[type="submit"]
) {
  display: inline-flex !important;
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  height: 56px !important;
  min-height: 56px !important;
  max-height: 56px !important;
  flex: 1 1 100% !important;
  align-items: center !important;
  justify-content: center !important;
  justify-self: stretch !important;
  margin: 0 !important;
  padding: 0 22px !important;
  color: var(--marnamic-ui-primary-text, #132124) !important;
  background: var(--marnamic-ui-primary, #e7fd87) !important;
  background-image: none !important;
  border: 1px solid var(--marnamic-ui-primary, #e7fd87) !important;
  border-radius: var(--marnamic-ui-radius-md, 8px) !important;
  box-shadow: none !important;
  font-family: var(--marnamic-font-body, inherit) !important;
  font-size: 1rem !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

body.wp-child-theme-marnamic
:is(
  .hp-form--user-login,
  .hp-form--user-register,
  .hp-form--user-password-request
)
:is(
  .hp-form__button,
  .hp-form__footer > button,
  .hp-form__footer > .button,
  button[type="submit"],
  input[type="submit"]
):is(:hover, :focus-visible) {
  color: var(--marnamic-ui-primary-text, #132124) !important;
  background: var(--marnamic-ui-primary-hover, #dffc5f) !important;
  border-color: var(--marnamic-ui-primary-hover, #dffc5f) !important;
}

body.wp-child-theme-marnamic
:is(
  .hp-form--user-login,
  .hp-form--user-register,
  .hp-form--user-password-request
)
.hp-form__actions {
  display: grid !important;
  box-sizing: border-box !important;
  width: 100% !important;
  gap: 6px !important;
  justify-items: center !important;
  color: var(--marnamic-ui-text-muted, rgba(241, 233, 221, 0.72)) !important;
  text-align: center !important;
}

body.wp-child-theme-marnamic
:is(
  .hp-form--user-login,
  .hp-form--user-register,
  .hp-form--user-password-request
)
:is(.hp-form__action, .hp-form__action a, a.hp-form__action) {
  max-width: 100% !important;
  margin: 0 !important;
  color: var(--marnamic-ui-text-muted, rgba(241, 233, 221, 0.72)) !important;
  font-size: 0.96rem !important;
  font-weight: 500 !important;
  line-height: 1.45 !important;
  text-align: center !important;
}

body.wp-child-theme-marnamic
:is(
  .hp-form--user-login,
  .hp-form--user-register,
  .hp-form--user-password-request
)
:is(.hp-form__action a, a.hp-form__action) {
  display: inline !important;
  color: var(--marnamic-ui-primary, #e7fd87) !important;
  font-weight: 650 !important;
  text-decoration: none !important;
  text-underline-offset: 3px !important;
}

body.wp-child-theme-marnamic
:is(
  .hp-form--user-login,
  .hp-form--user-register,
  .hp-form--user-password-request
)
:is(.hp-form__action a, a.hp-form__action):is(:hover, :focus-visible) {
  color: var(--marnamic-ui-primary-hover, #dffc5f) !important;
  text-decoration: underline !important;
}

/* Registration consent and captcha. */
body.wp-child-theme-marnamic
.hp-form--user-register
.hp-form__field--checkbox {
  display: flex !important;
  min-height: 54px !important;
  align-items: center !important;
  padding: 11px 15px !important;
  color: var(--marnamic-ui-text-muted, rgba(241, 233, 221, 0.72)) !important;
  background: var(--marnamic-auth-field-bg) !important;
  border: 1px solid var(--marnamic-auth-border) !important;
  border-radius: var(--marnamic-ui-radius-md, 8px) !important;
}

body.wp-child-theme-marnamic
.hp-form--user-register
.hp-form__field--checkbox
label {
  display: flex !important;
  width: 100% !important;
  min-width: 0 !important;
  align-items: center !important;
  gap: 12px !important;
  margin: 0 !important;
  color: inherit !important;
  line-height: 1.4 !important;
  cursor: pointer !important;
}

body.wp-child-theme-marnamic
.hp-form--user-register
.hp-form__field--checkbox
input[type="checkbox"] {
  position: static !important;
  flex: 0 0 20px !important;
  width: 20px !important;
  min-width: 20px !important;
  height: 20px !important;
  min-height: 20px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  appearance: auto !important;
  -webkit-appearance: checkbox !important;
  clip: auto !important;
  opacity: 1 !important;
  accent-color: var(--marnamic-ui-primary, #e7fd87) !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  cursor: pointer !important;
}

body.wp-child-theme-marnamic
.hp-form--user-register
.hp-form__field--checkbox
label
> span {
  display: block !important;
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
  padding: 0 !important;
  color: inherit !important;
}

/* HivePress may draw a second checkbox beside the native control. */
body.wp-child-theme-marnamic
.hp-form--user-register
.hp-form__field--checkbox
label
> span::before,
body.wp-child-theme-marnamic
.hp-form--user-register
.hp-form__field--checkbox
label
> span::after {
  display: none !important;
  content: none !important;
}

body.wp-child-theme-marnamic
.hp-form--user-register
.hp-form__field--checkbox
input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--marnamic-ui-primary, #e7fd87) !important;
  outline-offset: 3px !important;
}

body.wp-child-theme-marnamic
.hp-form--user-register
.hp-form__field--checkbox
a {
  color: var(--marnamic-ui-primary, #e7fd87) !important;
  text-decoration: none !important;
}

body.wp-child-theme-marnamic
.hp-form--user-register
.hp-form__field--captcha {
  display: flex !important;
  width: 100% !important;
  min-height: 102px !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 11px !important;
  background: rgba(241, 233, 221, 0.9) !important;
  border: 1px solid rgba(241, 233, 221, 0.78) !important;
  border-radius: var(--marnamic-ui-radius-md, 8px) !important;
  overflow: hidden !important;
}

body.wp-child-theme-marnamic
.hp-form--user-register
:is(.hp-field--captcha, .g-recaptcha) {
  width: 304px !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  overflow: visible !important;
}


/* -------------------------------------------------------------------------
 * Auth modals
 * ---------------------------------------------------------------------- */

body.wp-child-theme-marnamic
.fancybox-container.fancybox-is-open
.fancybox-slide--html:has(
  :is(#user_login_modal, #user_register_modal, #user_password_request_modal)
) {
  display: flex !important;
  box-sizing: border-box !important;
  min-height: 100% !important;
  align-items: flex-start !important;
  justify-content: center !important;
  flex-direction: column !important;
  padding: 16px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  text-align: initial !important;
  white-space: normal !important;
}

body.wp-child-theme-marnamic
.fancybox-container.fancybox-is-open
.fancybox-slide--html:has(
  :is(#user_login_modal, #user_register_modal, #user_password_request_modal)
)::before {
  display: none !important;
  content: none !important;
}

body.wp-child-theme-marnamic
.fancybox-container.fancybox-is-open
:is(#user_login_modal, #user_register_modal, #user_password_request_modal) {
  position: relative !important;
  box-sizing: border-box !important;
  width: min(100%, var(--marnamic-auth-panel-width)) !important;
  min-width: 0 !important;
  max-width: min(100%, var(--marnamic-auth-panel-width)) !important;
  max-height: none !important;
  flex: 0 0 auto !important;
  margin: auto !important;
  padding: 36px 48px 38px !important;
  overflow: visible !important;
  color: var(--marnamic-ui-text, #f1e9dd) !important;
  background: var(--marnamic-auth-panel-bg) !important;
  background-image: none !important;
  border: 1px solid var(--marnamic-auth-border) !important;
  border-radius: 14px !important;
  box-shadow: var(--marnamic-auth-shadow) !important;
  text-align: center !important;
  -webkit-backdrop-filter: blur(10px) saturate(112%) !important;
  backdrop-filter: blur(10px) saturate(112%) !important;
}

body.wp-child-theme-marnamic
.fancybox-container.fancybox-is-open
#user_register_modal {
  width: min(100%, var(--marnamic-auth-register-width)) !important;
  max-width: min(100%, var(--marnamic-auth-register-width)) !important;
  padding-top: 24px !important;
  padding-bottom: 26px !important;
}

body.wp-child-theme-marnamic
.fancybox-container.fancybox-is-open
:is(#user_login_modal, #user_register_modal, #user_password_request_modal)::before {
  display: block !important;
  width: 64px !important;
  height: 64px !important;
  margin: 0 auto 16px !important;
  background: url("../../images/Logo-creme-512.png") center / contain no-repeat !important;
  content: "" !important;
}

body.wp-child-theme-marnamic
.fancybox-container.fancybox-is-open
#user_register_modal::before {
  width: 52px !important;
  height: 52px !important;
  margin-bottom: 10px !important;
}

body.wp-child-theme-marnamic
.fancybox-container.fancybox-is-open
:is(#user_login_modal, #user_register_modal, #user_password_request_modal)
.hp-modal__title {
  max-width: min(100%, 470px) !important;
  margin: 0 auto 26px !important;
  color: var(--marnamic-ui-text, #f1e9dd) !important;
  font-family: var(--marnamic-font-body, inherit) !important;
  font-size: clamp(2rem, 3.6vw, 2.7rem) !important;
  font-weight: 400 !important;
  line-height: 1.08 !important;
  letter-spacing: 0 !important;
  text-align: center !important;
  text-wrap: balance !important;
}

body.wp-child-theme-marnamic
.fancybox-container.fancybox-is-open
#user_register_modal
.hp-modal__title {
  margin-bottom: 16px !important;
  font-size: clamp(1.9rem, 3.1vw, 2.35rem) !important;
}

body.wp-child-theme-marnamic
.fancybox-container.fancybox-is-open
:is(#user_login_modal, #user_register_modal, #user_password_request_modal)
:is(.fancybox-button, .fancybox-close-small, .hp-modal__close) {
  position: absolute !important;
  top: 16px !important;
  right: 16px !important;
  display: inline-flex !important;
  box-sizing: border-box !important;
  width: 42px !important;
  min-width: 42px !important;
  max-width: 42px !important;
  height: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--marnamic-ui-text, #f1e9dd) !important;
  background: rgba(11, 21, 23, 0.78) !important;
  border: 1px solid var(--marnamic-auth-border) !important;
  border-radius: var(--marnamic-ui-radius-md, 8px) !important;
  box-shadow: none !important;
  opacity: 1 !important;
}

body.wp-child-theme-marnamic
.fancybox-container.fancybox-is-open
:is(#user_login_modal, #user_register_modal, #user_password_request_modal)
:is(.fancybox-button, .fancybox-close-small, .hp-modal__close)
svg {
  color: currentColor !important;
  fill: currentColor !important;
}

body.wp-child-theme-marnamic
.fancybox-container.fancybox-is-open
:is(#user_login_modal, #user_register_modal, #user_password_request_modal)
:is(.fancybox-button, .fancybox-close-small, .hp-modal__close):is(:hover, :focus-visible) {
  color: var(--marnamic-ui-primary-text, #132124) !important;
  background: var(--marnamic-ui-primary, #e7fd87) !important;
  border-color: var(--marnamic-ui-primary, #e7fd87) !important;
}

/* Compact registration without a clipped brand/header or a second scrollbar. */
body.wp-child-theme-marnamic
.fancybox-container.fancybox-is-open
#user_register_modal
.hp-form--user-register
.hp-form__fields {
  gap: 10px !important;
}

body.wp-child-theme-marnamic
.fancybox-container.fancybox-is-open
#user_register_modal
.hp-form--user-register
:is(input[type="text"], input[type="email"], input[type="password"]) {
  height: 50px !important;
  min-height: 50px !important;
  max-height: 50px !important;
}

body.wp-child-theme-marnamic
.fancybox-container.fancybox-is-open
#user_register_modal
.hp-form--user-register
.hp-form__field--password
.hp-field__icon {
  top: 50% !important;
}

body.wp-child-theme-marnamic
.fancybox-container.fancybox-is-open
#user_register_modal
.hp-form--user-register
.hp-form__field--checkbox {
  min-height: 50px !important;
  padding-block: 9px !important;
}

body.wp-child-theme-marnamic
.fancybox-container.fancybox-is-open
#user_register_modal
.hp-form--user-register
.hp-form__field--captcha {
  min-height: 96px !important;
  padding-block: 8px !important;
}

body.wp-child-theme-marnamic
.fancybox-container.fancybox-is-open
#user_register_modal
.hp-form--user-register
.hp-form__footer {
  gap: 10px !important;
  margin-top: 16px !important;
}

body.wp-child-theme-marnamic
.fancybox-container.fancybox-is-open
#user_register_modal
.hp-form--user-register
:is(.hp-form__button, button[type="submit"]) {
  height: 50px !important;
  min-height: 50px !important;
  max-height: 50px !important;
}

/* -------------------------------------------------------------------------
 * Standalone login page
 * ---------------------------------------------------------------------- */

body.wp-child-theme-marnamic.hp-template--user-login-page
.site-content {
  display: flex !important;
  box-sizing: border-box !important;
  min-height: calc(100vh - var(--marnamic-header-height, 84px)) !important;
  min-height: calc(100dvh - var(--marnamic-header-height, 84px)) !important;
  align-items: center !important;
  padding-block: clamp(32px, 5vw, 60px) !important;
}

body.wp-child-theme-marnamic.hp-template--user-login-page
.site-content
> .container {
  display: flex !important;
  width: min(calc(100% - 32px), 1180px) !important;
  max-width: 1180px !important;
  align-items: center !important;
  margin-inline: auto !important;
}

body.wp-child-theme-marnamic.hp-template--user-login-page
:is(.hp-page, .hp-page > .hp-row) {
  display: flex !important;
  width: 100% !important;
  max-width: none !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
}

body.wp-child-theme-marnamic.hp-template--user-login-page
.hp-page__content {
  display: flex !important;
  box-sizing: border-box !important;
  width: min(100%, var(--marnamic-auth-panel-width)) !important;
  max-width: var(--marnamic-auth-panel-width) !important;
  flex: 0 1 var(--marnamic-auth-panel-width) !important;
  flex-direction: column !important;
  margin: 0 auto !important;
  padding: 36px 48px 38px !important;
  color: var(--marnamic-ui-text, #f1e9dd) !important;
  background: var(--marnamic-auth-panel-bg) !important;
  background-image: none !important;
  border: 1px solid var(--marnamic-auth-border) !important;
  border-radius: 14px !important;
  box-shadow: var(--marnamic-auth-shadow) !important;
  text-align: center !important;
  -webkit-backdrop-filter: blur(10px) saturate(112%) !important;
  backdrop-filter: blur(10px) saturate(112%) !important;
}

body.wp-child-theme-marnamic.hp-template--user-login-page
.hp-page__content::before {
  display: block !important;
  width: 64px !important;
  height: 64px !important;
  flex: 0 0 64px !important;
  margin: 0 auto 16px !important;
  background: url("../../images/Logo-creme-512.png") center / contain no-repeat !important;
  content: "" !important;
}

body.wp-child-theme-marnamic.hp-template--user-login-page
.marnamic-auth-page__intro {
  width: 100% !important;
  margin: 0 0 26px !important;
  text-align: center !important;
}

body.wp-child-theme-marnamic.hp-template--user-login-page
.marnamic-auth-page__kicker {
  display: inline-flex !important;
  box-sizing: border-box !important;
  min-height: 30px !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 0 12px !important;
  padding: 6px 12px !important;
  color: var(--marnamic-ui-primary, #e7fd87) !important;
  background: rgba(231, 253, 135, 0.08) !important;
  border: 1px solid rgba(231, 253, 135, 0.34) !important;
  border-radius: 999px !important;
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

body.wp-child-theme-marnamic.hp-template--user-login-page
.marnamic-auth-page__intro
h1 {
  max-width: 18ch !important;
  margin: 0 auto 10px !important;
  color: var(--marnamic-ui-text, #f1e9dd) !important;
  font-family: var(--marnamic-font-body, inherit) !important;
  font-size: clamp(2rem, 3.6vw, 2.7rem) !important;
  font-weight: 400 !important;
  line-height: 1.08 !important;
  letter-spacing: 0 !important;
  text-align: center !important;
  text-wrap: balance !important;
}

body.wp-child-theme-marnamic.hp-template--user-login-page
.marnamic-auth-page__intro
p {
  max-width: 48ch !important;
  margin: 0 auto !important;
  color: var(--marnamic-ui-text-muted, rgba(241, 233, 221, 0.72)) !important;
  font-size: 0.96rem !important;
  font-weight: 500 !important;
  line-height: 1.55 !important;
  text-align: center !important;
}

/* Password reset and invitation activation share a complete auth panel. */
body.wp-child-theme-marnamic.hp-template--user-password-reset-page .site-content {
  display: flex !important;
  box-sizing: border-box !important;
  min-height: calc(100vh - var(--marnamic-header-height, 84px)) !important;
  min-height: calc(100dvh - var(--marnamic-header-height, 84px)) !important;
  align-items: center !important;
  padding-block: clamp(32px, 5vw, 60px) !important;
}

body.wp-child-theme-marnamic.hp-template--user-password-reset-page .site-content > .container {
  display: flex !important;
  width: min(calc(100% - 32px), 1180px) !important;
  max-width: 1180px !important;
  align-items: center !important;
  margin-inline: auto !important;
}

body.wp-child-theme-marnamic.hp-template--user-password-reset-page :is(.hp-page, .hp-page > .hp-row) {
  display: flex !important;
  width: 100% !important;
  max-width: none !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
}

body.wp-child-theme-marnamic.hp-template--user-password-reset-page .hp-page__content {
  display: flex !important;
  box-sizing: border-box !important;
  width: min(100%, var(--marnamic-auth-panel-width)) !important;
  max-width: var(--marnamic-auth-panel-width) !important;
  flex: 0 1 var(--marnamic-auth-panel-width) !important;
  flex-direction: column !important;
  margin: 0 auto !important;
  padding: 36px 48px 38px !important;
  color: var(--marnamic-ui-text, #f1e9dd) !important;
  background: var(--marnamic-auth-panel-bg) !important;
  border: 1px solid var(--marnamic-auth-border) !important;
  border-radius: 14px !important;
  box-shadow: var(--marnamic-auth-shadow) !important;
  text-align: center !important;
}

body.wp-child-theme-marnamic.hp-template--user-password-reset-page .hp-page__content::before {
  display: block !important;
  width: 64px !important;
  height: 64px !important;
  flex: 0 0 64px !important;
  margin: 0 auto 16px !important;
  background: url("../../images/Logo-creme-512.png") center / contain no-repeat !important;
  content: "" !important;
}

body.wp-child-theme-marnamic.hp-template--user-password-reset-page .marnamic-auth-page__intro {
  width: 100% !important;
  margin: 0 0 22px !important;
  text-align: center !important;
}

body.wp-child-theme-marnamic.hp-template--user-password-reset-page .marnamic-auth-page__kicker {
  display: inline-flex !important;
  min-height: 30px !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 0 12px !important;
  padding: 6px 12px !important;
  color: var(--marnamic-ui-primary, #e7fd87) !important;
  background: rgba(231, 253, 135, 0.08) !important;
  border: 1px solid rgba(231, 253, 135, 0.34) !important;
  border-radius: 999px !important;
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

body.wp-child-theme-marnamic.hp-template--user-password-reset-page .marnamic-auth-page__intro h1 {
  max-width: 22ch !important;
  margin: 0 auto 10px !important;
  color: var(--marnamic-ui-text, #f1e9dd) !important;
  font-size: clamp(1.9rem, 3.6vw, 2.5rem) !important;
  font-weight: 400 !important;
  line-height: 1.1 !important;
  text-align: center !important;
}

body.wp-child-theme-marnamic.hp-template--user-password-reset-page .marnamic-auth-page__intro p {
  max-width: 48ch !important;
  margin: 0 auto !important;
  color: var(--marnamic-ui-text-muted, rgba(241, 233, 221, 0.72)) !important;
  font-size: 0.96rem !important;
  line-height: 1.55 !important;
}

body.wp-child-theme-marnamic.hp-template--user-password-reset-page .hp-form--user-password-reset {
  display: grid !important;
  width: min(100%, var(--marnamic-auth-form-width)) !important;
  max-width: var(--marnamic-auth-form-width) !important;
  gap: 14px !important;
  margin: 0 auto !important;
  color: var(--marnamic-ui-text, #f1e9dd) !important;
  text-align: left !important;
}

body.wp-child-theme-marnamic.hp-template--user-password-reset-page .hp-form--user-password-reset .hp-form__description {
  margin: 0 0 4px !important;
  color: var(--marnamic-ui-text-muted, rgba(241, 233, 221, 0.72)) !important;
  line-height: 1.55 !important;
}

body.wp-child-theme-marnamic.hp-template--user-password-reset-page .hp-form--user-password-reset :is(.hp-form__field, .hp-form__footer) {
  width: 100% !important;
  margin: 0 !important;
}

body.wp-child-theme-marnamic.hp-template--user-password-reset-page .hp-form--user-password-reset :is(input[type="password"], button[type="submit"]) {
  box-sizing: border-box !important;
  width: 100% !important;
  min-height: 52px !important;
  border-radius: 7px !important;
}

@media (max-width: 640px) {
  body.wp-child-theme-marnamic.hp-template--user-password-reset-page .hp-page__content {
    padding: 28px 18px 26px !important;
  }
}

/*
 * The header login action is redundant on the login route and used to open a
 * second, differently-sized login surface on top of the page.
 */
body.wp-child-theme-marnamic.hp-template--user-login-page
.hp-menu__item--user-login {
  display: none !important;
}

/* -------------------------------------------------------------------------
 * Responsive auth
 * ---------------------------------------------------------------------- */

@media (max-width: 980px) {
  body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .fancybox-container.fancybox-is-open
  .fancybox-stage:has(
    :is(#user_login_modal, #user_register_modal, #user_password_request_modal)
  ) {
    padding: 0 !important;
    overflow: hidden !important;
  }

  body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .fancybox-container.fancybox-is-open
  .fancybox-slide--html:has(
    :is(#user_login_modal, #user_register_modal, #user_password_request_modal)
  ) {
    width: 100% !important;
    min-height: 100% !important;
    align-items: center !important;
    overscroll-behavior: contain !important;
  }
}

@media (max-width: 640px) {
  body.wp-child-theme-marnamic
  .fancybox-container.fancybox-is-open
  .fancybox-slide--html:has(
    :is(#user_login_modal, #user_register_modal, #user_password_request_modal)
  ) {
    padding: 12px !important;
  }

  body.wp-child-theme-marnamic
  .fancybox-container.fancybox-is-open
  :is(#user_login_modal, #user_register_modal, #user_password_request_modal) {
    width: 100% !important;
    max-width: 100% !important;
    margin: auto !important;
    padding: 28px 18px 26px !important;
    border-radius: 12px !important;
  }

  body.wp-child-theme-marnamic
  .fancybox-container.fancybox-is-open
  #user_register_modal {
    padding-top: 22px !important;
    padding-bottom: 24px !important;
  }

  body.wp-child-theme-marnamic
  .fancybox-container.fancybox-is-open
  :is(#user_login_modal, #user_register_modal, #user_password_request_modal)::before {
    width: 54px !important;
    height: 54px !important;
    margin-bottom: 12px !important;
  }

  body.wp-child-theme-marnamic
  .fancybox-container.fancybox-is-open
  #user_register_modal::before {
    width: 46px !important;
    height: 46px !important;
    margin-bottom: 8px !important;
  }

  body.wp-child-theme-marnamic
  .fancybox-container.fancybox-is-open
  :is(#user_login_modal, #user_register_modal, #user_password_request_modal)
  .hp-modal__title {
    max-width: calc(100% - 52px) !important;
    margin-bottom: 20px !important;
    font-size: clamp(1.8rem, 9vw, 2.25rem) !important;
  }

  body.wp-child-theme-marnamic
  .fancybox-container.fancybox-is-open
  #user_register_modal
  .hp-modal__title {
    margin-bottom: 14px !important;
    font-size: clamp(1.7rem, 8.5vw, 2.1rem) !important;
  }

  body.wp-child-theme-marnamic
  .fancybox-container.fancybox-is-open
  :is(#user_login_modal, #user_register_modal, #user_password_request_modal)
  :is(.fancybox-button, .fancybox-close-small, .hp-modal__close) {
    top: 12px !important;
    right: 12px !important;
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
  }

  body.wp-child-theme-marnamic
  :is(
    .hp-form--user-login,
    .hp-form--user-register,
    .hp-form--user-password-request
  )
  .hp-form__fields {
    gap: 12px !important;
  }

  body.wp-child-theme-marnamic
  :is(
    .hp-form--user-login,
    .hp-form--user-register,
    .hp-form--user-password-request
  )
  :is(
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="search"],
    input[type="url"],
    input[type="tel"]
  ),
  body.wp-child-theme-marnamic
  :is(
    .hp-form--user-login,
    .hp-form--user-register,
    .hp-form--user-password-request
  )
  :is(
    .hp-form__button,
    .hp-form__footer > button,
    .hp-form__footer > .button,
    button[type="submit"],
    input[type="submit"]
  ) {
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
  }

  body.wp-child-theme-marnamic
  :is(
    .hp-form--user-login,
    .hp-form--user-register
  )
  .hp-form__field--password
  .hp-field__icon {
    top: 50% !important;
  }

  body.wp-child-theme-marnamic
  .hp-form--user-register
  .hp-form__field--captcha {
    min-height: 88px !important;
    padding: 5px 0 !important;
  }

  body.wp-child-theme-marnamic
  .hp-form--user-register
  .g-recaptcha {
    transform: scale(0.86) !important;
    transform-origin: center !important;
  }

  body.wp-child-theme-marnamic.hp-template--user-login-page
  .site-content {
    align-items: flex-start !important;
    padding-block: 24px 40px !important;
  }

  body.wp-child-theme-marnamic.hp-template--user-login-page
  .site-content
  > .container {
    width: min(calc(100% - 24px), var(--marnamic-auth-panel-width)) !important;
  }

  body.wp-child-theme-marnamic.hp-template--user-login-page
  .hp-page__content {
    padding: 28px 18px 30px !important;
    border-radius: 12px !important;
  }

  body.wp-child-theme-marnamic.hp-template--user-login-page
  .hp-page__content::before {
    width: 54px !important;
    height: 54px !important;
    flex-basis: 54px !important;
    margin-bottom: 12px !important;
  }

  body.wp-child-theme-marnamic.hp-template--user-login-page
  .marnamic-auth-page__intro {
    margin-bottom: 22px !important;
  }

  body.wp-child-theme-marnamic.hp-template--user-login-page
  .marnamic-auth-page__intro
  h1 {
    max-width: 15ch !important;
    font-size: clamp(1.8rem, 9vw, 2.25rem) !important;
  }

  body.wp-child-theme-marnamic.hp-template--user-login-page
  .marnamic-auth-page__intro
  p {
    max-width: 36ch !important;
    font-size: 0.92rem !important;
  }
}
