/* 登录与注册：遵循 91 大赛 PC 1920 / H5 375 设计稿。 */
.ds-auth-layer {
  position: fixed;
  z-index: 10020;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 40px 20px 96px;
  box-sizing: border-box;
  background: rgb(0 0 0 / 70%);
  color: #ddd;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

.ds-auth-layer[hidden] {
  display: none !important;
}

.ds-auth-layer *,
.ds-auth-layer *::before,
.ds-auth-layer *::after {
  box-sizing: border-box;
}

.ds-auth-dialog {
  position: relative;
  width: 480px;
  max-width: 100%;
  margin: auto;
  padding: 32px;
  border: 0;
  border-radius: 8px;
  background: #222;
  text-align: left;
  outline: none;
  transform: translateY(28px);
}

.ds-auth-brand {
  display: block;
  width: 152px;
  height: auto;
  margin: 0 auto 8px;
}

.ds-auth-title {
  text-shadow: none;
  margin: 0;
  color: #ddd;
  font-size: 20px;
  font-weight: 400;
  line-height: 28px;
  text-align: center;
}

.ds-auth-form {
  margin-top: 24px;
}

.ds-auth-layer .ds-auth-input {
  display: block;
  width: 100%;
  height: 48px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid #6e6e6e;
  border-radius: 4px;
  background: transparent;
  color: #eee;
  font:
    400 16px/24px "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  letter-spacing: 0;
  outline: none;
  transition: border-color 160ms ease-out;
}

.ds-auth-layer .ds-auth-input + .ds-auth-input {
  margin-top: 16px;
}

.ds-auth-layer .ds-auth-input::placeholder {
  color: #888;
  opacity: 1;
}

.ds-auth-layer .ds-auth-input:focus-visible {
  border-color: #ffbb02;
  box-shadow: 0 0 0 1px #ffbb02;
}

.ds-auth-actions {
  display: flex;
  gap: 16px;
  margin-top: 24px;
}

.ds-auth-button {
  flex: 1;
  min-width: 0;
  height: 48px;
  margin: 0;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: #ffbb02;
  color: #111;
  font:
    400 16px/24px "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  cursor: pointer;
  transition:
    background-color 160ms ease-out,
    opacity 160ms ease-out;
}

.ds-auth-button:hover {
  background: #ffc62c;
}

.ds-auth-button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.ds-auth-button:focus-visible,
.ds-auth-close:focus-visible {
  outline: 2px solid #ffdd7a;
  outline-offset: 4px;
}

.ds-auth-notice {
  margin-top: 24px;
  color: #999;
  font-size: 14px;
  font-weight: 400;
  line-height: 24px;
}

.ds-auth-notice p {
  margin: 0;
  color: inherit;
  font: inherit;
}

.ds-auth-close {
  position: absolute;
  left: calc(50% - 20px);
  bottom: -56px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 1px solid #bdbdbd;
  border-radius: 50%;
  background: transparent;
  color: #ddd;
  cursor: pointer;
}

.ds-auth-close svg {
  display: block;
  width: 24px;
  height: 24px;
}

.ds-auth-error {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: max-content;
  max-width: calc(100% - 32px);
  margin: 0;
  padding: 12px 20px;
  border-radius: 3px;
  background: rgb(17 17 17 / 94%);
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  line-height: 24px;
  text-align: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.ds-auth-error[hidden] {
  display: none !important;
}

@media (max-width: 767px) {
  .ds-auth-dialog {
    width: 335px;
    padding: 24px 20px;
    transform: translateY(0);
  }

  .ds-auth-layer .ds-auth-input {
    font-size: 14px;
  }

  .ds-auth-form {
    margin-top: 20px;
  }

  .ds-auth-actions {
    gap: 12px;
    margin-top: 20px;
  }

  .ds-auth-notice {
    margin-top: 20px;
    line-height: 22px;
  }

  .ds-auth-error {
    padding: 12px 20px;
    max-width: calc(100% - 16px);
    white-space: nowrap;
  }
}

@media (max-height: 620px) {
  .ds-auth-layer {
    align-items: flex-start;
    padding-top: 24px;
  }

  .ds-auth-dialog {
    margin-top: 0;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ds-auth-layer * {
    transition: none;
  }
}

/* 使用 hlcgw-web 同款 Parsley 字段校验，错误不挤压相邻输入框。 */
.ds-auth-layer .login_form_item + .login_form_item {
  margin-top: 16px;
}
.ds-auth-layer .parsley-errors-list {
  margin: 6px 0 0;
  padding: 0;
  color: #e89393;
  font-size: 12px;
  line-height: 18px;
  list-style: none;
}
.ds-auth-layer .parsley-errors-list:empty {
  display: none;
}
.ds-auth-layer .parsley-error {
  border-color: #d47a7a;
}
