* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Roboto, sans-serif;
}

.login-page {
  position: relative;
  height: 100vh;
  min-height: 900px;
  background-image: url('../images/bg.svg');
  background-size: cover;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
}

.main-container {
  display: flex;
  width: 100%;
  height: 100%;
  padding: 120px;
  flex-direction: column;
  /* justify-content: space-between; */
  align-items: center;
  position: relative;
  z-index: 1;
  gap: 50px;
}

.login-card {
  display: flex;
  width: 608px;
  max-width: 608px;
  align-items: center;
  gap: 24px;
  border-radius: 12px;
  background: #FFF;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.card-content {
  display: flex;
  padding: 48px;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  flex: 1 0 0;
  align-self: stretch;
}

.header-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 64px;
  align-self: stretch;
}

.welcome-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 48px;
  align-self: stretch;
}

.title-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  align-self: stretch;
}

.welcome-title {
  color: #232324;
  text-align: center;
  font-family: Roboto, -apple-system, sans-serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 38px;
}

.welcome-description {
  color: #69696C;
  text-align: center;
  font-family: Roboto, -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
}

.login-form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  align-self: stretch;
}

.form-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  align-self: stretch;
}

.input-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  align-self: stretch;
}

.input-label {
  color: #232324;
  font-family: Roboto, -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
}

.input-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 0;
  align-self: stretch;
}

.email-input, .password-input {
  display: flex;
  padding: 8px 12px;
  align-items: center;
  gap: 8px;
  flex: 1 0 0;
  border-radius: 8px;
  border: 1px solid #DFDFE1;
  background: #FFF;
  font-family: Roboto, -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  outline: none;
  transition: border-color 0.2s ease;
}

.email-input:focus, .password-input:focus {
  border-color: #1A6CA1;
}

.email-input::placeholder, .password-input::placeholder {
  color: #BFBFC3;
}

.password-input.error {
  border: 1px solid #f80000;
}

.password-toggle {
  position: relative;
  right: 30px;
  top: 20px;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-icon {
  color: #BFBFC3;
  font-size: 16px;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-wrapper {
  display: flex;
  padding: 3px 0;
  align-items: flex-start;
  gap: 8px;
}

.checkbox-container {
  position: relative;
  width: 16px;
  height: 16px;
}

.checkbox-input {
  /* position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0; */
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid #CFCFD2;
  background: #FFF;
  position: relative;
  transition: all 0.2s ease;  
  cursor: pointer;
}

.checkbox-custom {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid #CFCFD2;
  background: #FFF;
  position: relative;
  transition: all 0.2s ease;
}

.checkbox-input:checked + .checkbox-custom {
  background: #1A6CA1;
  border-color: #1A6CA1;
}

.checkbox-input:checked + .checkbox-custom::after {
  content: '\2713';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 10px;
  font-weight: bold;
}

.checkbox-label {
  color: #232324;
  font-family: Roboto, -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  cursor: pointer;
}

.button-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 24px;
  align-self: stretch;
}

.continue-button, .signin-button {
  display: flex;
  padding: 0 16px;
  height: 40px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  align-self: stretch;
  border-radius: 8px;
  border: 1px solid #1A80C3;
  background: #1A6CA1;
  color: #FDFDFD;
  font-family: Roboto, -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.back-button {
  display: flex;
  padding: 0 16px;
  height: 40px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  align-self: stretch;
  border-radius: 8px;
  border: 1px solid #CFCFD2;
  background: #FFF;
  color: #232324;
  font-family: Roboto, -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.button-section .two-col-buttons {
  display: flex;
  align-self: stretch;
  gap: 10px;
}

.button-section .two-col-buttons .col-2 {
  flex: 1;
}

.continue-button:hover, .signin-button:hover {
  background: #1A80C3;
}

.continue-button:disabled {
  color: #AFAFB4;
  border: 1px solid #CFCFD2;
  background-color: #EFEFF0;
}

.register-button, .forgot-password-button {
  display: flex;
  padding: 0 16px;
  height: 40px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  align-self: stretch;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #1A6CA1;
  font-family: Roboto, -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.forgot-password-button:hover, .register-button:hover, .back-button:hover {
    color: #1A80C3;
}

.footer-section {
  display: flex;
  width: 608px;
  max-width: 608px;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.footer-link {
  display: flex;
  padding: 0 16px;
  height: 40px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #FDFDFD;
  font-family: Roboto, -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.footer-link:hover {
  background: rgba(255, 255, 255, 0.1);
}

.separator {
  width: 8px;
  height: 8px;
  border-radius: 50%; 
  background-color: #CFCFD2;
}

.copyright {
  align-self: stretch;
  color: #DFDFE1;
  text-align: center;
  font-family: Roboto, -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
}

.error-msg, .error-msg-detail  {
  font-size: 16px;
  color: #f80000;
  font-family: Roboto, -apple-system, sans-serif;
}

/* PWE-6345: error messages are centred like the card's title and description. align-self overrides the
   align-items: flex-start of the parent form section for this one element only. */
.error-msg {
  display: block;
  align-self: stretch;
  text-align: center;
}

/* Set when an error replaces the whole form: the wrapper would otherwise shrink to the text and sit on the left. */
.form-error-only {
  align-self: stretch;
}

.external-idp-btn {
  padding: 7px;
  width: 40px;
  box-sizing: content-box;
  cursor: pointer;
}

span.external-idp-btn {
  width: auto;
  color: #232324;
  font-family: Roboto, -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
}

.externalIdpBtn {
  display: flex;
  /* width: 200px;
  height: 36px; */
  border-radius: 30px;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  border : solid;
  border-width: 1.0px;
  cursor: pointer;
}

div.newline {
  padding: 0 10px 0 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.pwdless-width {
  white-space: nowrap;  
}

.policy-list li {
  color: #232324;
  font-family: Roboto, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 24px;
  text-align: left;
  margin-left: 2rem;
}

.error-div.onload-hide {
  display: none;
}

.error-div {
  display: flex;
  column-gap: 0.5rem;
  color: #E22136;
}

.error-div span {
  font-family: Roboto, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 24px;
  text-align: left;
}

.pwd-reset-success-title {
  display: flex;
  column-gap: 1rem;
  font-size: 24px;
  align-items: center;  
}

@media (max-width: 768px) {
  .main-container {
    padding: 24px;
  }

  .login-card {
    width: 100%;
    max-width: 480px;
  }

  .card-content {
    padding: 32px 24px;
  }

  .button-section .two-col-buttons {
    justify-content: center;
    align-items: center;
    align-self: stretch;
    flex-direction: column-reverse;
  }

  .button-section .two-col-buttons .col-2 {
    flex: none;
  }

  .footer-section {
    width: 100%;
    max-width: 480px;
  }
}

/* ===== Language selector ===== */
.lang-selector {
  position: relative;
  display: flex;
  justify-content: center;
  margin: -25px 0;
  z-index: 5;
}

.lang-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #FDFDFD;
  font-family: Roboto, -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.lang-button:hover { background: rgba(255, 255, 255, 0.1); }
.lang-button .lang-button-flag { width: 20px; height: 20px; flex-basis: 20px; }
.lang-caret { font-size: 12px; transition: transform 0.2s ease; }
.lang-button[aria-expanded="true"] .lang-caret { transform: rotate(180deg); }

.lang-button:focus-visible,
.lang-list:focus-visible {
  outline: 2px solid #FFF;
  outline-offset: 2px;
}

.lang-popover {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
}

.lang-selector.opens-up .lang-popover {
  top: auto;
  bottom: calc(100% + 4px);
}

.lang-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  overflow-y: auto;
  background: #FFF;
  color: #1B1B1F;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  text-align: left;
  scrollbar-width: thin;
  scrollbar-color: #B5B5BA transparent;
  scroll-padding-block: 32px;
  overscroll-behavior: contain;
}

.lang-list[hidden] { display: none; }
.lang-list:focus { outline: none; }
.lang-list:focus-visible { outline-offset: -2px; outline-color: #1A80C3; }
.lang-list::-webkit-scrollbar { width: 6px; }
.lang-list::-webkit-scrollbar-thumb { background: #B5B5BA; border-radius: 3px; }

.lang-sentinel { flex: 0 0 1px; height: 1px; pointer-events: none; visibility: hidden; }
.lang-sentinel-top { margin-bottom: -9px; }
.lang-sentinel-bottom { margin-top: -9px; }

.lang-option {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  height: 36px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 16px;
  line-height: 24px;
  cursor: pointer;
}

.lang-flag { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex: 0 0 24px; }
.lang-option-name { flex: 1 1 auto; }
.lang-check { display: none; font-size: 14px; color: #1A80C3; }
.lang-option.is-highlighted { background: #F2F2F3; }
.lang-option[aria-selected="true"] { font-weight: 700; }
.lang-option[aria-selected="true"] .lang-check { display: inline; }
.lang-list:focus-visible .lang-option.is-highlighted { box-shadow: inset 0 0 0 2px #1A80C3; }

.lang-fade {
  position: absolute;
  left: 0;
  right: 0;
  height: 32px;
  display: none;
  justify-content: center;
  pointer-events: none;
  color: #55555B;
  font-size: 12px;
}

.lang-fade-bottom {
  bottom: 0;
  align-items: flex-end;
  padding-bottom: 4px;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #FFF 75%);
}

.lang-fade-top {
  top: 0;
  align-items: flex-start;
  padding-top: 4px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(to top, rgba(255, 255, 255, 0), #FFF 75%);
}

.lang-list.can-scroll-down ~ .lang-fade-bottom,
.lang-list.can-scroll-up ~ .lang-fade-top { display: flex; }

@media (max-width: 768px) {
  .lang-option { height: 44px; }
}

/* "No session" notice (js/sessionNotice.js) */
.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.session-notice-actions .continue-button {
  min-width: 160px;
  align-self: center;
}

.continue-button:focus-visible {
  outline: 2px solid #1A80C3;
  outline-offset: 2px;
}

a.continue-button { text-decoration: none; }
