/**
 * ZJMS auth page overrides (cache-bust companion to zjms.css)
 * Login redesign — partners grid + utility cards.
 */
.zjms-main--auth {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(18, 135, 127, 0.12), transparent 55%),
    linear-gradient(180deg, #e9f2f0 0%, #f5f8f7 45%, #f3f6f9 100%);
  padding-block: 1.5rem 2.5rem;
}
.zjms-container--auth { max-width: 760px; }
.zjms-auth { display: flex; flex-direction: column; align-items: center; width: 100%; }
.zjms-auth__card {
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
  padding: 1.75rem 1.5rem 1.85rem;
  background: #fff;
  border: 1px solid #dde7e5;
  border-radius: 12px;
  box-shadow: 0 10px 36px rgba(13, 79, 74, 0.1);
}
.zjms-auth__brand { text-align: center; margin-bottom: 1.25rem; }
.zjms-auth__brand-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  color: inherit;
  text-decoration: none;
}
.zjms-auth__logo { display: block; max-height: 72px; width: auto; object-fit: contain; }
.zjms-auth__journal {
  font-family: "Roboto Slab", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0d4f4a;
  line-height: 1.3;
  max-width: 20rem;
}
.zjms-auth__title {
  margin: 0 0 0.35rem;
  text-align: center;
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  color: #0d4f4a;
}
.zjms-auth__lead,
.zjms-auth__roles-hint,
.zjms-auth__providers-label {
  margin: 0 0 1rem;
  text-align: center;
  color: #56686a;
  font-size: 0.925rem;
}
.zjms-auth__roles { margin-bottom: 1.35rem; }
.zjms-auth__roles-label {
  margin: 0 0 0.25rem;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #0d4f4a;
}
.zjms-role-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  padding: 0.35rem;
  background: #f0f4f7;
  border-radius: 10px;
  border: 1px solid #dde7e5;
}
@media (min-width: 768px) {
  .zjms-role-seg { grid-template-columns: repeat(4, 1fr); }
}
.zjms-role-seg__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.45rem 0.5rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: center;
  color: #0d4f4a !important;
  background: transparent;
  border: 1px solid transparent;
  text-decoration: none;
}
.zjms-role-seg__btn:hover,
.zjms-role-seg__btn:focus-visible {
  background: #fff;
  border-color: #dde7e5;
  text-decoration: none;
  color: #0d4f4a !important;
}
.zjms-auth__forgot { display: inline-block; margin-top: 0.4rem; font-size: 0.875rem; font-weight: 600; }
.zjms-auth__form .buttons {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  margin-top: 1.35rem;
}
.zjms-auth__submit,
.zjms-auth__form button.submit {
  width: 100% !important;
  min-height: 48px !important;
  border-radius: 10px !important;
}
.zjms-auth__providers {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #dde7e5;
}
.zjms-auth__provider-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.zjms-auth__provider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 44px;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  border: 1px solid #dde7e5;
  background: #f8fbfa;
  color: #16211f !important;
  font-weight: 600;
  font-size: 0.925rem;
  text-decoration: none;
}
.zjms-auth__provider img { width: 28px; height: 28px; object-fit: contain; }
.zjms-auth__register { margin: 1rem 0 0; text-align: center; }
.zjms-auth__register-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font-weight: 600;
  font-size: 0.925rem;
  color: #12877f !important;
}
.page_login,
.page_openid_login { max-width: none; }
.zjms-auth__form input[type="text"],
.zjms-auth__form input[type="password"] {
  min-height: 44px;
  border-radius: 10px;
}

/* —— Partners / Indexed-in grid —— */
.zjms-auth-partners {
  width: 100%;
  max-width: 960px;
  margin: 0.75rem auto 1rem;
  padding: 1.25rem 1rem 1.35rem;
  background: #fff;
  border: 1px solid #dde7e5;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(13, 79, 74, 0.05);
}

.zjms-auth-partners__title {
  margin: 0 0 1rem;
  text-align: center;
  font-size: 1.05rem;
  color: #0d4f4a;
}

/* Logo grid — always on, all breakpoints */
.zjms-auth-partners__grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem 1.25rem;
  align-items: stretch;
  width: 100%;
}

@media (max-width: 575.98px) {
  .zjms-auth-partners__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
}

/* Each partner cell */
.zjms-auth-partners__grid > .pkp_block.block_custom,
.zjms-auth-partners__grid > .block_custom {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
  min-width: 0;
  margin: 0 !important;
  padding: 0.65rem 0.5rem !important;
  background: #f4f8f7 !important;
  border: 1px solid #dde7e5 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  text-align: center;
}

.zjms-auth-partners__grid > .pkp_block.block_custom .title,
.zjms-auth-partners__grid > .block_custom .title,
.zjms-auth-partners__grid > .pkp_block.block_custom h2 {
  /* Un-hide screen-reader titles so labels show above logos */
  position: static !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  clip: auto !important;
  clip-path: none !important;
  white-space: normal !important;
  border: 0 !important;
  font-family: "Noto Sans", "Segoe UI", sans-serif !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.25;
  text-align: center !important;
  color: #56686a !important;
}

.zjms-auth-partners__grid > .pkp_block.block_custom .content,
.zjms-auth-partners__grid > .block_custom .content {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 64px;
  margin: 0 !important;
  padding: 0 !important;
  gap: 0 !important;
}

.zjms-auth-partners__grid > .pkp_block.block_custom .content p,
.zjms-auth-partners__grid > .block_custom .content p {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 0;
}

/* Kill empty spacer paragraphs from TinyMCE */
.zjms-auth-partners__grid > .pkp_block.block_custom .content p:empty,
.zjms-auth-partners__grid > .pkp_block.block_custom .content p:has(> br:only-child),
.zjms-auth-partners__is-empty {
  display: none !important;
}

.zjms-auth-partners__grid a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
}

.zjms-auth-partners__grid img {
  display: block !important;
  width: auto !important;
  max-width: 110px !important;
  height: auto !important;
  max-height: 56px !important;
  object-fit: contain !important;
  margin: 0 auto !important;
}

/* Hide duplicate role CTA + empty ASI/FATCAT blocks */
.zjms-auth-partners__grid #customblock-rolelogin,
.zjms-auth-partners__grid .zjms-block--cta,
.zjms-main--auth .cmp_breadcrumbs,
.zjms-main--auth .zjms-breadcrumbs {
  display: none !important;
}

/* Utility cards row (Developed By / Information / Make a Submission) */
.zjms-auth-partners__utils {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-top: 1.15rem;
  padding-top: 1.15rem;
  border-top: 1px solid #dde7e5;
}

@media (max-width: 575.98px) {
  .zjms-auth-partners__utils {
    grid-template-columns: 1fr;
  }
}

.zjms-auth-partners__utils > .pkp_block {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin: 0 !important;
  padding: 0.9rem 1rem !important;
  background: #f4f8f7 !important;
  border: 1px solid #dde7e5 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  text-align: left;
}

.zjms-auth-partners__utils > .pkp_block .title,
.zjms-auth-partners__utils > .pkp_block h2 {
  position: static !important;
  width: auto !important;
  height: auto !important;
  margin: 0 0 0.5rem !important;
  padding: 0 !important;
  overflow: visible !important;
  clip: auto !important;
  clip-path: none !important;
  white-space: normal !important;
  border: 0 !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #0d4f4a !important;
  font-family: "Noto Sans", "Segoe UI", sans-serif !important;
}

.zjms-auth-partners__utils .content {
  margin: 0;
  padding: 0;
}

.zjms-auth-partners__utils .content ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.zjms-auth-partners__utils .content a {
  font-size: 0.875rem;
  font-weight: 600;
  color: #12877f !important;
  text-decoration: none;
}

.zjms-auth-partners__utils .content a:hover,
.zjms-auth-partners__utils .content a:focus-visible {
  color: #0d4f4a !important;
  text-decoration: underline;
}

.zjms-auth-partners__utils .block_make_submission_link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  background: #0d4f4a;
  color: #fff !important;
  font-weight: 600;
  font-size: 0.875rem;
  text-align: center;
}

.zjms-auth-partners__utils .block_make_submission_link:hover,
.zjms-auth-partners__utils .block_make_submission_link:focus-visible {
  background: #12877f;
  color: #fff !important;
  text-decoration: none !important;
}

@media (min-width: 768px) {
  .zjms-auth__card {
    padding: 2rem 1.85rem 2.1rem;
  }
}

@media (max-width: 575.98px) {
  .zjms-main--auth {
    padding-block: 1rem 2rem;
  }
  .zjms-auth__card {
    padding: 1.35rem 1.1rem 1.5rem;
    border-radius: 10px;
  }
}


/* Role selector removed from login card */
.zjms-auth__roles,
.zjms-role-seg { display: none !important; }

/* OpenID plugin forces #openid-provider-list { width:400px } — keep inside card */
.zjms-auth #openid-provider-list,
.page_openid_login #openid-provider-list,
.zjms-auth__provider-list {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  list-style: none;
}

.zjms-auth #openid-provider-list li {
  margin: 0 0 0.65rem !important;
  list-style: none;
  width: 100%;
}

.zjms-auth #openid-provider-list a,
.zjms-auth__provider {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

.zjms-auth #openid-provider-list a > div {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 44px !important;
  max-height: none !important;
  padding: 0.55rem 1rem;
  border-radius: 10px !important;
  border: 1px solid #dde7e5 !important;
  background: #f8fbfa !important;
  box-shadow: none !important;
}

.zjms-auth fieldset.fields > legend {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}


/* —— Register page (registerUser) —— */
.zjms-container--auth {
  max-width: 760px;
}

.page_register {
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 2rem;
  background: #fff;
  border: 1px solid #dde7e5;
  border-radius: 12px;
  box-shadow: 0 10px 36px rgba(13, 79, 74, 0.1);
  box-sizing: border-box;
}

.page_register > h1 {
  margin-top: 0;
  text-align: center;
  color: #0d4f4a;
}

.page_register > p {
  text-align: center;
  color: #56686a;
}

.zjms-main--auth .page_register .cmp_breadcrumbs {
  display: none !important;
}

/* ORCID connect badge — compact button, not a 256px SVG frame */
#connect-orcid-button,
.page_register #connect-orcid-button.pkp_button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem;
  width: auto !important;
  max-width: 280px !important;
  min-height: 44px !important;
  height: auto !important;
  padding: 12px 16px !important;
  margin: 0 0 0.75rem !important;
  border: 1px solid #dde7e5 !important;
  border-radius: 10px !important;
  background: #f8fbfa !important;
  color: #16211f !important;
  font-weight: 600 !important;
  font-size: 0.925rem !important;
  line-height: 1.3 !important;
  box-shadow: none !important;
  cursor: pointer;
  text-align: left;
  overflow: hidden;
}

#connect-orcid-button:hover,
#connect-orcid-button:focus-visible {
  border-color: #a6ce39 !important;
  background: #fff !important;
  box-shadow: 0 2px 8px rgba(13, 79, 74, 0.08) !important;
}

#connect-orcid-button .orcid_button_container,
.orcid_button_container {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0.55rem;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  white-space: normal;
}

#connect-orcid-button .orcid_icon,
.orcid_icon {
  display: block !important;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  flex-shrink: 0;
  margin: 0 !important;
}

.page_register a[href*="orcid"] {
  display: inline-block;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #12877f !important;
}

/* Form fields fill the centered card */
.page_register .cmp_form,
.page_register form.register {
  max-width: none;
  width: 100%;
}

.page_register fieldset {
  margin: 0 0 1.25rem;
  padding: 0;
  border: 0;
}

.page_register fieldset > legend {
  width: 100%;
  margin: 0 0 0.75rem;
  padding: 0;
  font-family: "Roboto Slab", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0d4f4a;
}

.page_register .fields > div {
  margin-bottom: 1rem;
}

/* Register CTA = same solid navy as Login */
.page_register .buttons {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.page_register .buttons .submit,
.page_register .buttons button.submit,
.page_register .buttons button[type="submit"],
.page_register button.submit,
body.pkp_page_user.pkp_op_registerUser .page_register button.submit,
body.pkp_page_user.pkp_op_registerUser .page_register .buttons button.submit:not(:first-of-type) {
  -webkit-appearance: none !important;
  appearance: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-height: 48px !important;
  padding: 0.7rem 1.35rem !important;
  border: 2px solid #0d4f4a !important;
  border-radius: 10px !important;
  background: #0d4f4a !important;
  color: #fff !important;
  font-size: 1.05rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  opacity: 1 !important;
  cursor: pointer !important;
  filter: none !important;
  text-decoration: none !important;
}

.page_register .buttons .submit:hover,
.page_register .buttons .submit:focus-visible,
.page_register button.submit:hover,
.page_register button.submit:focus-visible {
  background: #12877f !important;
  border-color: #12877f !important;
  color: #fff !important;
  opacity: 1 !important;
}

/* Do not treat Register as a muted secondary action */
.page_register .cmp_form .buttons button.submit,
.page_register .cmp_form .buttons button[type="submit"] {
  background: #0d4f4a !important;
  color: #fff !important;
  border-color: #0d4f4a !important;
  opacity: 1 !important;
}


/* —— Register form: full-width inputs + Bootstrap country select —— */
.page_register .cmp_form label,
.page_register form.register label {
  display: block !important;
  width: 100% !important;
}

.page_register .cmp_form .fields > div,
.page_register form.register .fields > div {
  width: 100%;
}

.page_register .cmp_form input[type="text"],
.page_register .cmp_form input[type="email"],
.page_register .cmp_form input[type="password"],
.page_register .cmp_form input[type="search"],
.page_register .cmp_form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]),
.page_register form.register input[type="text"],
.page_register form.register input[type="email"],
.page_register form.register input[type="password"],
.page_register form.register select,
.page_register #country,
.page_register select.form-select {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box !important;
}

/* Bootstrap form-select look (ensure even if class missing) */
.page_register #country,
.page_register select.form-select {
  min-height: 44px !important;
  padding: 0.65rem 2.5rem 0.65rem 0.85rem !important;
  font-size: 1rem !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  color: #16211f !important;
  background-color: #fff !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.75rem center !important;
  background-size: 16px 12px !important;
  border: 1px solid #dde7e5 !important;
  border-radius: 10px !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
}

.page_register #country:focus,
.page_register select.form-select:focus {
  border-color: #12877f !important;
  outline: 2px solid rgba(18, 135, 127, 0.35) !important;
  outline-offset: 1px;
  box-shadow: none !important;
}

/* Override OJS build.css max-width:20em on auth pages */
.zjms-main--auth .cmp_form input[type="text"],
.zjms-main--auth .cmp_form input[type="email"],
.zjms-main--auth .cmp_form input[type="password"],
.zjms-main--auth .cmp_form select {
  max-width: none !important;
  width: 100% !important;
}
