/* Roundcube login: hide Elastic chrome, keep SSO card */

body.task-login,
html.login-pf,
html.login-pf body {
  min-height: 100vh;
  height: auto !important;
  overflow: auto !important;
  background: var(--sso-page-bg) !important;
  color: var(--sso-text);
}

body.task-login #layout {
  display: block !important;
  width: 100%;
  min-height: 100vh;
  background: transparent !important;
  overflow: auto !important;
}

body.task-login #layout-menu,
body.task-login #layout-sidebar,
body.task-login #layout-list,
body.task-login #layout-content > .header,
body.task-login #supportlink,
body.task-login #login-footer,
body.task-login #logo {
  display: none !important;
}

body.task-login #layout-content {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  min-height: 100vh;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  text-align: left !important;
}

body.task-login .voice {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}

/* PatternFly stubs used by the SSO card (without shipping PF CSS) */
.pf-v5-c-form { width: 100%; }
.pf-v5-c-form__group { margin-bottom: 0; }
.pf-v5-c-form__actions { margin-top: 4px; }
.pf-m-block { display: block; width: 100%; }
.pf-m-fill { flex: 1; }

.pf-v5-c-button {
  font-family: inherit;
  line-height: 1.25;
  text-decoration: none !important;
  box-sizing: border-box;
}

a.pf-v5-c-button {
  display: flex;
}

.sso-choice-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sso-choice-btns .pf-v5-c-button {
  height: 46px;
  border-radius: 8px !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
}

.sso-back {
  margin-top: 12px;
  text-align: center;
}

.sso-back .pf-v5-c-button {
  width: auto;
  min-width: 120px;
  height: 40px;
  padding: 0 16px;
  margin: 0 auto;
}

.sso-eye svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* Empty messagestack was stretched (top+bottom) over the whole page and ate clicks */
body.task-login #messagestack {
  position: fixed !important;
  top: 16px !important;
  bottom: auto !important;
  right: auto !important;
  left: 50% !important;
  transform: translateX(-50%);
  z-index: 50;
  max-width: 460px;
  width: calc(100% - 32px);
  height: auto !important;
  max-height: none;
  pointer-events: none;
}

body.task-login #messagestack > div {
  pointer-events: auto;
}

[hidden] {
  display: none !important;
}

body.task-login #messagestack > div {
  border-radius: 8px !important;
  box-shadow: var(--sso-card-shadow) !important;
}

body.task-login #login-form {
  margin: 0 !important;
  top: auto !important;
  width: 100% !important;
  max-width: none !important;
  position: static !important;
}

body.task-login #rcmloginsubmit,
body.task-login .sso-choice-btns .pf-v5-c-button {
  text-transform: none !important;
  letter-spacing: normal !important;
}
