/* CSO authentication interface */
.cso-auth-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(12, 28, 44, 0.62);
  overflow-y: auto;
}

.cso-auth-backdrop[hidden],
.cso-auth-card [hidden] {
  display: none !important;
}

.cso-auth-card {
  width: min(100%, 440px);
  margin: auto;
  padding: 28px;
  position: relative;
  background: #fffdf8;
  color: #18344d;
  border: 1px solid #dce6e1;
  border-radius: 20px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.24);
}

.cso-auth-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: 0;
  background: transparent;
  color: #18344d;
  font-size: 28px;
  cursor: pointer;
}

.cso-auth-card h2 {
  margin: 0 30px 8px 0;
  font-size: 1.65rem;
}

.cso-auth-intro {
  margin: 0 0 20px;
  color: #536777;
  line-height: 1.5;
}

.cso-auth-form {
  display: grid;
  gap: 13px;
}

.cso-auth-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  font-size: 0.93rem;
}

.cso-auth-form input {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid #cbd8d3;
  border-radius: 9px;
  background: white;
  color: #18344d;
  font: inherit;
}

.cso-auth-form input:focus {
  outline: 2px solid #8bb7a5;
  outline-offset: 1px;
}

.cso-auth-submit {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  background: #18344d;
  color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.cso-auth-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.cso-auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.cso-auth-links button {
  border: 0;
  padding: 0;
  background: transparent;
  color: #245f4b;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.cso-auth-message {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 9px;
  background: #edf4ef;
  color: #183f32;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.cso-auth-message:empty {
  display: none;
}

@media (max-width: 480px) {
  .cso-auth-card {
    padding: 23px 18px;
    border-radius: 16px;
  }
}

/* Accessible authentication request feedback */
.cso-auth-submit[aria-busy="true"] {
  cursor: progress;
}

/* Red styling for the signed-in homepage logout button */
.user-tools #csoSessionLogout {
  background-color: #c62828;
  border: 1px solid #b71c1c;
  color: #ffffff;
}

.user-tools #csoSessionLogout:hover {
  background-color: #b71c1c;
}

.user-tools #csoSessionLogout:focus-visible {
  outline: 3px solid #ffbf47;
  outline-offset: 3px;
}

.user-tools #csoSessionLogout:disabled {
  opacity: 0.7;
  cursor: wait;
}
