/* Match the card, typography and primary color of lecturer-client/src/theme.ts. */
:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #202124;
  background: #f5f5f5;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 280px;
}

.environment-bar { overflow-wrap: anywhere; }

.login-page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.login-card {
  width: 100%;
  max-width: 480px;
  padding: 32px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo {
  display: block;
  margin: 0 auto 24px;
  object-fit: contain;
}

h1 {
  margin: 0 0 12px;
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.25;
}

.login-header p {
  margin: 0;
  color: #595d62;
  line-height: 1.5;
}

h2 {
  margin: 0 0 24px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
}

.login-field { margin-bottom: 20px; }

.login-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.875rem;
  font-weight: 600;
}

.login-input { position: relative; }

.login-field input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px 12px 44px;
  border: 1px solid #85898e;
  border-radius: 8px;
  background: #fff;
  color: inherit;
  font: inherit;
}

.login-input-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: #595d62;
  pointer-events: none;
}

.login-input:focus-within .login-input-icon { color: #00549f; }

.login-field input:disabled { background: #f5f5f5; color: #595d62; }

/* Room for the show/hide button; hide the browser's own reveal control. */
.login-input-password input { padding-right: 52px; }
.login-field input::-ms-reveal { display: none; }

.login-password-toggle {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #595d62;
  cursor: pointer;
}

.login-password-toggle[hidden] { display: none; }
.login-password-toggle:hover { background: #f0f6fc; color: #00549f; }
.login-password-toggle:focus-visible { outline-offset: 0; }
.login-password-toggle[aria-pressed="true"] .login-password-show,
.login-password-toggle[aria-pressed="false"] .login-password-hide { display: none; }

.login-button {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: #00549f;
  color: #fff;
  font: inherit;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.login-button:hover { background: #003b70; }

:where(a, button, input):focus-visible {
  outline: 3px solid #00549f;
  outline-offset: 3px;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: #595d62;
  font-size: 0.875rem;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #ddd;
}

.login-providers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.login-provider {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid #85898e;
  border-radius: 12px;
  background: #fff;
  color: #595d62;
  text-decoration: none;
}

.login-provider[href]:hover {
  border-color: #00549f;
  background: #f0f6fc;
  color: #00549f;
}

.login-error {
  margin-bottom: 20px;
  padding: 12px 16px;
  border: 1px solid #c62828;
  border-radius: 8px;
  background: #fff3f3;
  color: #a11b1b;
  overflow-wrap: anywhere;
}

.login-error p { margin: 0; }
.login-error p + p { margin-top: 8px; }
.login-field input[aria-invalid="true"] { border-color: #c62828; }

.login-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  max-width: 480px;
  margin-top: 24px;
  font-size: 0.8125rem;
  line-height: 1.6;
  text-align: center;
}

.login-tools a {
  padding: 4px 0;
  color: #595d62;
  text-underline-offset: 3px;
}

.login-tools a:hover { color: #00549f; }

.login-footer {
  max-width: 480px;
  margin-top: 24px;
  color: #595d62;
  font-size: 0.8125rem;
  line-height: 1.6;
  text-align: center;
}

.login-footer p { margin: 0 0 4px; }
.login-footer a { color: #00549f; }

@media (max-width: 480px) {
  .login-page { padding: 24px 16px; }
  .login-card { padding: 24px; }
  h1 { font-size: 1.75rem; }
}

.login-provider[aria-disabled="true"] {
  opacity: 0.4;
  cursor: not-allowed;
}

.login-text-button {
  display: block;
  margin-top: 12px;
  padding: 12px;
  color: #00549f;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
}

.login-text-button:hover { background: #f0f6fc; }

.login-text-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.login-text-actions .login-text-button {
  flex: 1;
  min-width: 0;
  margin-top: 0;
  padding: 12px 4px;
  font-size: 0.875rem;
}

.login-hint {
  margin: 8px 0 0;
  color: #595d62;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.login-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
