/* Password Component Styles */
.password-field-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: inherit;
}

.password-field-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.password-field-label-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-label, #374151);
}

.password-field-required {
  color: var(--text-error, #dc2626);
  margin-left: 2px;
}

.password-field-wrapper {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
  transition: all 0.2s ease;
}

.password-field-wrapper.focused {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary, #3b82f6) 30%, transparent);
  border-radius: var(--radius-md, 6px);
}

.password-field {
  width: 100%;
  padding: 8px 12px;
  padding-right: 40px;
  border: 1px solid var(--border, #d1d5db);
  border-radius: var(--radius-md, 6px);
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--text-primary, #111827);
  background-color: var(--bg-card, #fff);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.password-field:hover:not(.disabled) {
  border-color: #9ca3af;
}

.password-field:focus {
  outline: none;
  border-color: var(--primary, #3b82f6);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #3b82f6) 18%, transparent);
}

.password-field.error {
  border-color: var(--text-error, #dc2626);
}

.password-field.disabled {
  background-color: var(--bg-app, #f3f4f6);
  color: var(--text-muted, #6b7280);
  cursor: not-allowed;
}

.password-field-error {
  font-size: 0.75rem;
  color: var(--text-error, #dc2626);
  min-height: 1rem;
}

.password-field-error-placeholder {
  min-height: 1rem;
}

.password-field-sm .password-field {
  padding: 6px 12px;
  padding-right: 36px;
  font-size: 0.75rem;
}

.password-field-sm .password-toggle svg { width: 14px; height: 14px; }

.password-field-lg .password-field {
  padding: 10px 16px;
  padding-right: 44px;
  font-size: 1rem;
}

.password-field-lg .password-toggle svg { width: 18px; height: 18px; }

.password-toggle {
  position: absolute;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border: none;
  background: none;
  color: var(--text-muted, #6b7280);
  cursor: pointer;
  transition: color 0.2s ease;
}

.password-toggle:hover:not(:disabled) { color: var(--text-secondary, #374151); }
.password-toggle:disabled { cursor: not-allowed; opacity: 0.5; }

.password-strength-meter { margin-top: 8px; }

.strength-bar {
  height: 4px;
  background-color: #e5e7eb;
  border-radius: 2px;
  overflow: hidden;
}

.strength-fill { height: 100%; transition: all 0.3s ease; }

.strength-text {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
}

.password-requirements {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.75rem;
  color: var(--text-muted, #6b7280);
}

.password-requirements li {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}

.password-requirements li::before {
  content: "x";
  display: inline-block;
  width: 16px;
  color: var(--text-error, #dc2626);
  font-weight: 700;
}

.password-requirements li.met::before { content: "v"; color: #22c55e; }

.password-with-generator {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.generate-button {
  align-self: flex-start;
  padding: 6px 12px;
  border: 1px solid var(--border, #d1d5db);
  border-radius: var(--radius-sm, 4px);
  background-color: var(--bg-app, #f9fafb);
  color: var(--text-secondary, #374151);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.generate-button:hover {
  background-color: #f3f4f6;
  border-color: #9ca3af;
}