/* ========================================================================== */
/* GOTAVA Atelier v3.0.11 — Password Recovery + Journal History Parity        */
/* Loaded last. All rules are deliberately scoped to the affected views.      */
/* ========================================================================== */

/* -------------------------------------------------------------------------- */
/* A. Password recovery / reset messages                                      */
/* -------------------------------------------------------------------------- */

html body.pkp_page_login .atelier_password_layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 290px !important;
  gap: 16px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  align-items: start !important;
  box-sizing: border-box !important;
}

html body.pkp_page_login .atelier_password_panel {
  min-width: 0 !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: #fff !important;
  border: 0 !important;
  border-bottom: 3px solid var(--atelier-accent) !important;
  border-radius: 0 !important;
  box-shadow: 0 3px 10px rgba(31,45,55,.055) !important;
  box-sizing: border-box !important;
}

html body.pkp_page_login .atelier_password_request_panel {
  min-height: 390px !important;
}

html body.pkp_page_login .atelier_password_message_panel {
  min-height: 270px !important;
}

/* Teal Noble-style stepped breadcrumb, matching GOTAVA's current visual system. */
html body.pkp_page_login .atelier_password_breadcrumbs {
  display: flex !important;
  align-items: center !important;
  min-height: 42px !important;
  margin: 33px 0 0 32px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  font-size: 12px !important;
  line-height: 42px !important;
}

html body.pkp_page_login .atelier_password_crumb {
  position: relative !important;
  display: inline-flex !important;
  height: 42px !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding: 0 24px 0 16px !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}

html body.pkp_page_login .atelier_password_crumb_home {
  z-index: 2 !important;
  color: #2d3135 !important;
  background: #f3f4f7 !important;
  clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 50%, calc(100% - 15px) 100%, 0 100%) !important;
}

html body.pkp_page_login .atelier_password_crumb_current {
  z-index: 1 !important;
  margin-left: -8px !important;
  padding-left: 25px !important;
  padding-right: 18px !important;
  color: #fff !important;
  background: var(--atelier-accent) !important;
  font-weight: 700 !important;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 15px 50%) !important;
}

html body.pkp_page_login .atelier_password_body {
  width: 100% !important;
  margin: 0 !important;
  padding: 35px 32px 52px !important;
  box-sizing: border-box !important;
}

html body.pkp_page_login .atelier_password_body > h1 {
  margin: 0 0 24px !important;
  padding: 0 !important;
  color: #22282c !important;
  font-size: 24px !important;
  line-height: 1.25 !important;
  font-weight: 760 !important;
  letter-spacing: -.015em !important;
  border: 0 !important;
  text-transform: none !important;
}

html body.pkp_page_login .atelier_password_intro,
html body.pkp_page_login .atelier_password_message_text {
  max-width: 760px !important;
  margin: 0 0 27px !important;
  padding: 0 !important;
  color: #343b40 !important;
  font-size: 13px !important;
  line-height: 1.65 !important;
  font-weight: 400 !important;
}

html body.pkp_page_login .atelier_password_form,
html body.pkp_page_login .atelier_password_form .fields {
  display: block !important;
  width: 250px !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  box-sizing: border-box !important;
}

html body.pkp_page_login .atelier_password_field {
  display: block !important;
  width: 100% !important;
  margin: 0 0 31px !important;
  padding: 0 !important;
}

html body.pkp_page_login .atelier_password_field label {
  display: block !important;
  margin: 0 0 4px !important;
  padding: 0 !important;
  color: #24282c !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
  font-style: italic !important;
  font-weight: 400 !important;
}

html body.pkp_page_login .atelier_password_field .label {
  font-weight: 400 !important;
}

html body.pkp_page_login .atelier_password_field .required {
  color: #ec3f5d !important;
  font-style: normal !important;
  font-weight: 700 !important;
}

html body.pkp_page_login .atelier_password_field input[type="email"] {
  display: block !important;
  width: 250px !important;
  max-width: 100% !important;
  height: 31px !important;
  min-height: 31px !important;
  margin: 0 !important;
  padding: 4px 7px !important;
  color: #202428 !important;
  background: #fff !important;
  border: 1px solid #999 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
  font-size: 13px !important;
  line-height: 21px !important;
  box-sizing: border-box !important;
}

html body.pkp_page_login .atelier_password_field input[type="email"]:focus {
  border-color: var(--atelier-accent) !important;
  box-shadow: 0 0 0 1px var(--atelier-accent) !important;
}

html body.pkp_page_login .atelier_password_buttons {
  display: flex !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 14px !important;
}

html body.pkp_page_login .atelier_password_register,
html body.pkp_page_login .atelier_password_back_link a {
  display: inline-flex !important;
  min-height: 31px !important;
  margin: 0 !important;
  padding: 0 !important;
  align-items: center !important;
  color: #26292c !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  font-size: 12.5px !important;
  line-height: 1.3 !important;
  font-weight: 400 !important;
  text-decoration: none !important;
}

html body.pkp_page_login .atelier_password_register:hover,
html body.pkp_page_login .atelier_password_register:focus,
html body.pkp_page_login .atelier_password_back_link a:hover,
html body.pkp_page_login .atelier_password_back_link a:focus {
  color: var(--atelier-accent) !important;
  text-decoration: none !important;
}

html body.pkp_page_login .atelier_password_submit {
  display: inline-flex !important;
  min-width: 104px !important;
  height: 31px !important;
  min-height: 31px !important;
  margin: 0 !important;
  padding: 0 13px !important;
  align-items: center !important;
  justify-content: center !important;
  color: #123e4c !important;
  background: #fff !important;
  border: 1px solid #a3a5a7 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-size: 12.5px !important;
  line-height: 29px !important;
  font-weight: 700 !important;
  text-transform: none !important;
  cursor: pointer !important;
}

html body.pkp_page_login .atelier_password_submit:hover,
html body.pkp_page_login .atelier_password_submit:focus {
  color: #fff !important;
  background: var(--atelier-accent) !important;
  border-color: var(--atelier-accent) !important;
}

html body.pkp_page_login .atelier_password_error {
  width: min(100%, 620px) !important;
  margin: 0 0 18px !important;
  padding: 10px 12px !important;
  color: #303438 !important;
  background: #f7f8f9 !important;
  border: 0 !important;
  border-left: 3px solid #d94a55 !important;
  font-size: 12.5px !important;
  line-height: 1.5 !important;
  box-sizing: border-box !important;
}

html body.pkp_page_login .atelier_password_back_link {
  margin: 17px 0 0 !important;
  padding: 0 !important;
}

html body.pkp_page_login .atelier_password_message_body {
  padding-bottom: 42px !important;
}

html body.pkp_page_login .atelier_password_layout > .atelier_journal_rail {
  width: 290px !important;
  max-width: 290px !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  align-self: start !important;
}

/* Recovery pages must not repeat the login box in the right rail. */
html body.pkp_page_login .atelier_password_layout .atelier_home_login_block {
  display: none !important;
}

/* -------------------------------------------------------------------------- */
/* B. Journal History — use the same framed top rhythm as issue/Noble pages. */
/* -------------------------------------------------------------------------- */

html body.atelier_journal_history_noble_active .pkp_structure_content.atelier_policy_noble_shell,
html body.atelier_journal_history_noble_active .pkp_structure_content.atelier_policy_noble_shell.has_sidebar {
  display: block !important;
  width: calc(100% - 24px) !important;
  max-width: var(--atelier-noble-frame, 1240px) !important;
  margin: 14px auto 30px !important;
  padding: 56px 14px 14px !important;
  background: #eef0f2 !important;
  border: 1px solid #d7dde1 !important;
  box-shadow: 0 2px 8px rgba(31,45,55,.08) !important;
  box-sizing: border-box !important;
}

html body.atelier_journal_history_noble_active .atelier_policy_layout,
html body.atelier_journal_history_noble_active .atelier_policy_layout.has-atelier-staff-rail {
  width: 100% !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

/* Convert the native OJS Home / Journal History breadcrumb into the same
   stepped treatment used elsewhere in GOTAVA Atelier. */
html body.atelier_journal_history_noble_active .cmp_breadcrumbs,
html body.atelier_journal_history_noble_active .cmp_breadcrumbs ol {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

html body.atelier_journal_history_noble_active .cmp_breadcrumbs {
  margin-bottom: 30px !important;
}

html body.atelier_journal_history_noble_active .cmp_breadcrumbs ol {
  display: flex !important;
  align-items: stretch !important;
  flex-wrap: nowrap !important;
  list-style: none !important;
}

html body.atelier_journal_history_noble_active .cmp_breadcrumbs li {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  min-height: 42px !important;
  margin: 0 12px 0 0 !important;
  padding: 0 !important;
  color: #2d3439 !important;
  background: #f3f4f7 !important;
  border: 0 !important;
  font-size: 12px !important;
  line-height: 1 !important;
  font-weight: 500 !important;
  list-style: none !important;
}

html body.atelier_journal_history_noble_active .cmp_breadcrumbs li::after {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  right: -13px !important;
  width: 0 !important;
  height: 0 !important;
  border-top: 21px solid transparent !important;
  border-bottom: 21px solid transparent !important;
  border-left: 13px solid #f3f4f7 !important;
  z-index: 2 !important;
}

html body.atelier_journal_history_noble_active .cmp_breadcrumbs li::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: -13px !important;
  width: 0 !important;
  height: 0 !important;
  border-top: 21px solid transparent !important;
  border-bottom: 21px solid transparent !important;
  border-left: 13px solid #fff !important;
  z-index: 1 !important;
}

html body.atelier_journal_history_noble_active .cmp_breadcrumbs li:first-child::before {
  display: none !important;
}

html body.atelier_journal_history_noble_active .cmp_breadcrumbs li.current {
  color: #fff !important;
  background: var(--atelier-accent) !important;
  font-weight: 700 !important;
}

html body.atelier_journal_history_noble_active .cmp_breadcrumbs li.current::after {
  border-left-color: var(--atelier-accent) !important;
}

html body.atelier_journal_history_noble_active .cmp_breadcrumbs a,
html body.atelier_journal_history_noble_active .cmp_breadcrumbs li.current > span {
  position: relative !important;
  z-index: 3 !important;
  display: flex !important;
  min-height: 42px !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 16px !important;
  color: inherit !important;
  text-decoration: none !important;
  border: 0 !important;
  box-shadow: none !important;
  white-space: nowrap !important;
}

html body.atelier_journal_history_noble_active .cmp_breadcrumbs .separator {
  display: none !important;
}

html body.atelier_journal_history_noble_active .atelier_policy_title {
  margin-top: 0 !important;
}

/* -------------------------------------------------------------------------- */
/* C. Responsive + dark-mode safeguards                                      */
/* -------------------------------------------------------------------------- */

@media (max-width: 920px) {
  html body.pkp_page_login .atelier_password_layout {
    grid-template-columns: minmax(0, 1fr) 250px !important;
    gap: 12px !important;
  }

  html body.pkp_page_login .atelier_password_layout > .atelier_journal_rail {
    width: 250px !important;
    max-width: 250px !important;
  }

  html body.atelier_journal_history_noble_active .pkp_structure_content.atelier_policy_noble_shell,
  html body.atelier_journal_history_noble_active .pkp_structure_content.atelier_policy_noble_shell.has_sidebar {
    padding: 42px 10px 10px !important;
  }
}

@media (max-width: 760px) {
  html body.pkp_page_login .atelier_password_layout {
    display: block !important;
  }

  html body.pkp_page_login .atelier_password_layout > .atelier_journal_rail {
    width: 100% !important;
    max-width: none !important;
    margin-top: 14px !important;
  }

  html body.pkp_page_login .atelier_password_request_panel,
  html body.pkp_page_login .atelier_password_message_panel {
    min-height: 0 !important;
  }

  html body.atelier_journal_history_noble_active .pkp_structure_content.atelier_policy_noble_shell,
  html body.atelier_journal_history_noble_active .pkp_structure_content.atelier_policy_noble_shell.has_sidebar {
    padding: 14px 0 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
  }
}

@media (max-width: 520px) {
  html body.pkp_page_login .atelier_password_breadcrumbs {
    margin: 20px 0 0 15px !important;
  }

  html body.pkp_page_login .atelier_password_body {
    padding: 27px 15px 34px !important;
  }

  html body.pkp_page_login .atelier_password_body > h1 {
    font-size: 21px !important;
  }

  html body.pkp_page_login .atelier_password_form,
  html body.pkp_page_login .atelier_password_form .fields,
  html body.pkp_page_login .atelier_password_field input[type="email"] {
    width: 100% !important;
  }

  html body.pkp_page_login .atelier_password_buttons {
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
  }

  html body.atelier_journal_history_noble_active .cmp_breadcrumbs ol {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  html body.atelier_journal_history_noble_active .cmp_breadcrumbs li {
    margin-right: 12px !important;
  }
}

html[data-atelier-theme="dark"] body.pkp_page_login .atelier_password_panel,
html[data-atelier-theme="dark"] body.atelier_journal_history_noble_active .atelier_policy_layout > .atelier_policy_noble_main {
  background: #182733 !important;
}

html[data-atelier-theme="dark"] body.pkp_page_login .atelier_password_body > h1,
html[data-atelier-theme="dark"] body.pkp_page_login .atelier_password_intro,
html[data-atelier-theme="dark"] body.pkp_page_login .atelier_password_message_text {
  color: #edf3f5 !important;
}

html[data-atelier-theme="dark"] body.atelier_journal_history_noble_active .pkp_structure_content.atelier_policy_noble_shell,
html[data-atelier-theme="dark"] body.atelier_journal_history_noble_active .pkp_structure_content.atelier_policy_noble_shell.has_sidebar {
  background: #14212b !important;
  border-color: #40525d !important;
}
