.dw-password {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  min-height: 0;
  color: var(--text);
  font-size: 12px;
}

.dw-password-output-row {
  display: flex;
  align-items: stretch;
  gap: 6px;
}

.dw-password-output {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--text);
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  text-align: left;
  cursor: copy;
  animation: dw-password-roll 220ms ease;
  transition: border-color 140ms ease;
}

.dw-password-output:hover,
.dw-password-output:focus-visible {
  border-color: var(--w-accent, var(--accent));
}

.dw-password-output.is-copied {
  color: var(--green);
}

.dw-password-char--upper {
  color: var(--w-accent, var(--accent));
}

.dw-password-char--digit {
  color: var(--green);
}

.dw-password-char--symbol {
  color: var(--amber);
}

.dw-password-refresh {
  flex: 0 0 auto;
  align-self: center;
}

.dw-password-refresh:active svg {
  transform: rotate(180deg);
  transition: transform 220ms ease;
}

.dw-password-strength {
  height: 4px;
  border-radius: 999px;
  background: var(--surface-muted);
  overflow: hidden;
}

.dw-password-strength-fill {
  height: 100%;
  border-radius: inherit;
  transition: width 320ms ease, background-color 320ms ease;
}

.dw-password-strength--weak {
  background: var(--red);
}

.dw-password-strength--fair {
  background: var(--amber);
}

.dw-password-strength--strong {
  background: var(--green);
}

.dw-password-strength--excellent {
  background: var(--w-accent, var(--accent));
}

.dw-password-strength-caption {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 10px;
}

.dw-password-modes {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-muted);
  align-self: flex-start;
}

.dw-password-mode {
  padding: 3px 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}

.dw-password-mode.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.dw-password-slider {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dw-password-slider-label {
  color: var(--text-muted);
  font-size: 11px;
}

.dw-password-slider input[type="range"] {
  width: 100%;
  accent-color: var(--w-accent, var(--accent));
}

.dw-password-toggles {
  display: flex;
  gap: 4px;
}

.dw-password-toggle {
  padding: 2px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text-muted);
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}

.dw-password-toggle.is-active {
  background: var(--w-accent-soft, var(--accent-soft));
  border-color: var(--w-accent, var(--accent));
  color: var(--text);
}

@keyframes dw-password-roll {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dw-password-output {
    animation: none;
  }

  .dw-password-strength-fill {
    transition: none;
  }
}
