@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap");

.dsm-auth-password,
.dsm-auth-password *,
.dsm-auth-password *::before,
.dsm-auth-password *::after {
  box-sizing: border-box;
}

.dsm-auth-password {
  width: 100%;
  background-color: #f9fafb;
  font-family: "Inter", sans-serif;
  color: #111827;
}

.dsm-auth-password button,
.dsm-auth-password input {
  font-family: inherit;
}

.dsm-auth-password__viewport {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 20px;
}

.dsm-auth-password__form {
  background-color: #ffffff;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  padding: 36px;
  width: 100%;
}

.dsm-auth-password__header {
  margin-bottom: 28px;
  text-align: left;
}

.dsm-auth-password__title {
  margin: 0 0 12px;
  font-size: 28px;
  font-weight: 600;
  color: #0f172a;
}

.dsm-auth-password__subtitle {
  margin: 0;
  font-size: 15px;
  color: #4b5563;
}

.dsm-auth-password__fieldset {
  border: none;
  margin: 0;
  padding: 0;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dsm-auth-password__field {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.dsm-auth-password__label {
  font-size: 15px;
  font-weight: 500;
  color: #1f2937;
}

.dsm-auth-password__control {
  position: relative;
}

.dsm-auth-password__input {
  width: 100%;
  height: 56px;
  padding: 0 16px;
  font-size: 16px;
  border: 1px solid #e6e7ec;
  border-radius: 10px;
  background-color: #ffffff;
  color: #1f2937;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.dsm-auth-password__input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.dsm-auth-password__helper {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dsm-auth-password__progress {
  width: 100%;
  height: 10px;
  background-color: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}

.dsm-auth-password__progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #60a5fa, #2563eb);
  transition: width 180ms ease, background-color 180ms ease;
}

.dsm-auth-password__progress-bar.danger {
  background: #ef4444;
}

.dsm-auth-password__progress-bar.warning {
  background: #f59e0b;
}

.dsm-auth-password__progress-bar.success {
  background: #16a34a;
}

.dsm-auth-password__checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 20px;
}

.dsm-auth-password__checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #64748b;
}

.dsm-auth-password__check-icon {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid #cbd5f5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.sm-password-checklist li.ok .dsm-auth-password__check-icon {
  border-color: #16a34a;
  background-color: #16a34a;
}

.sm-password-checklist li.ok .dsm-auth-password__check-icon::after {
  content: "";
  width: 6px;
  height: 10px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.sm-password-checklist li.ok {
  color: #0f766e;
  font-weight: 500;
}

.dsm-auth-password__actions {
  margin-top: 8px;
}

.dsm-auth-password__submit {
  width: 100%;
  height: 60px;
  border-radius: 12px;
  border: none;
  background-color: #2563eb;
  color: #ffffff;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 150ms ease, transform 150ms ease;
}

.dsm-auth-password__submit:hover {
  background-color: #1d4ed8;
}

.dsm-auth-password__submit:active {
  transform: translateY(1px);
}

.dsm-auth-password__submit:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: 3px;
}

.dsm-auth-password__submit:disabled {
  background-color: #93c5fd;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .dsm-auth-password__viewport {
    padding: 24px 16px 32px;
  }

  .dsm-auth-password__form {
    padding: 24px;
  }

  .dsm-auth-password__title {
    font-size: 24px;
  }

  .dsm-auth-password__field {
    margin-bottom: 24px;
  }

  .dsm-auth-password__checklist {
    grid-template-columns: 1fr;
  }

  .dsm-auth-password__submit {
    height: 56px;
  }
}
