/*
 * Fachkreiseportal login page — Figma "Login" (desktop + mobile).
 */

:root {
  --fkp-magenta: #de006a;
  --fkp-white: #ffffff;
  --fkp-black: #000000;
  --fkp-text-muted: rgba(0, 0, 0, 0.8);
  --fkp-doccheck-red: #e30613;
  --fkp-doccheck-green: #84bd00;
  --fkp-doccheck-green-hover: #73a600;
  --fkp-input-border: #d9d9d9;
  --fkp-alt-bg: #f2f2f2;
  --fkp-link-gray: #747474;
  --fkp-font: Arial, "Helvetica Neue", Helvetica, sans-serif;
  --fkp-login-content: 528px;
  --fkp-login-card: 592px;
}

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

body.fkp-login-page {
  margin: 0;
  height: 100%;
  font-family: var(--fkp-font);
  color: var(--fkp-black);
  background: var(--fkp-white);
  overflow-x: hidden;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Page shell --- */

.fkp-login {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: minmax(0, 1fr) auto;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  background: var(--fkp-white);
}

/* The admin bar shifts the document down 32px (46px on narrow screens); subtract
   it so a full-height layout does not overflow by exactly that amount. */
body.admin-bar .fkp-login {
  min-height: calc(100vh - 32px);
  min-height: calc(100dvh - 32px);
}

@media screen and (max-width: 782px) {
  body.admin-bar .fkp-login {
    min-height: calc(100vh - 46px);
    min-height: calc(100dvh - 46px);
  }
}

.fkp-login__mobile-nav {
  display: none;
}

.fkp-login__brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  grid-column: 1;
  grid-row: 1;
  min-height: 0;
  padding: 0;
  background: var(--fkp-magenta);
}

.fkp-login__brand-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 64px;
  width: min(100%, var(--fkp-login-content));
  height: 100%;
  padding: 64px 0;
}

.fkp-login__logo {
  align-self: stretch;
}

.fkp-login__logo img {
  display: block;
  width: 280px;
  max-width: 100%;
  height: auto;
}

.fkp-login__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
  align-self: stretch;
  flex: 1 1 auto;
}

.fkp-login__intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
  max-width: var(--fkp-login-content);
}

.fkp-login__title {
  margin: 0;
  width: 100%;
  max-width: var(--fkp-login-content);
  font-family: var(--fkp-font);
  font-size: 40px;
  font-weight: 700;
  font-style: normal;
  line-height: 140%;
  letter-spacing: 0;
  color: var(--fkp-white);
}

.fkp-login__copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: var(--fkp-login-content);
  font-family: var(--fkp-font);
  font-size: 14px;
  font-weight: 400;
  font-style: normal;
  line-height: 160%;
  letter-spacing: 0;
  color: var(--fkp-white);
}

.fkp-login__copy p {
  margin: 0;
}

.fkp-login__copy-cta {
  font-weight: 600;
}

.fkp-login__illustration {
  display: block;
  flex-shrink: 0;
  width: 100%;
  max-width: var(--fkp-login-content);
  aspect-ratio: 1;
  background: var(--fkp-magenta);
  line-height: 0;
}

.fkp-login__illustration img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
}

.fkp-login__copyright {
  margin: 0;
  font-family: var(--fkp-font);
  font-size: 14px;
  font-weight: 400;
  line-height: 160%;
  letter-spacing: 0;
}

.fkp-login__copyright--desktop {
  text-align: center;
  color: var(--fkp-white);
}

.fkp-login__copyright--mobile {
  display: none;
  width: 100%;
  text-align: center;
  color: var(--fkp-black);
}

/* --- Right login panel --- */

.fkp-login__panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  grid-column: 2;
  grid-row: 1;
  min-height: 0;
  padding: 112px 64px 0;
  background: var(--fkp-white);
}

.fkp-login__panel-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 32px;
  width: 100%;
  max-width: var(--fkp-login-card);
  margin: 0 auto;
}

/*
 * Oxygen wraps the DocCheck shortcode in .ct-shortcode. That wrapper shrinks
 * to the button width and left-aligns the card. Force it to fill the inner
 * column so the card matches the PHP /html/ login page.
 */
.fkp-login__panel-inner > .ct-shortcode {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  align-self: stretch !important;
}


/* --- DocCheck login card --- */

.fkp-login-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  background: var(--fkp-white);
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.25);
}

/* Real DocCheck login button (DocCheck Access web component) */

.fkp-login-card--doccheck {
  overflow: visible;
}

.fkp-login-card__doccheck {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px 20px 20px;
  background: var(--fkp-white);
}

.fkp-login-card__error {
  width: 100%;
  margin: 0;
  padding: 12px 16px;
  border-radius: 6px;
  background: #fff3f3;
  font-size: 14px;
  line-height: 1.4;
  color: #8a0010;
  text-align: center;
}

.fkp-login-card__button-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  min-height: 56px;
}

.fkp-login-card__button-wrap dc-login-button {
  display: block;
  width: 100%;
  max-width: 467px;
}

.fkp-login-card__fallback-link {
  font-family: var(--fkp-font);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--fkp-doccheck-red);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.fkp-login-card__fallback-link:hover {
  color: #b00510;
}

/* Mock login shell (fallback when fkp_use_doccheck_widget is false) */

.fkp-login-card__header {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 20px;
  background: var(--fkp-doccheck-red);
}

.fkp-login-card__header-title {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--fkp-font);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.fkp-login-card__header-doccheck {
  color: var(--fkp-black);
}

.fkp-login-card__header-login {
  color: var(--fkp-white);
}

.fkp-login-card__form {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 8px 24px 20px;
  background: var(--fkp-white);
}

.fkp-login-card__field {
  position: relative;
  display: block;
  border-bottom: 1px solid var(--fkp-input-border);
}

.fkp-login-card__field input {
  width: 100%;
  height: 48px;
  padding: 12px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--fkp-black);
}

.fkp-login-card__field input::placeholder {
  color: #999;
}

.fkp-login-card__field input:focus {
  outline: none;
}

.fkp-login-card__field:focus-within {
  border-bottom-color: var(--fkp-doccheck-red);
}

.fkp-login-card__field--password input {
  padding-right: 40px;
}

.fkp-login-card__toggle-password {
  position: absolute;
  top: 50%;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: #666;
  transform: translateY(-50%);
  cursor: pointer;
}

.fkp-login-card__toggle-password:hover {
  color: var(--fkp-black);
}

.fkp-login-card__eye {
  width: 22px;
  height: 22px;
}

.fkp-login-card__eye--closed {
  display: none;
}

.fkp-login-card__toggle-password[aria-pressed="true"] .fkp-login-card__eye--open {
  display: none;
}

.fkp-login-card__toggle-password[aria-pressed="true"] .fkp-login-card__eye--closed {
  display: block;
}

.fkp-login-card__submit {
  width: 100%;
  height: 48px;
  margin-top: 24px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: var(--fkp-doccheck-green);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  color: var(--fkp-white);
  cursor: pointer;
}

.fkp-login-card__submit:hover {
  background: var(--fkp-doccheck-green-hover);
}

.fkp-login-card__links {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}

.fkp-login-card__links a {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--fkp-link-gray);
  text-decoration: none;
}

.fkp-login-card__links a:hover {
  text-decoration: underline;
}

.fkp-login-card__alt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px 20px 28px;
  background: var(--fkp-alt-bg);
}

.fkp-login-card__alt-text {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
  color: var(--fkp-link-gray);
}

.fkp-login-card__microsoft {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 320px;
  height: 41px;
  padding: 0 16px;
  border: 1px solid #8c8c8c;
  border-radius: 0;
  background: var(--fkp-white);
  font-family: "Segoe UI", var(--fkp-font);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  color: var(--fkp-black);
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
}

.fkp-login-card__microsoft:hover {
  background: #f8f8f8;
}

.fkp-login-card__microsoft-logo {
  display: flex;
  flex-shrink: 0;
  width: 21px;
  height: 21px;
}

.fkp-login-card__microsoft-logo svg {
  width: 100%;
  height: 100%;
}

/* WPO365 shortcode output inside the login card */

.fkp-login-card__alt .wpo365-mssignin-wrapper {
  box-sizing: border-box;
  display: block;
  width: 100%;
  padding: 0;
  text-align: center;
}

.fkp-login-card__alt .wpo365-mssignin-spacearound {
  display: inline-block;
  width: 100%;
  max-width: 320px;
}

.fkp-login-card__alt .wpo365-mssignin-button {
  width: 100%;
}

/* --- Footer (shared row on desktop) --- */

.fkp-login__footer {
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  width: 100%;
}

.fkp-login__copyright--desktop {
  grid-column: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 64px 64px;
  text-align: center;
  color: var(--fkp-white);
  background: var(--fkp-magenta);
}

.fkp-login__footer-legal {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin: 0;
  padding: 0 64px 64px;
  background: var(--fkp-white);
}

.fkp-login__footer-co-promotion {
  font-family: var(--fkp-font);
  font-size: 14px;
  font-weight: 600;
  line-height: 160%;
  color: var(--fkp-black);
  text-decoration: none;
}

.fkp-login__footer-co-promotion:hover {
  text-decoration: underline;
}

.fkp-login__footer-links {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 64px;
  margin: 0;
}

.fkp-login__copyright--mobile {
  display: none;
}

.fkp-login__footer-links a {
  font-family: var(--fkp-font);
  font-size: 14px;
  font-weight: 400;
  line-height: 160%;
  color: var(--fkp-black);
  text-decoration: none;
  white-space: nowrap;
}

.fkp-login__footer-links a:hover {
  text-decoration: underline;
}

/* --- Mobile (Figma 390px frame) --- */

@media (max-width: 768px) {
  .fkp-login {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
  }

  .fkp-login__brand,
  .fkp-login__panel {
    flex: none;
    width: 100%;
    min-height: auto;
    grid-column: auto;
    grid-row: auto;
  }

  .fkp-login__brand {
    background: var(--fkp-magenta);
  }

  .fkp-login__brand-inner {
    gap: 0;
    width: 100%;
    min-height: auto;
    padding: 0;
  }

  .fkp-login__logo,
  .fkp-login__illustration,
  .fkp-login__copyright--desktop {
    display: none;
  }

  .fkp-login__content {
    gap: 0;
  }

  .fkp-login__intro {
    gap: 16px;
    max-width: none;
    padding: 32px 16px;
  }

  .fkp-login__title {
    max-width: none;
    font-size: 28px;
    line-height: 140%;
    text-align: left;
  }

  .fkp-login__copy {
    max-width: none;
    font-size: 14px;
    line-height: 160%;
  }

  .fkp-login__panel {
    flex: 1 1 auto;
    justify-content: flex-start;
    padding: 32px 16px 0;
    background: var(--fkp-white);
  }

  .fkp-login__panel-inner {
    gap: 32px;
    max-width: none;
  }

  .fkp-login__footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    order: 3;
    width: 100%;
    padding: 12px 16px 32px;
    background: var(--fkp-white);
  }

  .fkp-login__copyright--desktop {
    display: none;
  }

  .fkp-login__copyright--mobile {
    display: block;
    width: 100%;
    text-align: center;
    color: var(--fkp-black);
    background: transparent;
    padding: 0;
  }

  .fkp-login__footer-legal {
    width: 100%;
    padding: 0;
    background: transparent;
    gap: 12px;
  }

  .fkp-login__footer-links {
    justify-content: center;
    gap: 39px;
    width: 100%;
    padding: 0;
    background: transparent;
  }
  .fkp-login-card__doccheck {
    padding: 20px 16px 16px;
  }

  .fkp-login-card__button-wrap dc-login-button {
    max-width: 100%;
  }

  .fkp-login__footer-links a {
    font-size: 14px;
  }
}

@media (max-width: 390px) {
  .fkp-login__footer-links {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 39px;
    column-gap: 39px;
  }

  .fkp-login__footer-links a {
    white-space: normal;
    text-align: center;
  }
}

@media (min-width: 769px) {
  html,
  body.fkp-login-page {
    height: auto;
    min-height: 100%;
  }

  .fkp-login {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    /* `1fr` rather than `minmax(0, 1fr)`: the row must grow instead of clipping
       when the brand column is taller than the viewport. */
    grid-template-rows: 1fr auto;
  }

  /* The brand column is bottom-aligned. Anything overflowing a flex container's
     start edge cannot be reached by scrolling, so the columns must be allowed to
     size to their content instead of being pinned to the viewport height. */
  .fkp-login__brand,
  .fkp-login__panel {
    min-height: auto;
  }

  .fkp-login__brand {
    justify-content: flex-end;
  }

  .fkp-login__brand-inner {
    justify-content: flex-start;
    height: auto;
    padding: 64px 0 0;
    margin-bottom: 56px;
  }
}

@media (min-width: 769px) and (max-width: 1100px) {
  .fkp-login__panel {
    padding: 64px 32px 0;
  }

  .fkp-login__brand-inner {
    padding: 48px 0 0;
    margin-bottom: 56px;
  }

  .fkp-login__illustration {
    max-width: 400px;
    margin: 0 auto;
  }

  .fkp-login__copyright--desktop {
    padding: 0 32px 64px;
  }

  .fkp-login__footer-legal {
    padding: 0 32px 64px;
  }
}
