/* Đăng nhập (login/login.js). Sizes and colours are the reference's, read in
   its login page (index.js `Mit`, ix:L164751–165199; its theme ZK,
   ix:L164182–164300; `_ButtonContainer_1pwv2_1`, `_GoogleIcon_1pwv2_8` in
   index-B6XZtG7p.css). Its "phone" (a phone's user agent, R4e) is a screen of
   600 px or less here. */

.login {
  min-height: var(--page-h);
  background: var(--bg);
  color: var(--text);
}

/* .auth: 30px 40px, line height 1.7, 900 px wide at most, the column centred in the page's height */
.login-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 900px;
  min-height: var(--page-h);
  margin: 0 auto;
  padding: 30px 40px;
  line-height: 1.7;
  text-align: left;
  position: relative;
}

/* The extension's two marks, top right (ix:L164774–164783). */
.login-ext-status {
  position: absolute;
  top: 15px;
  right: 15px;
}

.login-row {
  display: flex;
  flex-direction: row;
  gap: 50px;
  align-items: center;
  width: 100%;
}

.login-intro {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  text-align: left;
}

/* The reference's picture is 240 px wide (200 on a phone); the extension's icon shows at its own size, not enlarged. */
.login-art {
  max-width: 100%;
  height: auto;
  margin-bottom: 15px;
}

.login-lead {
  margin: 0 0 10px;
}

.login-features {
  margin: 0;
  padding-left: 20px;
  list-style-position: inside;
}

.login-features li {
  margin-bottom: 3px;
}

/* The (i): MUI's small icon (20 px) in the secondary colour, 6 px after the text */
.login-features .info-icon {
  margin-left: 6px;
  color: var(--wovia-blue);
  vertical-align: middle;
}

.login-features .info-icon svg {
  width: 20px;
  height: 20px;
}

.login-box {
  position: relative;
  flex: 1;
  width: auto;
  max-width: 380px;
}

/* "Vui lòng chờ…" over the box while a request runs */
.login-busy {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--text-strong);
  font-size: 20px;
}

.login-busy[hidden] {
  display: none;
}

/* MUI's Alert in the dark theme: severity error; a notice (no server, no mail) in its info colours */
.login-notice {
  margin-bottom: 15px;
  padding: 6px 16px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent-soft) 10%, transparent);
  color: oklch(from rgb(184, 231, 251) min(l, var(--max-lightness, 1)) c h);
  font-size: 14px;
  line-height: 1.43;
  text-align: left;
}

.login-notice[hidden] {
  display: none;
}

.login-notice.is-error {
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  color: oklch(from rgb(244, 199, 199) min(l, var(--max-lightness, 1)) c h);
}

.login-notice-link {
  color: var(--accent-soft);
  text-decoration: underline;
}

.login-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.login-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 20px;
  border: 0;
  border-radius: 12px;
  background: var(--wovia-blue);
  color: var(--on-accent);
  font: 500 14px/1.75 var(--font);
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: background-color 0.25s ease, transform 0.1s ease;
}

.login-google:hover:not(:disabled) {
  background: var(--wovia-blue-bright);
}

.login-google:active:not(:disabled) {
  background: var(--wovia-blue-strong);
  transform: scale(0.97);
}

/* MUI's disabled contained button in the dark theme */
.login-google:disabled,
.login-submit:disabled {
  background: color-mix(in srgb, var(--ink) 12%, transparent);
  color: color-mix(in srgb, var(--ink) 30%, transparent);
  cursor: default;
}

.login-google-mark {
  flex: none;
  width: 24px;
  height: 24px;
  margin-right: 10px;
}

.login-google:disabled .login-google-mark {
  opacity: 0.4;
}

.login-note {
  align-self: stretch;
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.43;
}

.login-note[hidden] {
  display: none;
}

.login-or {
  display: flex;
  align-items: center;
  align-self: stretch;
  margin: 15px 0;
  opacity: 0.7;
}

.login-or-line {
  flex: 1;
  height: 1px;
  background: color-mix(in srgb, var(--ink) 33%, transparent);
}

.login-or > :not(.login-or-line) {
  padding: 0 10px;
  font-size: 14px;
}

.login-form {
  width: 100%;
  margin-bottom: 15px;
}

.login-form-fields {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.login-form-fields .login-note {
  margin: 0;
}

/* MUI's outlined TextField, size small: 40 px high, the label inside until the field has focus or text */
.login-field {
  position: relative;
}

.login-field[hidden] {
  display: none;
}

.login-input {
  display: block;
  width: 100%;
  height: 40px;
  padding: 8.5px 14px;
  border: 1px solid var(--field-border);
  border-radius: 8px;
  background: var(--field-bg);
  color: var(--text);
  font: 400 16px/1.4375 var(--font);
  transition: border-color 0.2s ease;
}

.login-input:hover {
  border-color: var(--hover-line);
}

.login-input:focus {
  border-color: var(--wovia-blue);
  outline: none;
}

.login-input::placeholder {
  color: transparent;
}

.login-label {
  position: absolute;
  top: 0;
  left: 0;
  max-width: calc(100% - 24px);
  padding: 0 4px;
  overflow: hidden;
  color: var(--text-muted);
  font: 400 16px/1.4375 var(--font);
  white-space: nowrap;
  text-overflow: ellipsis;
  pointer-events: none;
  transform: translate(10px, 8.5px) scale(1);
  transform-origin: top left;
  transition: transform 0.2s cubic-bezier(0, 0, 0.2, 1), color 0.2s;
}

.login-input:focus + .login-label,
.login-input:not(:placeholder-shown) + .login-label {
  background: var(--bg);
  transform: translate(10px, -9px) scale(0.75);
}

.login-input:focus + .login-label {
  color: var(--text-strong);
}

/* The form's button: contained secondary, 10 px, bold, white (ix:L165137–165147) */
.login-submit {
  padding: 10px;
  border: 0;
  border-radius: 10px;
  background: var(--wovia-blue);
  color: var(--on-accent);
  font: 700 16px/1.75 var(--font);
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: background-color 0.25s ease, transform 0.1s ease;
}

.login-submit:hover:not(:disabled) {
  background: var(--wovia-blue-bright);
}

.login-submit:active:not(:disabled) {
  background: var(--wovia-blue-bright);
  transform: scale(0.97);
}

.login-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  margin-bottom: 15px;
  font-size: 14px;
}

.login-link {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  line-height: 1.7;
  text-align: left;
  cursor: pointer;
}

.login-link[hidden] {
  display: none;
}

.login-forgot {
  color: var(--accent-soft);
  text-decoration: underline;
}

.login-create {
  color: var(--accent-soft);
  font-weight: 700;
}

/* The port's own line: which server the account is on */
.login-server {
  align-self: stretch;
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

@media (max-width: 600px) {
  .login-wrap {
    max-width: 600px;
    padding: 15px;
  }

  .login-row {
    flex-direction: column;
    gap: 20px;
  }

  .login-intro {
    flex: none;
    text-align: center;
  }

  .login-box {
    flex: none;
    width: 100%;
  }
}
