/* PE-Class v1.20.18 — refined sport pictograms and vertical balance */

/* Wide login: enlarge and spread the new pictograms, then align both action bottoms. */
@media (min-width: 821px) and (min-height: 541px),
       (min-width: 821px) and (pointer: fine) {
  /*
   * Settings copy can be much longer than the default composition. Keep the
   * wide-screen baseline deterministic without changing the source text: the
   * full value remains in the DOM/accessibility tree while only the visual
   * line is ellipsized. This also guarantees the default headline stays on
   * the single line requested for the login design.
   */
  #loginScreen.peLoginScreen .peLoginWorkspaceLabel,
  #loginScreen.peLoginScreen .peLoginHeadline,
  #loginScreen.peLoginScreen .peLoginDescription,
  #loginScreen.peLoginScreen .peLoginPictogramCard > p,
  #loginScreen.peLoginScreen .peLoginPictogramCard .peLoginPictogramCaption,
  #loginScreen.peLoginScreen .peLoginGreeting {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
  }

  #loginScreen.peLoginScreen .peLoginPictogramCard {
    height: 253px;
    min-height: 253px;
    padding: 30px 30px 26px;
    gap: 27px;
  }

  #loginScreen.peLoginScreen .peLoginPictograms {
    width: min(100%, 600px);
    gap: clamp(28px, 3vw, 40px);
  }

  #loginScreen.peLoginScreen .peLoginPictograms > svg {
    width: 112px;
    height: 112px;
    max-width: 100%;
    justify-self: center;
  }
}

/* iPad-landscape's shorter body needs seven more pixels to share the action baseline. */
@media (min-width: 960px) and (max-width: 1280px) and (orientation: landscape) {
  #loginScreen.peLoginScreen .peLoginPictogramCard {
    height: 260px;
    min-height: 260px;
  }
}

/* Standard portrait phones use the available lower space for larger, calmer controls. */
@media (max-width: 820px) and (min-height: 760px) {
  html:not(.pe87FoldWide):not([data-pe-fold-wide="true"]) #loginScreen.peLoginScreen .peLoginBrand {
    min-height: 84px;
    padding-block: 12px;
  }

  html:not(.pe87FoldWide):not([data-pe-fold-wide="true"]) #loginScreen.peLoginScreen #loginAvatar.loginAvatar {
    width: 60px;
    height: 60px;
    min-width: 60px;
  }

  html:not(.pe87FoldWide):not([data-pe-fold-wide="true"]) #loginScreen.peLoginScreen .peLoginIntro {
    padding-block: 18px 16px;
  }

  html:not(.pe87FoldWide):not([data-pe-fold-wide="true"]) #loginScreen.peLoginScreen .peLoginWorkspaceLabel {
    margin-bottom: 6px;
  }

  html:not(.pe87FoldWide):not([data-pe-fold-wide="true"]) #loginScreen.peLoginScreen .peLoginDescription {
    margin-top: 8px;
    font-size: 12px;
  }

  html:not(.pe87FoldWide):not([data-pe-fold-wide="true"]) #loginScreen.peLoginScreen .peLoginPictogramCard {
    min-height: 170px;
    margin-top: 15px;
    padding: 20px 14px 16px;
    gap: 15px;
  }

  html:not(.pe87FoldWide):not([data-pe-fold-wide="true"]) #loginScreen.peLoginScreen .peLoginPictograms {
    width: 100%;
    gap: clamp(10px, 4vw, 18px);
  }

  html:not(.pe87FoldWide):not([data-pe-fold-wide="true"]) #loginScreen.peLoginScreen .peLoginPictograms > svg {
    width: clamp(48px, 14vw, 56px);
    height: clamp(48px, 14vw, 56px);
    max-width: 100%;
    justify-self: center;
  }

  html:not(.pe87FoldWide):not([data-pe-fold-wide="true"]) #loginScreen.peLoginScreen .peLoginPictogramCard > p,
  html:not(.pe87FoldWide):not([data-pe-fold-wide="true"]) #loginScreen.peLoginScreen .peLoginPictogramCard .peLoginPictogramCaption {
    font-size: 12px;
  }

  html:not(.pe87FoldWide):not([data-pe-fold-wide="true"]) #loginScreen.peLoginScreen #loginForm.loginCard.peLoginAuth {
    padding-block: 18px 14px;
  }

  html:not(.pe87FoldWide):not([data-pe-fold-wide="true"]) #loginScreen.peLoginScreen .peLoginGreeting {
    margin-bottom: 15px;
    font-size: clamp(23px, 7vw, 27px);
  }

  html:not(.pe87FoldWide):not([data-pe-fold-wide="true"]) #loginScreen.peLoginScreen .peLoginFields {
    gap: 12px;
  }

  html:not(.pe87FoldWide):not([data-pe-fold-wide="true"]) #loginScreen.peLoginScreen .peLoginFields label {
    gap: 4px;
    font-size: 13px;
  }

  html:not(.pe87FoldWide):not([data-pe-fold-wide="true"]) #loginScreen.peLoginScreen .peLoginFields input {
    height: 52px;
  }

  html:not(.pe87FoldWide):not([data-pe-fold-wide="true"]) #loginScreen.peLoginScreen .loginOptions {
    margin-top: 12px;
  }

  html:not(.pe87FoldWide):not([data-pe-fold-wide="true"]) #loginScreen.peLoginScreen .loginCheck {
    min-height: 26px;
    font-size: 13px;
  }

  html:not(.pe87FoldWide):not([data-pe-fold-wide="true"]) #loginScreen.peLoginScreen .loginBtn {
    height: 54px;
    margin-top: 15px;
    font-size: 16px;
  }

  html:not(.pe87FoldWide):not([data-pe-fold-wide="true"]) #loginScreen.peLoginScreen .loginMsg {
    min-height: 18px;
    margin-top: 6px;
  }
}

/* Shorter compact phones receive a smaller increase while preserving the one-screen contract. */
@media (max-width: 820px) and (min-height: 681px) and (max-height: 759px) {
  html:not(.pe87FoldWide):not([data-pe-fold-wide="true"]) #loginScreen.peLoginScreen .peLoginBrand {
    min-height: 80px;
  }

  html:not(.pe87FoldWide):not([data-pe-fold-wide="true"]) #loginScreen.peLoginScreen .peLoginIntro {
    padding-block: 15px 13px;
  }

  html:not(.pe87FoldWide):not([data-pe-fold-wide="true"]) #loginScreen.peLoginScreen .peLoginPictogramCard {
    min-height: 120px;
    margin-top: 12px;
    padding-block: 13px 11px;
    gap: 9px;
  }

  html:not(.pe87FoldWide):not([data-pe-fold-wide="true"]) #loginScreen.peLoginScreen .peLoginPictograms > svg {
    width: 44px;
    height: 44px;
    max-width: 100%;
    justify-self: center;
  }

  html:not(.pe87FoldWide):not([data-pe-fold-wide="true"]) #loginScreen.peLoginScreen #loginForm.loginCard.peLoginAuth {
    padding-block: 14px 11px;
  }

  html:not(.pe87FoldWide):not([data-pe-fold-wide="true"]) #loginScreen.peLoginScreen .peLoginFields input {
    height: 48px;
  }

  html:not(.pe87FoldWide):not([data-pe-fold-wide="true"]) #loginScreen.peLoginScreen .loginBtn {
    height: 50px;
    margin-top: 12px;
  }
}

/* Fold7 unfolded retains its two-column shell while matching the same action baseline. */
@media (min-width: 700px) and (max-width: 920px) and (min-height: 600px) {
  html.pe87FoldWide #loginScreen.peLoginScreen .peLoginWorkspaceLabel,
  html.pe87FoldWide #loginScreen.peLoginScreen .peLoginHeadline,
  html.pe87FoldWide #loginScreen.peLoginScreen .peLoginDescription,
  html.pe87FoldWide #loginScreen.peLoginScreen .peLoginPictogramCard > p,
  html.pe87FoldWide #loginScreen.peLoginScreen .peLoginPictogramCard .peLoginPictogramCaption,
  html.pe87FoldWide #loginScreen.peLoginScreen .peLoginGreeting,
  html[data-pe-fold-wide="true"] #loginScreen.peLoginScreen .peLoginWorkspaceLabel,
  html[data-pe-fold-wide="true"] #loginScreen.peLoginScreen .peLoginHeadline,
  html[data-pe-fold-wide="true"] #loginScreen.peLoginScreen .peLoginDescription,
  html[data-pe-fold-wide="true"] #loginScreen.peLoginScreen .peLoginPictogramCard > p,
  html[data-pe-fold-wide="true"] #loginScreen.peLoginScreen .peLoginPictogramCard .peLoginPictogramCaption,
  html[data-pe-fold-wide="true"] #loginScreen.peLoginScreen .peLoginGreeting {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
  }

  html.pe87FoldWide #loginScreen.peLoginScreen .peLoginPictogramCard,
  html[data-pe-fold-wide="true"] #loginScreen.peLoginScreen .peLoginPictogramCard {
    height: 256px;
    min-height: 256px;
    padding: 29px 18px 24px;
    gap: 24px;
  }

  html.pe87FoldWide #loginScreen.peLoginScreen .peLoginPictograms,
  html[data-pe-fold-wide="true"] #loginScreen.peLoginScreen .peLoginPictograms {
    width: 100%;
    grid-template-columns: repeat(4, 58px);
    justify-content: space-between;
    gap: 0;
  }

  html.pe87FoldWide #loginScreen.peLoginScreen .peLoginPictograms > svg,
  html[data-pe-fold-wide="true"] #loginScreen.peLoginScreen .peLoginPictograms > svg {
    width: 58px;
    height: 58px;
    max-width: 100%;
    justify-self: center;
  }
}
