/* FPPTI Jabar Theme v1.10.7
 * Consistent typography for Static Pages and consistent Login/Register cards.
 * Loaded last so legacy OJS/plugin/Word rules cannot override the final UI.
 */

:root {
  --fppti-ui-font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --fppti-title: #0F172A;
  --fppti-text: #475569;
  --fppti-border: #D7E2F0;
  --fppti-surface: #FFFFFF;
  --fppti-soft: #F8FAFC;
  --fppti-blue: #004AAC;
}

/* --------------------------------------------------------------------------
   STATIC PAGE CONSISTENCY
   Static Pages plugin always renders: .pkp_structure_main > .page > h2 + content.
   Do not depend on body route classes because StaticPages rewrites the route at runtime.
   -------------------------------------------------------------------------- */
html body .pkp_structure_main > .page > h2:first-child {
  position: relative !important;
  margin: 0 0 18px !important;
  padding: 0 !important;
  border: 0 !important;
  font-family: var(--fppti-ui-font) !important;
  font-size: clamp(24px, 2vw, 28px) !important;
  font-weight: 800 !important;
  line-height: 1.28 !important;
  letter-spacing: -.025em !important;
  color: var(--fppti-title) !important;
}
html body .pkp_structure_main > .page > h2:first-child::before,
html body .pkp_structure_main > .page > h2:first-child::after {
  display: none !important;
  content: none !important;
}

/* Everything after the Static Page title uses one typography scale. */
html body .pkp_structure_main > .page > h2:first-child ~ * {
  font-family: var(--fppti-ui-font) !important;
}
html body .pkp_structure_main > .page > h2:first-child ~ p,
html body .pkp_structure_main > .page > h2:first-child ~ div p,
html body .pkp_structure_main > .page > h2:first-child ~ ul li,
html body .pkp_structure_main > .page > h2:first-child ~ ol li,
html body .pkp_structure_main > .page > h2:first-child ~ div li {
  font-family: var(--fppti-ui-font) !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 1.72 !important;
  color: var(--fppti-text) !important;
  text-align: left !important;
  text-indent: 0 !important;
}
html body .pkp_structure_main > .page > h2:first-child ~ p {
  margin: 0 0 14px !important;
}

/* Internal headings on a Static Page: H3/H4 are subsections, not page titles. */
html body .pkp_structure_main > .page > h2:first-child ~ h3,
html body .pkp_structure_main > .page > h2:first-child ~ div h3 {
  position: relative !important;
  margin: 26px 0 12px !important;
  padding-left: 14px !important;
  font-family: var(--fppti-ui-font) !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  line-height: 1.4 !important;
  letter-spacing: -.01em !important;
  color: var(--fppti-title) !important;
}
html body .pkp_structure_main > .page > h2:first-child ~ h4,
html body .pkp_structure_main > .page > h2:first-child ~ div h4 {
  position: relative !important;
  margin: 22px 0 10px !important;
  padding-left: 14px !important;
  font-family: var(--fppti-ui-font) !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  line-height: 1.45 !important;
  color: var(--fppti-title) !important;
}
html body .pkp_structure_main > .page > h2:first-child ~ h3::before,
html body .pkp_structure_main > .page > h2:first-child ~ div h3::before,
html body .pkp_structure_main > .page > h2:first-child ~ h4::before,
html body .pkp_structure_main > .page > h2:first-child ~ div h4::before {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  left: 0 !important;
  top: .12em !important;
  bottom: .12em !important;
  width: 3px !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg, #004AAC 0%, #3B82F6 100%) !important;
}

/* Legacy Word/TinyMCE markup on Static Pages must not carry its old font/size. */
html body .pkp_structure_main > .page > h2:first-child ~ * [class*="Mso"],
html body .pkp_structure_main > .page > h2:first-child ~ * [style*="font-family"],
html body .pkp_structure_main > .page > h2:first-child ~ * font,
html body .pkp_structure_main > .page > h2:first-child ~ [class*="Mso"],
html body .pkp_structure_main > .page > h2:first-child ~ [style*="font-family"] {
  font-family: var(--fppti-ui-font) !important;
}
html body .pkp_structure_main > .page > h2:first-child ~ * [style*="font-size"],
html body .pkp_structure_main > .page > h2:first-child ~ [style*="font-size"] {
  font-size: inherit !important;
}
html body .pkp_structure_main > .page > h2:first-child ~ * [style*="line-height"],
html body .pkp_structure_main > .page > h2:first-child ~ [style*="line-height"] {
  line-height: inherit !important;
}
html body .pkp_structure_main > .page > h2:first-child ~ * [style*="text-indent"],
html body .pkp_structure_main > .page > h2:first-child ~ [style*="text-indent"] {
  text-indent: 0 !important;
}

/* Semantic and Word-created lists share the same rhythm. */
html body .pkp_structure_main > .page > h2:first-child ~ ul,
html body .pkp_structure_main > .page > h2:first-child ~ ol,
html body .pkp_structure_main > .page > h2:first-child ~ div ul,
html body .pkp_structure_main > .page > h2:first-child ~ div ol {
  margin: 12px 0 20px !important;
  padding-left: 26px !important;
}
html body .pkp_structure_main > .page > h2:first-child ~ * li {
  margin-bottom: 9px !important;
  padding-left: 3px !important;
}
html body .pkp_structure_main > .page > h2:first-child ~ * li::marker {
  color: #1D6FE8 !important;
}
html body .pkp_structure_main > .page > h2:first-child ~ p[class*="MsoListParagraph"],
html body .pkp_structure_main > .page > h2:first-child ~ div p[class*="MsoListParagraph"] {
  position: relative !important;
  margin: 0 0 9px !important;
  padding: 0 0 0 22px !important;
  font-size: 14px !important;
  line-height: 1.72 !important;
  text-indent: 0 !important;
}
html body .pkp_structure_main > .page > h2:first-child ~ p[class*="MsoListParagraph"]::before,
html body .pkp_structure_main > .page > h2:first-child ~ div p[class*="MsoListParagraph"]::before {
  content: "•" !important;
  position: absolute !important;
  left: 3px !important;
  top: 0 !important;
  color: #1D6FE8 !important;
  font: 700 15px/1.72 var(--fppti-ui-font) !important;
}
html body .pkp_structure_main > .page > h2:first-child ~ p[class*="MsoListParagraph"] > span:first-child[style*="Symbol"],
html body .pkp_structure_main > .page > h2:first-child ~ div p[class*="MsoListParagraph"] > span:first-child[style*="Symbol"] {
  display: none !important;
}

/* --------------------------------------------------------------------------
   LOGIN + REGISTER CONSISTENCY
   One card language: same width, radius, header spacing and fieldset treatment.
   -------------------------------------------------------------------------- */
html body .pkp_structure_main > .page_login,
html body .pkp_structure_main > .page_register {
  box-sizing: border-box !important;
  width: min(100%, 820px) !important;
  max-width: 820px !important;
  margin: 24px auto 36px !important;
  padding: 32px 34px 34px !important;
  border: 1px solid var(--fppti-border) !important;
  border-radius: 16px !important;
  background: var(--fppti-surface) !important;
  box-shadow: 0 12px 34px rgba(15,23,42,.055) !important;
  overflow: hidden !important;
}
html body .pkp_structure_main > .page_login > h1,
html body .pkp_structure_main > .page_register > h1 {
  margin: 0 0 10px !important;
  padding: 0 !important;
  font-family: var(--fppti-ui-font) !important;
  font-size: clamp(26px, 2vw, 30px) !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  letter-spacing: -.025em !important;
  color: var(--fppti-title) !important;
  text-align: center !important;
}
html body .pkp_structure_main > .page_login > p,
html body .pkp_structure_main > .page_register > p {
  margin: 0 0 24px !important;
  font-family: var(--fppti-ui-font) !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
  color: #64748B !important;
  text-align: center !important;
}

html body .page_login .cmp_form.login,
html body .page_register .cmp_form.register {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Register fieldsets used to look like square browser-default boxes. */
html body .page_register .cmp_form.register > fieldset,
html body .page_register .cmp_form.register .fields > fieldset,
html body .page_register fieldset.profile,
html body .page_register fieldset.login,
html body .page_register fieldset.consent,
html body .page_register fieldset.reviewer,
html body .page_register fieldset.context_optin {
  box-sizing: border-box !important;
  width: 100% !important;
  margin: 0 0 18px !important;
  padding: 20px 20px 18px !important;
  border: 1px solid var(--fppti-border) !important;
  border-radius: 12px !important;
  background: #FBFDFF !important;
}
html body .page_register fieldset > legend:not(.pkp_screen_reader) {
  padding: 0 8px !important;
  font-family: var(--fppti-ui-font) !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
  color: #1E293B !important;
}

/* Same label and control scale on both auth forms. */
html body .page_login label > .label,
html body .page_register label > .label {
  font-family: var(--fppti-ui-font) !important;
  font-size: 12.5px !important;
  font-weight: 750 !important;
  line-height: 1.35 !important;
  color: #334155 !important;
}
html body .page_login input[type="text"],
html body .page_login input[type="email"],
html body .page_login input[type="password"],
html body .page_register input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
html body .page_register select,
html body .page_register textarea,
html body .page_register .select2-container .select2-selection {
  box-sizing: border-box !important;
  width: 100% !important;
  min-height: 48px !important;
  border: 1px solid #CBD5E1 !important;
  border-radius: 9px !important;
  background: #FFFFFF !important;
  color: #0F172A !important;
  font-family: var(--fppti-ui-font) !important;
  font-size: 13.5px !important;
  box-shadow: none !important;
}

/* Register actions mirror Login actions. */
html body .page_register .buttons {
  display: grid !important;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important;
  gap: 12px !important;
  width: 100% !important;
  margin: 6px 0 0 !important;
  padding: 0 !important;
}
html body .page_register .buttons > * {
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-height: 44px !important;
  margin: 0 !important;
  padding: 0 16px !important;
  border-radius: 9px !important;
  font: 750 13px/1 var(--fppti-ui-font) !important;
  text-decoration: none !important;
}
html body .page_register .buttons .submit {
  border: 1px solid var(--fppti-blue) !important;
  background: var(--fppti-blue) !important;
  color: #FFFFFF !important;
}
html body .page_register .buttons .login {
  border: 1px solid #CBD5E1 !important;
  background: #FFFFFF !important;
  color: #334155 !important;
}

/* Dark mode */
html[data-openlib-color-mode="dark"] body .pkp_structure_main > .page > h2:first-child,
html[data-openlib-color-mode="dark"] body .pkp_structure_main > .page_login > h1,
html[data-openlib-color-mode="dark"] body .pkp_structure_main > .page_register > h1,
html[data-openlib-color-mode="dark"] body .page_register fieldset > legend:not(.pkp_screen_reader) {
  color: #F8FAFC !important;
}
html[data-openlib-color-mode="dark"] body .pkp_structure_main > .page > h2:first-child ~ p,
html[data-openlib-color-mode="dark"] body .pkp_structure_main > .page > h2:first-child ~ div p,
html[data-openlib-color-mode="dark"] body .pkp_structure_main > .page > h2:first-child ~ * li,
html[data-openlib-color-mode="dark"] body .pkp_structure_main > .page_login > p,
html[data-openlib-color-mode="dark"] body .pkp_structure_main > .page_register > p {
  color: #CBD5E1 !important;
}
html[data-openlib-color-mode="dark"] body .pkp_structure_main > .page_login,
html[data-openlib-color-mode="dark"] body .pkp_structure_main > .page_register {
  border-color: #334155 !important;
  background: #172033 !important;
}
html[data-openlib-color-mode="dark"] body .page_register .cmp_form.register > fieldset,
html[data-openlib-color-mode="dark"] body .page_register .cmp_form.register .fields > fieldset,
html[data-openlib-color-mode="dark"] body .page_register fieldset.profile,
html[data-openlib-color-mode="dark"] body .page_register fieldset.login,
html[data-openlib-color-mode="dark"] body .page_register fieldset.consent,
html[data-openlib-color-mode="dark"] body .page_register fieldset.reviewer,
html[data-openlib-color-mode="dark"] body .page_register fieldset.context_optin {
  border-color: #334155 !important;
  background: #1D2A40 !important;
}
html[data-openlib-color-mode="dark"] body .page_login label > .label,
html[data-openlib-color-mode="dark"] body .page_register label > .label {
  color: #E2E8F0 !important;
}
html[data-openlib-color-mode="dark"] body .page_login input[type="text"],
html[data-openlib-color-mode="dark"] body .page_login input[type="email"],
html[data-openlib-color-mode="dark"] body .page_login input[type="password"],
html[data-openlib-color-mode="dark"] body .page_register input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
html[data-openlib-color-mode="dark"] body .page_register select,
html[data-openlib-color-mode="dark"] body .page_register textarea,
html[data-openlib-color-mode="dark"] body .page_register .select2-container .select2-selection {
  border-color: #475569 !important;
  background: #0F172A !important;
  color: #F8FAFC !important;
}
html[data-openlib-color-mode="dark"] body .page_register .buttons .login {
  border-color: #475569 !important;
  background: #0F172A !important;
  color: #E2E8F0 !important;
}

@media (max-width: 767px) {
  html body .pkp_structure_main > .page_login,
  html body .pkp_structure_main > .page_register {
    width: 100% !important;
    max-width: 100% !important;
    margin: 12px auto 24px !important;
    padding: 24px 18px 26px !important;
    border-radius: 14px !important;
  }
  html body .page_register .cmp_form.register > fieldset,
  html body .page_register .cmp_form.register .fields > fieldset,
  html body .page_register fieldset.profile,
  html body .page_register fieldset.login,
  html body .page_register fieldset.consent,
  html body .page_register fieldset.reviewer,
  html body .page_register fieldset.context_optin {
    padding: 17px 14px 15px !important;
    border-radius: 10px !important;
  }
  html body .page_register .buttons,
  html body .page_login .buttons {
    grid-template-columns: 1fr !important;
  }
}
