@import "./styles/app.css";

.register-text span {
  color: var(--color-bsi-orange-dark);
  font-weight: 700;
}

.login-errors {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgb(199 17 71 / 9%);
  color: #c71147;
  font-size: 13px;
}

.auth-page {
  min-height: 100svh;
  overflow: hidden;
}

.brand-panel {
  position: relative;
  height: 210px;
  overflow: hidden;
  background:
    linear-gradient(
      115deg,
      rgba(0, 0, 0, 0.025) 0%,
      transparent 48%
    ),
    linear-gradient(
      135deg,
      #018486 0%,
      #009493 44%,
      #00aaa3 75%,
      #01b4aa 100%
    );
}

.brand-pattern {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0.56;
  pointer-events: none;
  user-select: none;
}

.brand-lockup {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 3;
}

.brand-logo {
  display: block;
  width: 72px;
  height: auto;
  user-select: none;
}

.brand-product {
  margin: 1px 0 0;
  color: var(--color-bsi-orange);
  font-family: "Lato", sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.012em;
  white-space: nowrap;
}

.brand-message {
  display: none;
}

.building-art {
  position: absolute;
  right: -30px;
  bottom: -55px;
  z-index: 2;
  display: block;
  width: 200px;
  max-width: none;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.login-panel {
  display: grid;
  min-width: 0;
  place-items: start center;
  padding: 36px 20px 28px;
  background: var(--color-app-surface);
}

.login-card {
  width: 100%;
  max-width: 588px;
}

.login-title {
  margin: 0;
  color: var(--color-app-ink);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.025em;
  text-align: center;
}

.login-form {
  margin-top: 28px;
}

.form-field {
  width: 100%;
}

.form-field + .form-field {
  margin-top: 22px;
}

.form-field label {
  display: block;
  margin: 0;
  color: #929292;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.form-field > input,
.password-control {
  width: 100%;
  height: 52px;
  margin-top: 6px;
}

.form-field input {
  width: 100%;
  border: 1px solid var(--color-app-border);
  border-radius: 12px;
  outline: none;
  background: var(--color-app-surface);
  color: var(--color-app-ink);
  font-size: 15px;
  font-weight: 400;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.form-field > input {
  height: 52px;
  padding: 0 16px;
}

.form-field input::placeholder {
  color: #a8a8a8;
  opacity: 1;
}

.form-field input:focus {
  border-color: #009b98;
  box-shadow: 0 0 0 3px rgba(0, 155, 152, 0.1);
}

.password-control {
  position: relative;
}

.password-control input {
  height: 100%;
  padding: 0 58px 0 16px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  transform: translateY(-50%);
  place-items: center;
  border: 0;
  border-radius: 50%;
  outline: none;
  background: transparent;
  color: var(--color-app-ink);
  cursor: pointer;
}

.password-toggle svg {
  width: 24px;
  height: 24px;
}

.password-toggle:hover {
  background: #f3f3f3;
}

.password-toggle:focus-visible {
  box-shadow: 0 0 0 3px rgba(0, 155, 152, 0.2);
}

.hidden {
  display: none;
}

.forgot-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 9px;
}

.forgot-link {
  color: #f59b19;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-decoration: none;
}

.forgot-link:hover {
  text-decoration: underline;
}

.login-button {
  display: block;
  width: 100%;
  height: 52px;
  margin-top: 36px;
  border: 0;
  border-radius: 999px;
  background: #009b98;
  color: var(--color-app-surface);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    transform 100ms ease;
}

.login-button:not(:disabled):hover {
  background: #008b88;
}

.login-button:not(:disabled):active {
  transform: scale(0.995);
}

.login-button:focus-visible {
  outline: 3px solid rgba(0, 155, 152, 0.18);
  outline-offset: 3px;
}

.login-button:disabled {
  background: var(--color-app-border);
  color: #999999;
  cursor: not-allowed;
}

.register-text {
  margin: 22px 0 0;
  color: var(--color-app-ink);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  text-align: center;
}

.register-text a {
  color: #f59b19;
  font-weight: 700;
  text-decoration: none;
}

.register-text a:hover {
  text-decoration: underline;
}

.legal-text {
  max-width: 520px;
  margin: 42px auto 0;
  color: #a6a6a6;
  font-size: 11px;
  font-weight: 400;
  line-height: 16px;
  text-align: center;
}

.desktop-break {
  display: none;
}

@media (min-width: 576px) {
  .brand-panel {
    height: 240px;
  }

  .brand-lockup {
    top: 28px;
    left: 32px;
  }

  .brand-logo {
    width: 82px;
  }

  .brand-product {
    font-size: 21px;
  }

  .building-art {
    right: -25px;
    bottom: -70px;
    width: 260px;
  }

  .login-panel {
    padding: 40px 32px 32px;
  }

  .login-title {
    font-size: 28px;
  }

  .login-form {
    margin-top: 30px;
  }

  .form-field > input,
  .password-control {
    height: 56px;
  }

  .form-field > input {
    height: 56px;
  }

  .login-button {
    height: 54px;
    margin-top: 40px;
  }
}

@media (min-width: 768px) {
  .brand-panel {
    height: 280px;
  }

  .brand-lockup {
    top: 38px;
    left: 48px;
  }

  .brand-logo {
    width: 95px;
  }

  .brand-product {
    font-size: 24px;
  }

  .building-art {
    right: -35px;
    bottom: -100px;
    width: 320px;
  }

  .login-panel {
    padding: 48px;
  }

  .login-title {
    font-size: 30px;
  }

  .login-form {
    margin-top: 32px;
  }

  .form-field + .form-field {
    margin-top: 26px;
  }

  .login-button {
    margin-top: 44px;
  }

  .legal-text {
    margin-top: 48px;
  }
}

@media (min-width: 992px) {
  .auth-page {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .brand-panel {
    height: auto;
    min-height: 100svh;
  }

  .brand-lockup {
    top: 8%;
    left: 9%;
  }

  .brand-logo {
    width: 84px;
  }

  .brand-product {
    font-size: 22px;
  }

  .brand-message {
    position: absolute;
    top: 35%;
    left: 9%;
    z-index: 3;
    display: block;
    width: 82%;
    margin: 0;
    color: var(--color-app-surface);
    font-size: clamp(24px, 2.45vw, 35px);
    font-weight: 400;
    line-height: 1.48;
    letter-spacing: -0.025em;
  }

  .brand-message strong {
    font-weight: 700;
  }

  .brand-message .text-accent {
    color: var(--color-bsi-orange);
  }

  .building-art {
    right: 0;
    bottom: 0;
    width: min(64%, 44.8vh, 451px);
  }

  .login-panel {
    min-height: 100svh;
    place-items: center;
    padding: 32px;
    overflow-y: auto;
  }

  .login-card {
    width: 84%;
    min-height: 550px;
  }

  .login-title {
    font-size: 30px;
    line-height: 1.4;
  }

  .login-form {
    margin-top: 22px;
  }

  .form-field + .form-field {
    margin-top: 27px;
  }

  .form-field label {
    font-size: 13px;
    line-height: 17px;
  }

  .form-field > input,
  .password-control {
    height: 56px;
    margin-top: 6px;
  }

  .form-field > input {
    height: 56px;
    padding: 0 16px;
  }

  .form-field input {
    border-radius: 14px;
    font-size: 13px;
  }

  .password-control input {
    padding: 0 50px 0 16px;
  }

  .password-toggle {
    right: 8px;
    width: 40px;
    height: 40px;
  }

  .password-toggle svg {
    width: 22px;
    height: 22px;
  }

  .forgot-row {
    margin-top: 8px;
  }

  .forgot-link {
    font-size: 13px;
    line-height: 17px;
  }

  .login-button {
    height: 48px;
    margin-top: 55px;
    font-size: 13px;
  }

  .register-text {
    margin-top: 20px;
    font-size: 13px;
    line-height: 18px;
  }

  .legal-text {
    margin-top: 49px;
    font-size: 11px;
    line-height: 16px;
  }

  .desktop-break {
    display: initial;
  }
}

@media (min-width: 1200px) {
  .brand-lockup {
    top: 8.5%;
    left: 10%;
  }

  .brand-logo {
    width: 96px;
  }

  .brand-product {
    font-size: 25px;
  }

  .brand-message {
    top: 34.5%;
    left: 10%;
    width: 80%;
  }

  .login-card {
    width: 82%;
  }
}

@media (min-width: 1400px) {
  .brand-lockup {
    top: 8.93%;
    left: 10.94%;
  }

  .brand-logo {
    width: 105px;
  }

  .brand-product {
    font-size: 27px;
  }

  .brand-message {
    top: 34.35%;
    left: 10.94%;
    width: 78%;
    font-size: 35px;
  }

  .building-art {
    width: 451px;
  }

  .login-card {
    width: 81.65%;
    max-width: 588px;
  }
}

/* Django authentication feedback. */
.login-errors,
.login-success {
  margin-bottom: 20px;
}

.login-success {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 155, 152, 0.09);
  color: #007572;
  font-size: 13px;
}
